Hello
I teach basic computer skills and found that some students (people who never used computers before) are having trouble "mastering" basic mouse functions such as drag and drop. For that reason I wrote a very simple program that whould show them on the screen when the mouse mouse buttons are used.
I managed to do that from reading certain tutorials on the internet (I am not a programer) but I couldn't find anything about making it work with the desktop which means showing the mouse on the background (top right of the screen) while using the desktop.
here is the code:
(clppicture is a picture of the 3 mouse states - no button pressed, left button pressed and right button pressed)VB Code:
Private Sub Form_DblClick() pctBox.Picture = clppicture.GraphicCell(1) End Sub Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = vbLeftButton Then pctBox.Picture = clppicture.GraphicCell(Button) ElseIf Button = vbRightButton Then pctBox.Picture = clppicture.GraphicCell(Button) End If End Sub Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) Button = 0 pctBox.Picture = clppicture.GraphicCell(Button) End Sub
Any help whould be appreciated
thanks
Edit: Added [vbcode][/vbcode] tags for clairty. - Hack




Reply With Quote