|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Hidden form and button PerformClickForm.Visible=False
Button1.PerformClick It does not fire the Button1.Click event. Why? 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 stevenhaoc***@hotmail.com wrote: Show quoteHide quote > Form.Visible=False > Button1.PerformClick > > It does not fire the Button1.Click event. > Why? Seth,
> Don't know. But why not just call the procedure that handles the click One of the biggest reasons I don't call & don't recommend calling the > directly? 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... -- Show quoteHide quoteHope this helps Jay B. Harlow ..NET Application Architect, Enthusiast, & Evangelist T.S. Bradley - http://www.tsbradley.net "rowe_newsgroups" <rowe_em***@yahoo.com> wrote in message news:1161283342.869749.231940@k70g2000cwa.googlegroups.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 > > > stevenhaoc***@hotmail.com wrote: >> Form.Visible=False >> Button1.PerformClick >> >> It does not fire the Button1.Click event. >> Why? > stevenhaoc***@hotmail.com wrote:
> Form.Visible=False Does it work if you leave the form visible?> Button1.PerformClick > > It does not fire the Button1.Click event. > Why? Yes. It work if the form visible.
za***@construction-imaging.com 写é“: Show quoteHide quote > stevenhaoc***@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? <stevenhaoc***@hotmail.com> schrieb:
> Form.Visible=False Read the documentation on 'Button.PerformClick'!> Button1.PerformClick > > It does not fire the Button1.Click event. > Why? -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Config file for DLL??
Why isnt this CLS compliant? Searching desparately for createmailslot example in VB.NET (MSDN universal Subscriber) Show ToolTip on every Control continuously listview My.Settings wont update?? determining current winform application is active, has focus or being used Compressing textfiles, but still read them changing book for study how to find out if a form is invoked by splash |
|||||||||||||||||||||||