[VB6] - simulation click on IDE-VBForums
Results 1 to 4 of 4

Thread: [VB6] - simulation click on IDE

  1. #1

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    2,915

    [VB6] - simulation click on IDE

    i know that i can activate a timer on IDE(it's the few of events that we can use on IDE).
    Code:
    Private Sub tmrIDEScrollClick_Timer()
        Call GetCursorPos(MousePositions)
        If MousePositions.x = ScrollingVertical.Left Then MsgBox ""
    End Sub
    (these is my code test)
    but i recive an error message: "error 53": file path no found: user". to be honest i don't know what these error message have to do lol
    i need some sugestions. thanks
    VB6 2D Sprite control

    To live is difficult, but we do it.

  2. #2

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    2,915

    Re: [VB6] - simulation click on IDE

    ok.. i put it to work:
    Code:
    Private Sub tmrIDEScrollClick_Timer()
        If Ambient.UserMode = True Then tmrIDEScrollClick.Enabled = False
        'Vertical scroll
        If CollisionPrecise(MouseX(UserControl.hWnd), MouseY(UserControl.hWnd), 1, 1, ScrollingVertical.Left, 0, 17, 17) = True And GetKeyState(VK_LBUTTON) < 0 Then
            If ScrollingVertical.Value - 10 <= ScrollingVertical.Min Then
                ScrollingVertical.Value = ScrollingVertical.Min
            Else
                ScrollingVertical.Value = ScrollingVertical.Value - 10
            End If
        ElseIf CollisionPrecise(MouseX(UserControl.hWnd), MouseY(UserControl.hWnd), 1, 1, ScrollingVertical.Left, ScrollingVertical.Height - 17, 17, 17) = True And GetKeyState(VK_LBUTTON) < 0 Then
            If ScrollingVertical.Value + 10 >= ScrollingVertical.Max Then
                ScrollingVertical.Value = ScrollingVertical.Max
            Else
                ScrollingVertical.Value = ScrollingVertical.Value + 10
            End If
        'Horizontal scroll
        ElseIf CollisionPrecise(MouseX(UserControl.hWnd), MouseY(UserControl.hWnd), 1, 1, 0, ScrollingHorizontal.Top, 17, 17) = True And GetKeyState(VK_LBUTTON) < 0 Then
            If ScrollingHorizontal.Value - 10 <= ScrollingHorizontal.Min Then
                ScrollingHorizontal.Value = ScrollingHorizontal.Min
            Else
                ScrollingHorizontal.Value = ScrollingHorizontal.Value - 10
            End If
        ElseIf CollisionPrecise(MouseX(UserControl.hWnd), MouseY(UserControl.hWnd), 1, 1, ScrollingHorizontal.Width - 17, ScrollingHorizontal.Top, 17, 17) = True And GetKeyState(VK_LBUTTON) < 0 Then
            If ScrollingHorizontal.Value + 10 >= ScrollingHorizontal.Max Then
                ScrollingHorizontal.Value = ScrollingHorizontal.Max
            Else
                ScrollingHorizontal.Value = ScrollingHorizontal.Value + 10
            End If
        End If
    End Sub
    the code works fine. but i still with 1 problem. every timers that i used in my controls and are activated in IDE i see 1 bug.
    when we write object.propertyname is showed a problem. the dot show us the property\method list, but the timer can hide these list. can i avoid these bug?
    VB6 2D Sprite control

    To live is difficult, but we do it.

  3. #3

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    2,915

    Re: [VB6] - simulation click on IDE

    can i create a variable for controle the usercontrol?
    (in these case i need a public in a module)
    VB6 2D Sprite control

    To live is difficult, but we do it.

  4. #4

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    2,915

    Re: [VB6] - simulation click on IDE

    can anyone tell me what usercontrol events works on IDE?
    VB6 2D Sprite control

    To live is difficult, but we do it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.