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:
Private Sub UserControl_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Static intX As Integer Static intY As Integer If X > frmMain.linSeperator.X1 Then If Y < frmMain.linHSeperator.Y1 Then ' "Going Down The List" frmMain.Label1.Caption = "1 " & X & " " & Y If X > intX And Y > intY Then Call ScrollAdd ' "Going Up The List" If X < intX And Y < intY Then Call ScrollSubtract End If If Y > frmMain.linHSeperator.Y1 Then frmMain.Label1.Caption = "2 " & X & " " & Y ' "Going Up The List" If X > intX And Y < intY Then Call ScrollAdd ' "Going Down The List" If X < intX And Y > intY Then Call ScrollSubtract End If End If If X < frmMain.linSeperator.X1 Then If Y < frmMain.linSeperator.Y1 Then frmMain.Label1.Caption = "3 " & X & " " & Y ' "Going Down The List" If X > intX And Y < intY Then Call ScrollAdd ' "Going Up The List" If X < intX And Y > intY Then Call ScrollSubtract End If If Y > frmMain.linSeperator.Y1 Then frmMain.Label1.Caption = "4 " & X & " " & Y ' "Going Up The List" If X > intX And Y > intY Then Call ScrollSubtract ' "Going Down The List" If X < intX And Y < intY Then Call ScrollAdd End If End If intX = X 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





Reply With Quote