Results 1 to 5 of 5

Thread: [RESOLVED] Weird Problem

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2005
    Location
    Toronto, Canada
    Posts
    357

    Resolved [RESOLVED] Weird Problem

    Hi,
    I was just trying to make this program for the fun of it... and I wanted to add a clickwheel control to it.
    I am trying to detect the motions by dividing the UserControl (i.e the Clickwheel) into four quarters and there will be two types of motions per quarter. However, for some reason wherever I move the mouse over the UserControl, it always goes to the third If condition (Top Left Quarter)... I am using the following code... if someone can help me.. I would really appreciate it...

    VB Code:
    1. Private Sub UserControl_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    2.     Static intX As Integer
    3.     Static intY As Integer
    4.    
    5.     If X > frmMain.linSeperator.X1 Then
    6.         If Y < frmMain.linHSeperator.Y1 Then
    7.             ' "Going Down The List"
    8.             frmMain.Label1.Caption = "1 " & X & " " & Y
    9.             If X > intX And Y > intY Then Call ScrollAdd
    10.             ' "Going Up The List"
    11.             If X < intX And Y < intY Then Call ScrollSubtract
    12.         End If
    13.         If Y > frmMain.linHSeperator.Y1 Then
    14.             frmMain.Label1.Caption = "2 " & X & " " & Y
    15.             ' "Going Up The List"
    16.             If X > intX And Y < intY Then Call ScrollAdd
    17.             ' "Going Down The List"
    18.             If X < intX And Y > intY Then Call ScrollSubtract
    19.         End If
    20.     End If
    21.     If X < frmMain.linSeperator.X1 Then
    22.         If Y < frmMain.linSeperator.Y1 Then
    23.             frmMain.Label1.Caption = "3 " & X & " " & Y
    24.             ' "Going Down The List"
    25.             If X > intX And Y < intY Then Call ScrollAdd
    26.             ' "Going Up The List"
    27.             If X < intX And Y > intY Then Call ScrollSubtract
    28.         End If
    29.         If Y > frmMain.linSeperator.Y1 Then
    30.         frmMain.Label1.Caption = "4 " & X & " " & Y
    31.             ' "Going Up The List"
    32.             If X > intX And Y > intY Then Call ScrollSubtract
    33.             ' "Going Down The List"
    34.             If X < intX And Y < intY Then Call ScrollAdd
    35.         End If
    36.     End If
    37.  
    38.     intX = X
    39.     intY = Y

    If you want to take a look at the project... I have attached it... I have just begun... so it isn't that great...

    Any help would be appreciated.
    Khanjan
    Attached Files Attached Files
    Hey... If you found this post helpful please rate 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
  •  



Click Here to Expand Forum to Full Width