Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

Make money selling software. Check this out here

Hosted clickbank mall. Check this out here




   Misc

   Amazon

   Links

    


Mouse Events
 

 

A mouse event is fired every time you do something with a mouse , if you click the mouse a Click Event fires , if you move the mouse a MouseMove event occurs , if you press a button down a MouseDown event occurs and when you release the button a MouseUp event occurs.

Not all of the controls support the MouseUp , MouseDown and MouseMove events .

Of course when you click on a mouse button in fact you generate more than just a Click event , you also generate a MouseDown event and a MouseUp event .

The syntax for MouseUp , MouseDown and MouseMoveis listed below

Syntax

Private Sub Control_MouseUp (Button As Integer , Shift As Integer , X As Single , Y As Single)

Private Sub Control_MouseDown (Button As Integer , Shift As Integer , X As Single , Y As Single)

Private Sub Control_MouseMove (Button As Integer , Shift As Integer , X As Single , Y As Single)

Private is the scope
Sub denotes a procedure
Control is the name of the control in which the event is fired
MouseUp / MouseDown are the event procedures
Button is an integer that denotes the mouse button or combination of mouse buttons .
Shift is an integer that reports whether the Alt , Shift or Control keys are held down.
x is the horizontal position of the mouse pointer
y is the vertical position of the mouse pointer

Mouse Button Values

Buttons pressed Parameter
left 1
right 2
left and right 3
middle 4
left and middle 5
right and middle 6
all 7

Shift Button values

Shift keys held parameter
Shift 1
Ctrl 2
Shift + Ctrl 3
Alt 4
Shift + Alt 5
Ctrl + Alt 6
Shift + Ctrl + Alt 7
 

 

 

 

 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
background effect(Javascript)
PI value(PHP)
select color changer(Javascript)
get windows system directory(VB)
displays the browser info(Javascript)
Round form(VB)
Read all lines in a file(ASP)
flashing status bar message(Javascript)

    




Copyright © 2003 by programmershelp.co.uk