Advertisement
Guest User

Untitled

a guest
May 30th, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.89 KB | None | 0 0
  1. Public Class Form1
  2.     Dim change As Integer
  3.     Dim number As Integer
  4.     Sub delay()
  5.         Dim Start As Integer = Environment.TickCount()
  6.         Dim TimeLast As Integer = 2000000
  7.         Do
  8.             If Environment.TickCount() - Start > TimeLast Then Exit Do
  9.             Application.DoEvents()
  10.         Loop
  11.     End Sub
  12.     Sub delay1()
  13.         Dim Start As Integer = Environment.TickCount()
  14.         Dim TimeLast As Integer = 20000
  15.         Do
  16.             If Environment.TickCount() - Start > TimeLast Then Exit Do
  17.             Label1.Text = Rnd() * 10000000
  18.             Application.DoEvents()
  19.  
  20.         Loop
  21.     End Sub
  22.  
  23.     Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
  24.  
  25.         Dim OpenFileDialog As New OpenFileDialog
  26.         OpenFileDialog.InitialDirectory = My.Computer.FileSystem.SpecialDirectories.MyDocuments
  27.         OpenFileDialog.Filter = "zip (*.zip)|*.zip"
  28.         If (OpenFileDialog.ShowDialog(Me) = System.Windows.Forms.DialogResult.OK) Then
  29.             Dim FileName As String = OpenFileDialog.FileName
  30.             TextBox1.Text = FileName
  31.         End If
  32.     End Sub
  33.  
  34.     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  35.         delay1()
  36.         If change = 1 Then
  37.  
  38.  
  39.             Label1.Text = 7896543
  40.             MsgBox("您的密碼是:7896543")
  41.         ElseIf change = 2 Then
  42.             Label1.Text = 7788996
  43.             MsgBox("您的密碼是7788996")
  44.  
  45.         End If
  46.  
  47.  
  48.     End Sub
  49.  
  50.     Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton1.CheckedChanged
  51.         change = 1
  52.     End Sub
  53.  
  54.     Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton2.CheckedChanged
  55.         change = 2
  56.     End Sub
  57.  
  58.     Private Sub Label2_Click(sender As Object, e As EventArgs) Handles Label2.Click
  59.  
  60.     End Sub
  61. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement