StrataFrame Forum

Command Button does not recognise click event from mouse

http://forum.strataframe.net/Topic12862.aspx

By Fred Seider - 11/28/2007

OK, newbie here.  I have a MainForm that calls an AboutForm with AboutForm.ShowDialog()  Both forms are SFThemed Forms.  I added a button to the AboutForm, added a click event, and a me.Close(), but the button never catches the click event.  However, if I make the button active with the tab, I can press the return key and the Me.Close will execute.  If I do this with standard windows forms, as I have done forever, it works fine.

Something about the SF controls I need to know about?

Thanks,

By Trent L. Taylor - 11/28/2007

Something about the SF controls I need to know about?

I would have to look at your logic in the class, but there is nothing tricky about the SF buttons.  In fact, if you look at the Object Browser, you will see that it inherits off of the System.WIndows.Forms.Button.  The only additional logic is localization and data binding which would not affect this logic.

If you are running VB.NET, make sure that the method of the button has a Handles associated with the method.  Also, since you are calling the ShowDialog method you can also close the form by setting the DialogResult (also standard .NET).

DialogResult = OK

Do you have the same results when you call the DialogResult?  If you don't find the problem please post the logic of the button (including the handler) so that I can see what the logic looks like.  Thanks. Smile