OVH Cloud OVH Cloud

Erreur syntaxe

9 réponses
Avatar
booboo
Bonjour à tous
j'ai mis le code suivant sur mon splash screen au moment de l'essayé il a
pas aimé quequ'un peux ou j'ai pu merdé
merci
Private Sub SplashScreen1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load

Timer1.Enabled = False

Timer1.Interval = 1000

sec = 0

AuSommet()

End Sub

Public Sub CloseAfter(ByVal attente As Long)

Timer1.Enabled = True

delai = attente

End Sub

Private Sub Timer1_Timer()

sec = sec + 1

Me.Print(sec)

If sec >= delai Then Unload(Me)

Form6.Show()

'Set up the dialog text at runtime according to the application's assembly
inf

9 réponses

Avatar
Christian Hugoud
C'est pour le moins obscure. Si tu peux nous éclairer sur ce que tu veux
faire et sur ce qui se passe...

Me.Print(sec) : Me.Print sec



Christian

"booboo" a écrit dans le message de news:

Bonjour à tous
j'ai mis le code suivant sur mon splash screen au moment de l'essayé il a
pas aimé quequ'un peux ou j'ai pu merdé
merci
Private Sub SplashScreen1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load

Timer1.Enabled = False

Timer1.Interval = 1000

sec = 0

AuSommet()

End Sub

Public Sub CloseAfter(ByVal attente As Long)

Timer1.Enabled = True

delai = attente

End Sub

Private Sub Timer1_Timer()

sec = sec + 1

Me.Print(sec)

If sec >= delai Then Unload(Me)

Form6.Show()

'Set up the dialog text at runtime according to the application's assembly
inf





Avatar
Fregoli
C'est du .NET, pas du VB6.
Mais de toutes façons, si tu expliquais un peu plus ce qui se passe, cela
pourrait aider à t'aider.
Mais quelques question quand même:
que fait la procédure AuSommet ????
Les variables sec et delai ne sont pas définies. Le contrôle de syntaxe
est-il à strict ? Où sont définies ces variables ????

"booboo" a écrit :

Bonjour à tous
j'ai mis le code suivant sur mon splash screen au moment de l'essayé il a
pas aimé quequ'un peux ou j'ai pu merdé
merci
Private Sub SplashScreen1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load

Timer1.Enabled = False

Timer1.Interval = 1000

sec = 0

AuSommet()

End Sub

Public Sub CloseAfter(ByVal attente As Long)

Timer1.Enabled = True

delai = attente

End Sub

Private Sub Timer1_Timer()

sec = sec + 1

Me.Print(sec)

If sec >= delai Then Unload(Me)

Form6.Show()

'Set up the dialog text at runtime according to the application's assembly
inf






Avatar
booboo
on faite rien de tout ca j'ai splash screen comme ecran de demarrage je lui
ai mis un timer.
j'ai trouver un code sur le net est je voulais l'adapté au moment de
l'affichage de screen splash il reste 2 seconde avant le demarage de mon
programme.
"Fregoli" a écrit dans le message de
news:
C'est du .NET, pas du VB6.
Mais de toutes façons, si tu expliquais un peu plus ce qui se passe, cela
pourrait aider à t'aider.
Mais quelques question quand même:
que fait la procédure AuSommet ????
Les variables sec et delai ne sont pas définies. Le contrôle de syntaxe
est-il à strict ? Où sont définies ces variables ????

"booboo" a écrit :

Bonjour à tous
j'ai mis le code suivant sur mon splash screen au moment de l'essayé il a
pas aimé quequ'un peux ou j'ai pu merdé
merci
Private Sub SplashScreen1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load

Timer1.Enabled = False

Timer1.Interval = 1000

sec = 0

AuSommet()

End Sub

Public Sub CloseAfter(ByVal attente As Long)

Timer1.Enabled = True

delai = attente

End Sub

Private Sub Timer1_Timer()

sec = sec + 1

Me.Print(sec)

If sec >= delai Then Unload(Me)

Form6.Show()

'Set up the dialog text at runtime according to the application's
assembly
inf








Avatar
Fregoli
Cela ne change rien à mes questions:
Que fait la procédure AuSommet ?
Où sont déclarées les variables Delai et Sec ???

Est-ce l'intégralité de ton code qui est affiché ???
Avatar
booboo
Slt fregoli
Au sommet fait partie du code origonal que j'ai recuper
Voila l'integralité de mon code :
Public Class SplashScreen1

'TODO: This form can easily be set as the splash screen for the application
by going to the "Application" tab

' of the Project Designer ("Properties" under the "Project" menu).



Private Sub SplashScreen1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load

Timer1.Enabled = False

Timer1.Interval = 1000

sec = 0

AuSommet()

End Sub

Public Sub CloseAfter(ByVal attente As Long)

Timer1.Enabled = True

delai = attente

End Sub

Private Sub Timer1_Timer()

sec = sec + 1

Me.Print(sec)

If sec >= delai Then Unload(Me)

Form6.Show()

'Set up the dialog text at runtime according to the application's assembly
information.

'TODO: Customize the application's assembly information in the "Application"
pane of the project

' properties dialog (under the "Project" menu).

'Application title

If My.Application.Info.Title <> "" Then

ApplicationTitle.Text = My.Application.Info.Title

Else

'If the application title is missing, use the application name, without the
extension

ApplicationTitle.Text =
System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)

End If

'Format the version information using the text set into the Version control
at design time as the

' formatting string. This allows for effective localization if desired.

' Build and revision information could be included by using the following
code and changing the

' Version control's designtime text to "Version {0}.{1:00}.{2}.{3}" or
something similar. See

' String.Format() in Help for more information.

'

' Version.Text = System.String.Format(Version.Text,
My.Application.Info.Version.Major, My.Application.Info.Version.Minor,
My.Application.Info.Version.Build, My.Application.Info.Version.Revision)

Version.Text = System.String.Format(Version.Text,
My.Application.Info.Version.Major, My.Application.Info.Version.Minor)

'Copyright info

Copyright.Text = My.Application.Info.Copyright

End Sub







Private Sub ApplicationTitle_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ApplicationTitle.Click

End Sub

Private Sub Timer1_Disposed(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Timer1.Disposed

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick

End Sub

Private Sub MainLayoutPanel_Paint(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles MainLayoutPanel.Paint

End Sub

End Class

"Fregoli" a écrit dans le message de
news:
Cela ne change rien à mes questions:
Que fait la procédure AuSommet ?
Où sont déclarées les variables Delai et Sec ???

Est-ce l'intégralité de ton code qui est affiché ???


Avatar
booboo
slt Fregoli et à tous
voila un lien avec mon projet comme ca tu va mieux comprendre
http://soufiane3.free.fr/Caisse.zip
merci
"booboo" a écrit dans le message de news:
%
Slt fregoli
Au sommet fait partie du code origonal que j'ai recuper
Voila l'integralité de mon code :
Public Class SplashScreen1

'TODO: This form can easily be set as the splash screen for the
application by going to the "Application" tab

' of the Project Designer ("Properties" under the "Project" menu).



Private Sub SplashScreen1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load

Timer1.Enabled = False

Timer1.Interval = 1000

sec = 0

AuSommet()

End Sub

Public Sub CloseAfter(ByVal attente As Long)

Timer1.Enabled = True

delai = attente

End Sub

Private Sub Timer1_Timer()

sec = sec + 1

Me.Print(sec)

If sec >= delai Then Unload(Me)

Form6.Show()

'Set up the dialog text at runtime according to the application's assembly
information.

'TODO: Customize the application's assembly information in the
"Application" pane of the project

' properties dialog (under the "Project" menu).

'Application title

If My.Application.Info.Title <> "" Then

ApplicationTitle.Text = My.Application.Info.Title

Else

'If the application title is missing, use the application name, without
the extension

ApplicationTitle.Text =
System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)

End If

'Format the version information using the text set into the Version
control at design time as the

' formatting string. This allows for effective localization if desired.

' Build and revision information could be included by using the following
code and changing the

' Version control's designtime text to "Version {0}.{1:00}.{2}.{3}" or
something similar. See

' String.Format() in Help for more information.

'

' Version.Text = System.String.Format(Version.Text,
My.Application.Info.Version.Major, My.Application.Info.Version.Minor,
My.Application.Info.Version.Build, My.Application.Info.Version.Revision)

Version.Text = System.String.Format(Version.Text,
My.Application.Info.Version.Major, My.Application.Info.Version.Minor)

'Copyright info

Copyright.Text = My.Application.Info.Copyright

End Sub







Private Sub ApplicationTitle_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles ApplicationTitle.Click

End Sub

Private Sub Timer1_Disposed(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Timer1.Disposed

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick

End Sub

Private Sub MainLayoutPanel_Paint(ByVal sender As System.Object, ByVal e
As System.Windows.Forms.PaintEventArgs) Handles MainLayoutPanel.Paint

End Sub

End Class

"Fregoli" a écrit dans le message de
news:
Cela ne change rien à mes questions:
Que fait la procédure AuSommet ?
Où sont déclarées les variables Delai et Sec ???

Est-ce l'intégralité de ton code qui est affiché ???






Avatar
Fregoli
Excuse moi, j'étais plus là.

Comme je n'ai pas Visual .NET d'installé, je ne peux que voir les fichier en
mode txt.
Toutefois il me semble que les deux variables sec et delai ne sont pas
déclarées explicitement.
Aussi, au permier appel de la procedure Timer1_Timer, ces deux variables
valent 0.
Comme ensuite tu fais sec = sec +1, le test est vrai (sec > delai) et tu
effectue le unloaf immédiatement.
Le unload qui suit fait que rien ne dois se passer ensuite.
Mais je ne peux pas tester car je n'ai pas l'environnement ici.
Essaye de déclarer ces deux variables dans le module SplashScreen1 en
variable globale pour voir
Bon courage...
Avatar
Fred
Dans : news:,
booboo disait :

Bonsoir,
Si c'est du .NET, Unload n'existe pas.
Il faut faire Me.Close

--
Fred
http://www.cerbermail.com/?3kA6ftaCvT
Avatar
booboo
Ok merci je vais voir
par contre si qqun à une idées pour perfectionné mon projet ca sera la bien
venu
merci
Booboo
"Fred" a écrit dans le message de news:

Dans : news:,
booboo disait :

Bonsoir,
Si c'est du .NET, Unload n'existe pas.
Il faut faire Me.Close

--
Fred
http://www.cerbermail.com/?3kA6ftaCvT