Thread: dzEventsMagic
View Single Post
  #26 (permalink)  
Old 08-13-2008, 01:32 PM
Byak@'s Avatar
Byak@ Byak@ is offline
Senior Member
 
Join Date: Jul 2008
Posts: 139
Send a message via ICQ to Byak@
Default

dzt thanks for ypu libs

i'm wright little sample.
moving image.
dzt help optimizing it please))

Code:
Sub Globals
xx=0
yy=0
End Sub

Sub App_Start
dzem.New1("Image1", false)
bit.New1
dzem.Hook(512)
Form1.Show
End Sub


Sub Form1_Close
dzem.UnHook(512)
End Sub

Sub dzem_MagicEvent
Dim LowWord, HighWord, X, Y
LowWord = bit.OR2(dzem.lParam, 4294901760)
X = bit.XOR2(LowWord, 4294901760)
HighWord = bit.OR2(dzem.lParam, 65535)
Y = bit.XOR2(HighWord, 65535)/2^16
If x>xx+5 Then
image1.Left=image1.Left+5
End If
form1.Refresh
If x<xx-5 Then
image1.Left=image1.Left-5
End If
form1.Refresh
If y>yy+5 Then
image1.Top=image1.Top+5
End If
form1.Refresh
If y<yy-5 Then
image1.Top=image1.Top-5
End If
form1.Refresh
yy=y
xx=x
End Sub
and i'm write scrolling textbox))
Attached Files
File Type: sbp moveimage.sbp (1.1 KB, 11 views)
File Type: sbp scrolltextbox.sbp (2.6 KB, 9 views)
Reply With Quote