dzEventsMagic

Discussion in 'Additional Libraries' started by dzt, Aug 28, 2007.

  1. specci48

    specci48 Well-Known Member Licensed User

    :sign0156:


    Two thumbs up! :sign0098:

    specci48
     
  2. dzt

    dzt Active Member Licensed User

    One more sample.

    How to get X,Y coordinates of mouse down (or tap) and mouse up events on a control (for example Image control), using dzEventsMagic and BitWise library.

    See attached code file.
     

    Attached Files:

    Last edited: Dec 21, 2007
  3. RandomCoder

    RandomCoder Well-Known Member Licensed 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
     
  4. mamuen

    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?
     
  5. dzt

    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
     

    Attached Files:

    Last edited: Jun 7, 2008
  6. Byak@

    Byak@ Active Member Licensed User

    dzt thanks for ypu libs:sign0188:

    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:

  7. tsteward

    tsteward Active Member Licensed User

  8. Byak@

    Byak@ Active Member Licensed User

  9. tsteward

    tsteward Active Member Licensed User

    Please explain?
     
  10. Byak@

    Byak@ Active Member Licensed User

    webbrowser doesn't have programming scroll
     
  11. eww245

    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
     
  12. corwin42

    corwin42 Expert Licensed User

    Is there a possibility to get the Control the dzEventsMagic Object is assigned to?

    Following Example:

    Code:
    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
     
  13. Cableguy

    Cableguy Expert Licensed 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..
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice