Soyez le premier à donner votre avis sur cette source.
Vue 17 944 fois - Téléchargée 864 fois
Imports System.Drawing Imports System.Drawing.Drawing2D Imports System.Collections Imports System.ComponentModel ' Public Partial Class MainForm Public Sub New() ' The Me.InitializeComponent call is required for Windows Forms designer support. Me.InitializeComponent() ' End Sub Dim I As Integer 'Inactive Dim DepartX As Short 'Used to move form Dim DepartY As Short 'Used to move form Dim H As Integer 'Hours Dim M As Integer 'Minutes Dim S As Integer 'Seconds Dim T As String 'Time Dim MyError As String 'Error 'Dim Resultat As Integer 'Value for countdown Private Sub Form1Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Label1.Text = System.DateTime.Now.ToLongTimeString End Sub Private Sub Button1Click(ByVal sender As Object, ByVal e As EventArgs) H = textBox1.Text M = textBox2.Text S = textBox3.Text If H = 0 And M = 0 And S = 1 Then System.Windows.Forms.MessageBox.Show( "Seconds must be greater than 1 !" ) : Timer2.Stop Timer2.Enabled = True Timer2.Start Me.Button1.Enabled = "False" Me.Button2.Enabled = "True" Me.Button2.Text = "stop" End Sub Private Sub Button2Click(ByVal sender As Object, ByVal e As EventArgs) Me.Button1.Enabled = "True" Me.Button2.Enabled = "False" Timer2.Stop Label2.Text = "00:00:00" End Sub Private Sub Button3Click(ByVal sender As Object, ByVal e As EventArgs) Me.Close End Sub Sub Timer1Tick(ByVal sender As Object, ByVal e As EventArgs) 'This timer is permanently active as it shows the system time Label1.Text = System.DateTime.Now.ToLongTimeString End Sub Sub Timer2Tick(ByVal sender As Object, ByVal e As EventArgs) 'Count down S = S - 1 If S = 0 Then S = 60 : M = M - 1 If M = 0 Then M = 60 : H = H - 1 If H = 0 Then H = 24 'Small errors management If S > 60 OR M > 60 OR H > 24 Then System.Windows.Forms.MessageBox.Show( "Value does not exist !" ) T = TimeSerial(H, M, S) Label2.Text = T 'Plays a sound when countdown reaches 00:00:00 Dim Snd As New System.Media.SoundPlayer("C:\Windows\Media\tada.wav") If T = "00:00:00" Then Timer2.Stop : System.Windows.Forms.MessageBox.Show( "Countdown reached !" ) : Me.Button2.Text = "reset" : Label2.Text = T : Snd.Play() End Sub End Class
dim toto as tata
toto.nonstatic()
tata.static()
alors que toi tu fait :
toto.static
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.