473,412 Members | 2,092 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

Hidden form and button PerformClick

Form.Visible=False
Button1.PerformClick

It does not fire the Button1.Click event.
Why?

Oct 19 '06 #1
5 7181
Don't know. But why not just call the procedure that handles the click
directly?

i.e.

<pseudocode>

Form.Visible = False
Button1_Click(me, eventargs.empty)

</pseodocode>

Thanks,

Seth Rowe
st***********@hotmail.com wrote:
Form.Visible=False
Button1.PerformClick

It does not fire the Button1.Click event.
Why?
Oct 19 '06 #2

st***********@hotmail.com wrote:
Form.Visible=False
Button1.PerformClick

It does not fire the Button1.Click event.
Why?
Does it work if you leave the form visible?

Oct 19 '06 #3
<st***********@hotmail.comschrieb:
Form.Visible=False
Button1.PerformClick

It does not fire the Button1.Click event.
Why?
Read the documentation on 'Button.PerformClick'!

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Oct 19 '06 #4
Seth,
Don't know. But why not just call the procedure that handles the click
directly?
One of the biggest reasons I don't call & don't recommend calling the
procedure directly is that there may be multiple handlers for the event.

By calling the handlers directly you are coupling that code to the handlers
themselves. By calling PerformClick you are only coupled to the button
itself. The number of handlers is immaterial...
--
Hope this helps
Jay B. Harlow
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"rowe_newsgroups" <ro********@yahoo.comwrote in message
news:11**********************@k70g2000cwa.googlegr oups.com...
Don't know. But why not just call the procedure that handles the click
directly?

i.e.

<pseudocode>

Form.Visible = False
Button1_Click(me, eventargs.empty)

</pseodocode>

Thanks,

Seth Rowe
st***********@hotmail.com wrote:
>Form.Visible=False
Button1.PerformClick

It does not fire the Button1.Click event.
Why?
Oct 22 '06 #5
Yes. It work if the form visible.

za***@construction-imaging.com 写道:
st***********@hotmail.com wrote:
Form.Visible=False
Button1.PerformClick

It does not fire the Button1.Click event.
Why?
Does it work if you leave the form visible?
Oct 23 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Cary Linkfield | last post by:
I have a standard form I use. It inherits from Windows.Forms.Form. I usually add a Cancel button the form in the designer. I want to raise the Cancel button's Click event when the user presses...
4
by: touf | last post by:
Hi, How can I invoke by code a buttoin click event. I like to call the function that handles the button click. I'\ve seen the command RAISEEVENT but I didn't know how to use it ion this case....
20
by: anthonymelillo | last post by:
Is there a way to call a button click event from somewhere else ? I have a text box where I would like to call a button click event when a user presses enter in the text box. Can I do this ?...
2
by: eveready | last post by:
Hello I have two forms - a start form running in the background and a content form in the foreground. When a timer fires on the start form, I need to fire the click event for a button on the...
7
by: code100579 | last post by:
Hi there, sorry if this is a really simple question. I need to write code for: If a button is pushed and then one variety of other buttons is pushed then certain options on the program will...
2
by: Barney | last post by:
Hi, This is my first query in google groups. I expect to dont do it wrong, and excuse me for my english, i havent used it for years... Im making a user component that inherits from a textbox....
12
by: Thammarat charoenchai. | last post by:
Hi, I'm try to learn vb.net. in delphi have .click method for click button by coding. Can I do that with vb.net Thank you very much.
6
by: =?Utf-8?B?L2Rldi9udWxs?= | last post by:
Hello, i am using visual studio 2003 enterprise architect version. I am making apps for the .Net framework 1.1. While testing an interface, i discovered something strange. In this application...
6
by: dba | last post by:
using the following code with a problem.... echo "<input type='hidden' name='member_id' value=\"{$row}\">{$row}"; echo "<input type='radio' name='member_name' value=\"{$row}\">{$row}<br />"; ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.