ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[­ì³Ð] µL²á§@ªº¤p®ÉÄÁ...

[­ì³Ð] µL²á§@ªº¤p®ÉÄÁ...

¦pÃD
¦]¤£ª¾¹D«ç±NlabelÂà´«¦¨¶ê§Îªº
©Ò¥H   ¥u¦n¥[´î¥Î§a..

¥H¤U¬Oµ{¦¡½X
  1. Private Sub Command1_Click(Index As Integer)
  2.     Timer1.Interval = 1000
  3. End Sub

  4. Private Sub Command2_Click()
  5.    Timer1.Interval = 0
  6. End Sub

  7. Private Sub Form_Load()
  8.     Timer1.Interval = 0
  9.     Label1.Caption = ""
  10. End Sub

  11. Private Sub Timer1_Timer()
  12. For i = 1 To 1  '¦¹¦a¤è¥Î°j°é¬OÅý¥L¦Û°ÊÀHµÛ¹q¸£®É¶¡Åª¨ú ¦pªG¨S¦³¦¹¦æ ·|³y¦¨«ö¤@¤U ¸õ¤@¦¸
  13.     Label1.Caption = Date & Time
  14. Next i
  15. End Sub
½Æ»s¥N½X
¤p®ÉÄÁ¬ÛÃö.rar (4.44 KB)

³á~¥Î¶Ã¼Æ¬O¼ÒÀÀ³ø»ù¦øªA¾¹(DDE Server)¡A¦]¬°§Úªº¼Æ¾Ú¬O¨C¬í5~10­Ó¤@ª½±µ¦¬¡A©Ò¥H§Ú­n¨C¤@¤ÀÄÁ(©Î¨C5¤ÀÄÁ)­pºâ³o¤@¤ÀÄÁ¤ºªº³Ì¤j­È¤Î³Ì¤p­È¡C¤U¦C¬O§Ú¼gªº¥¼§¹¦¨µ{¦¡½X¡A°Ñ¦Ò¬Ý¬Ý¡C
Public Class Form1
    Dim arr(200000) As String
    Dim advisecount As Integer
    Dim startindex As Integer
    Dim stopindex As Integer
    Dim mark_min As String
    Dim max As Integer = 0
    Dim min As Integer = 100
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Timer1.Interval = 1000
    End Sub
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Label3.Text = Format(Now, "hh:mm:ss") 'Åã¥Ü²{¦b®É¶¡
        Label4.Text = Now.Second + Now.Millisecond / 1000 'Åã¥Ü²{¦b¬í¼Æ+²@¬í
        advisecount += 1 '¨Ctick¤@¦¸´N¥[1
        Randomize() '¶Ã¼ÆºØ¤lªì©l¤Æ
        Dim rand As New Random '«Å§i¶Ã¼Æª«¥órand
        Dim x As Integer '©Ó±µrandª«¥ó²£¥Íªº¶Ã¼Æ

        x = rand.Next(1, 100)
        If x > max Then
            max = x
            Label5.Text = max
        ElseIf x < min Then
            min = x
            Label6.Text = min
        End If
        arr(advisecount) = x '©ñ¤Jarr°}¦C¤ñ¸û¤j¤p¥Î
        '°O¿ý"§Ç¸¹"¡A"®É¶¡"¡A"¶Ã¼Æ"
        TextBox1.Text &= Format(Now, "hh:mm:ss") & " @ " & Format(advisecount, "000000") & " => " & arr(advisecount) & vbNewLine
        TextBox1.SelectionStart = TextBox1.TextLength '³]©w´¡¤JÂI
        TextBox1.ScrollToCaret() '±N±²¶b±²¦Ü³Ì©³
        If TextBox1.TextLength > 10000 Then '¾A®É²MªÅ¥H§Kµ{¦¡­t¸ü¹L¤j
            TextBox1.Text = ""
        End If
        If Now.Second Mod 60 = 0 Then '·í¬í¼Æ¬°"00"®É§Y¤U¤@­Ó¤ÀÄÁªº¶}©l
            mark_min = Now.Minute
            startindex = advisecount
            Label1.Text = startindex
            Label7.Text = mark_min
        End If
        If Now.Minute > mark_min And Now.Second Mod 60 = 0 Then
            stopindex = advisecount
            Label2.Text = stopindex
        End If
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Timer1.Enabled = True
    End Sub
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Timer1.Enabled = False
    End Sub
End Class
i am kevenpeter

TOP

¥ÎVB.NET¡A¥éª©¥Dªºµ{¦¡¡C¥t¥~½Ð±Ð¤@¤U¡A¦pªG§Ú¨C¬íÀH¾÷²£¥Í¤@­Ó1~100¤§¶¡ªº¶Ã¼Æ¡A¦ý§Ú·Qª¾¹D¨Ò¦p9:00:00~9 ...
kevenpeter µoªí©ó 2011-6-19 09:28



    ¦n©_ ®ÉÄÁ¬°¤°»ò­n¥Î¶Ã¼Æ....

TOP

¥ÎVB.NET¡A¥éª©¥Dªºµ{¦¡¡C¥t¥~½Ð±Ð¤@¤U¡A¦pªG§Ú¨C¬íÀH¾÷²£¥Í¤@­Ó1~100¤§¶¡ªº¶Ã¼Æ¡A¦ý§Ú·Qª¾¹D¨Ò¦p9:00:00~9:01:00³o¬q´Á¶¡¤º©Ò²£¥Íªº¶Ã¼Æ³Ì¤j­È»P³Ì¤p­È¡A¸Ó«ç»ò¼g?

Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Timer1.Enabled = False
        Label1.Text = ""
    End Sub
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Timer1.Enabled = False
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Timer1.Enabled = True
    End Sub
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Timer1.Interval = 1
        Label1.Text = Now
    End Sub
End Class
i am kevenpeter

TOP

        ÀR«ä¦Û¦b : ·O´d¨S¦³¼Ä¤H¡A´¼¼z¤£°_·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD