garibashena
27-06-2008, 15:51
سلام دوستان من خودم چند تا برنامه نوشتم فکر کنم از صبح ساعت 8 تا خود الان پای سیستم هستم دیگه دارم هنگ می کنم :41: یکی این برنامرو واسم کامل کنه احتیاجش دارم :10:
سه تا image روی فرم باشه و هر 10 ثانیه یه بار image غیر فعل بشه و image بعدی جایگزین بشه
[ برای مشاهده لینک ، لطفا با نام کاربری خود وارد شوید یا ثبت نام کنید ]
Dim start As Boolean
Dim time As Byte
Dim msg As Integer
Dim x As Byte
Private Sub Command1_Click()
start = True
If Command1.Caption = "stop" Then
start = False
Command1.Caption = "start"
End If
End Sub
Private Sub Command2_Click()
CommonDialog1.ShowOpen
Image1(x).Picture = LoadPicture(CommonDialog1.FileName)
x = x + 1
If x > 2 Then x = 0
Image1(x).Picture = LoadPicture(CommonDialog1.FileName)
End Sub
Private Sub Form_Load()
time = 30
start = False
x = 0
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If (KeyAscii < 48 Or KeyAscii > 58) And (KeyAscii <> 8 And KeyAscii <> 13) Then KeyAscii = 0
If KeyAscii = 13 Then
start = True
Timer1.Interval = Text1.Text
End If
End Sub
Private Sub Timer1_Timer()
If start = True Then
Command1.Caption = "stop"
time = time - 1
Label1.Caption = time
If time = 0 Then
start = False
msg = MsgBox("end time other game", vbYesNo)
If msg = vbYes Then
time = 30
Label1.Caption = 30
Else
start = False
End If
End If
End If
End Sub
سه تا image روی فرم باشه و هر 10 ثانیه یه بار image غیر فعل بشه و image بعدی جایگزین بشه
[ برای مشاهده لینک ، لطفا با نام کاربری خود وارد شوید یا ثبت نام کنید ]
Dim start As Boolean
Dim time As Byte
Dim msg As Integer
Dim x As Byte
Private Sub Command1_Click()
start = True
If Command1.Caption = "stop" Then
start = False
Command1.Caption = "start"
End If
End Sub
Private Sub Command2_Click()
CommonDialog1.ShowOpen
Image1(x).Picture = LoadPicture(CommonDialog1.FileName)
x = x + 1
If x > 2 Then x = 0
Image1(x).Picture = LoadPicture(CommonDialog1.FileName)
End Sub
Private Sub Form_Load()
time = 30
start = False
x = 0
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If (KeyAscii < 48 Or KeyAscii > 58) And (KeyAscii <> 8 And KeyAscii <> 13) Then KeyAscii = 0
If KeyAscii = 13 Then
start = True
Timer1.Interval = Text1.Text
End If
End Sub
Private Sub Timer1_Timer()
If start = True Then
Command1.Caption = "stop"
time = time - 1
Label1.Caption = time
If time = 0 Then
start = False
msg = MsgBox("end time other game", vbYesNo)
If msg = vbYes Then
time = 30
Label1.Caption = 30
Else
start = False
End If
End If
End If
End Sub