Reply
can i generate mouse events through code.
Old 01-24-2007, 02:22 AM can i generate mouse events through code.
Average Talker

Posts: 28
Name: dinesh s
hi,
can i generate mouse button click evets through coding.


plz help me ....
dinesh s is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 01-24-2007, 10:56 PM Re: can i generate mouse events through code.
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,025
Name: Forrest Croce
Location: Seattle, WA
That depends how the system you're working on is set up. Do you actually need to make the mouse click something through code, or just run the code that handles the click event? Assuming it's the latter, on the same page, you can pas null ( or nothing in VB ) to the method that handles the click event, like this:

Code:
   ...
   button1_Click(null, null);
   ...

   protected void button1_Click(object sender, EventArgs e) {
      if(sender != null)
         ...
   }

If you're trying to simulate a click to something besides your page, that gets harder ... and we need to know what to be able to offer any good advice.
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 01-25-2007, 01:26 AM Re: can i generate mouse events through code.
Average Talker

Posts: 28
Name: dinesh s
hi forrestcroc
the menu which appears when we click the right mouse button should automatically apears when the page is loading or when someother event occurs(eg. when we click the middle mouse button).
This is what i want.

Last edited by dinesh s : 01-25-2007 at 05:33 AM.
dinesh s is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to can i generate mouse events through code.
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12155 seconds with 13 queries