ياشباب أنا سويت برنامج بسيط و لما نفذته طلعت لي نتائج غير متوقعه
البرنامج فيه:
image & timer on the form
وهذا الكود
Private Sub Form_Load()
' Adjust the image's location
imgrooze.Left = 0 ' Number of twips from left of Form window
imgrooze.Top = 3820 ' Number of twips from top of Form window
End Sub
Private Sub tmrani_Timer()
'Adjust the Left and Top properties as well as the rooze shown so
' that the rooze appears to float upand across the Form window.
' The first time you declare a Static Boolean
' variable, VB initializes it to False
Static blnFace As Boolean
On Error Resume Next
' Add to Left and Top only if room is left
If (imgrooze.Left < 4800) And (imgrooze.Top > 500) Then
imgrooze.Left = imgrooze.Left + 100
imgrooze.Top = imgrooze.Top - 50
Else
imgrooze.Left = 0 ' Restore image's first position
imgrooze.Top = 3820
End If
' Change the image displayed
If blnFace = True Then
imgrooze.Picture = LoadPicture("C:\My Documents\My Pictures\rooz1.jpeg")blnFace = False
Else
imgrooze.Picture = LoadPicture("C:\My Documents\My Pictures\rooz3.jpeg")blnFace = True
End If
Err.Clear
End Sub
النتيجه انه حمل الصوره المضبوطه في خاصية
picture
ولا حمل اي صوره من الحدث
Timer
اضافه الى ذلك اذا شلت الكود
On Error Resume Next
Err.Clear
تطلع لي رساة خطأ عند التنفيذ
وش المشكله في الكود علما ان مسار الصور صحيح ميه بالميه
أرجو ممن عنده الخبره الافاده
تحياتي للجميع