c# - MOUSE clicks replaying -


here brief background of project , have done far:

i working on program in actions performed in form replayed. have done far captured cursor positions , clicks , saved them in database (requirement of project). when replay it, tells through message box mouse left click or right click. have multiple forms ( parent , child, using mdi, linked).

my problem:

when replay, want events perform again. if button clicked , form opened, want happen again. , program should tell on form on.

my program shows mouse movement , clicks not perform action (e.g. if while recording pressed button, , replay later, tells mouse left click, not click button)

public void display_one(int i) {     cursor.position = new system.drawing.point(temporary[i].mousepositionx, temporary[i].mousepositony);     if (temporary[i].mouserightclick)     {         messagebox.show("right click");         mouserightclick();     }     if (temporary[i].mouseleftclick)     {         messagebox.show("left click");         mouseleftclick();     } }  public void mouseleftclick() {     mouse_event(mouseeventf_leftdown, 0, 0, 0, 0);     thread.sleep(50);     mouse_event(mouseeventf_leftup, 0, 0, 0, 0); }  public void mouserightclick() {     mouse_event(mouseeventf_rightdown , 0, 0, 0, 0);     thread.sleep(50);     mouse_event(mouseeventf_rightup, 0, 0, 0, 0); } 


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -