dzEventsMagic

RandomCoder

Well-Known Member
Licensed User
Longtime User
@DZT,

Thanks for pointing this great library out to me.
I've had a play and got some thing working but from this I have two questions....
1) Have you a list of parameters for each of the messages listed at the start of this thread? How are we to know what lparam and wparam contain?
2) Is it possible to have a simple click event? I've searched through the messages and there are several mouse related messages but none specific to a single click (unless I've missed it). Does this mean that I have to program by own by combining the mousedown and mouseup with a time delay?

The reason for question 2 is that I have a treeview control with a context menu already working but using mousedown on its own prevents the context menu from displaying as there is no way to know if the user has mearly tapped the screen or tapped and held.

Thanks,
RandomCoder
 

mamuen

Member
Licensed User
dzEventsMagic and Sprite.dll

Hi,

i want to control sprites with the arrowkey on my device, using dzEventsMagic.dll and sprite.dll with no success. Form1 never receive
an event. Any ideas?
 

dzt

Active Member
Licensed User
Hi,

@RandomCoder
:sign0013:
I've just seen you questions.
1. No I don't. Google and you will find MSDN articles and others. Or ask if I can help
2. No unfortunately there is not a "single click event"

@mamuen
The Moving Label sample does not work in this case because the GameWindow is a "focusable" control and the Form loses the focus.
See the attached modified SpriteExample showing a workaround. It needs dzEventsMagic.dll, dzEventsMagicDesktop.dll and sprite.dll
 

Attachments

  • SpriteExample.zip
    75.1 KB · Views: 48
Last edited:

Byak@

Active Member
Licensed User
dzt thanks for ypu libs:sign0188:

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

B4X:
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))
 

Attachments

  • moveimage.sbp
    1.1 KB · Views: 21
  • scrolltextbox.sbp
    2.6 KB · Views: 22

Byak@

Active Member
Licensed User
tsteward
user_offline.gif
it's not real :-(
 

Byak@

Active Member
Licensed User
webbrowser doesn't have programming scroll
 

eww245

Member
Licensed User
KeyBoard hook proc

Can WH_KEYBOARD hookstruct be called with dzmagic. I'm trying to create a hook to lock all keys on the device. Not just on the form or a control, but Hook the keys from WM itself.

I've tried hardware lib, it works but not with Long keypress, and F3 F4 F6 F7 (End End Volume)
Door is too tough to deal with. I don't think it would work either


Thanks for the great lib
 

corwin42

Expert
Licensed User
Longtime User
Is there a possibility to get the Control the dzEventsMagic Object is assigned to?

Following Example:

B4X:
Sub App_Start
   AddObject("emLStart", "dzEventsMagic")
   AddObject("emLEnde", "dzEventsMagic")
   AddObject("emLDauer", "dzEventsMagic")

   emLStart.New1("lStartTime", False)
   emLEnde.New1("lEndeTime", False)
   emLDauer.New1("lDauer", False)

   emLStart.Hook(514)
   emLEnde.Hook(514)
   emLDauer.Hook(514)

   AddEvent("emLStart",MagicEvent,"emTimeSelect_Magic")
   AddEvent("emLEnde",MagicEvent,"emTimeSelect_Magic")
   AddEvent("emLDauer",MagicEvent,"emTimeSelect_Magic")

   fEdit.Show
End Sub

Sub emTimeSelect_Magic
   Msgbox(Sender)
End Sub

lStartTime, lEndeTime and lDauer are labels and I want to get an event when the user clicks on them.

Is there a simple way to get the Control name of the clicked label in the emTimeSelect_Magic Sub?

Thanks,
Markus
 

Cableguy

Expert
Licensed User
Longtime User
To use a click event with a label, try the linklabel dll...
No need to use dztmagics for that, even the door lib is usable..
 
Top