mouse movement

hehe that was my next step. I was so happy I got it to move I forgot all about the click part....So can you help me out on this one?
 
I know the feeling.

I don't know how to send a mouse click to the application but you can programatically click a button or select an item in a listbox ext.

Here is an example for a button.
Button bu=new Button;
bu.PerformClick();

There probably is a windows message you can send to the form that will simulate a click using the Api SendMessage but I have never done that.

I have a list of the windows messages if you want that.
 
actually i just really want to have a program that can disconnect me from the internet and since nobody can tell me how on my other post I thought this would be a good temporary solutoin...Of course I would rather have some code to simply to drop the connection so if you or anybody else could advise me on it I will be very pleased:D
 
sorry for being so annoying buy I am very new to vb and I really tried fixing it to work but it doesnt seem to respont properly. I have to coordinates on which I want to click. One with right click and one with left. on that site there seems to be alot of extra code I dont need. Could you maybe show me a better example of what I need. I also did a bit mroe research and found that maybe its possible to use mouse_event. But again the example is ony for vb6 and it doesnt seem to work on .net.
Please help me!!!
 
If you want to use mouse_event this the simplest example:
Visual Basic:
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, ByVal dwExtraInfo As Integer)
Const MOUSEEVENTF_LEFTDOWN = &H2
Const MOUSEEVENTF_LEFTUP = &H4
Const MOUSEEVENTF_MOVE = &H1
mouse_event(MOUSEEVENTF_MOVE, x-axiscoord, yaxiscoord, 0, 0)
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
 
Back
Top