-
Simulating button click event
I want to programmatically simulate a button being clicked. I know a button
has a PerformClick event but this doesn't perform the visualization of the
button being pressed. If you don't know what I mean, put a button on a form
and press the enter key. On key down, the button visually changes to give
a 'pressed' appearance. On key up, the appearance changes back to normal.
How do I do this programmatically?
Rich Golem
-
Re: Simulating button click event
Rich,
Try playing with the button's FlatStyle property. I noticed that when it
is set to flat it looks like the button is pressed in. Good luck, hope this
helps.
James
"Rich Golem" <Rich@Nospam.com> wrote:
>
>I want to programmatically simulate a button being clicked. I know a button
>has a PerformClick event but this doesn't perform the visualization of the
>button being pressed. If you don't know what I mean, put a button on a form
>and press the enter key. On key down, the button visually changes to give
>a 'pressed' appearance. On key up, the appearance changes back to normal.
>How do I do this programmatically?
>
>Rich Golem
-
Re: Simulating button click event
I know this may sound farfetched but you may want to try and move the mouse
cursor to where the button is located on your form and then use api to
perform a mouse click. Although that is alot of work for doing something
very simple.
"James" <wolfjj79@sbcglobal.net> wrote in message
news:3cb19082$1@10.1.10.29...
>
> Rich,
>
> Try playing with the button's FlatStyle property. I noticed that when it
> is set to flat it looks like the button is pressed in. Good luck, hope
this
> helps.
>
> James
>
>
>
> "Rich Golem" <Rich@Nospam.com> wrote:
> >
> >I want to programmatically simulate a button being clicked. I know a
button
> >has a PerformClick event but this doesn't perform the visualization of
the
> >button being pressed. If you don't know what I mean, put a button on a
form
> >and press the enter key. On key down, the button visually changes to give
> >a 'pressed' appearance. On key up, the appearance changes back to normal.
> >How do I do this programmatically?
> >
> >Rich Golem
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks