﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Command Button does not recognise click event from mouse</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 15 Sep 2026 12:14:48 GMT</lastBuildDate><ttl>20</ttl><item><title>Command Button does not recognise click event from mouse</title><link>http://forum.strataframe.net/FindPost12862.aspx</link><description>OK, newbie here.&amp;nbsp; I have a MainForm that calls an AboutForm&amp;nbsp;with AboutForm.ShowDialog()&amp;nbsp; Both forms are SFThemed Forms.&amp;nbsp; I added a button to the AboutForm, added a click event, and a me.Close(), but the button never catches the click event.&amp;nbsp; However, if I make the button active with the tab, I can press the return key and the Me.Close will execute.&amp;nbsp; If I do this with standard windows forms, as I have done forever, it works fine.&lt;/P&gt;&lt;P&gt;Something about the SF controls I need to know about?&lt;/P&gt;&lt;P&gt;Thanks,</description><pubDate>Wed, 28 Nov 2007 22:16:11 GMT</pubDate><dc:creator>Fred Seider</dc:creator></item><item><title>RE: Command Button does not recognise click event from mouse</title><link>http://forum.strataframe.net/FindPost12865.aspx</link><description>[quote]Something about the SF controls I need to know about?[/quote]&lt;P&gt;I would have to look at your logic in the class, but there is nothing tricky about the SF buttons.&amp;nbsp; In fact, if you look at the Object Browser, you will see that it inherits off of the System.WIndows.Forms.Button.&amp;nbsp; The only additional logic is localization and data binding which would not affect this logic.&lt;/P&gt;&lt;P&gt;If you are running VB.NET, make sure that the method of the button has a Handles associated with the method.&amp;nbsp; Also, since you are calling the ShowDialog method you can also close the form by setting the DialogResult (also standard .NET).&lt;/P&gt;&lt;P&gt;[codesnippet]DialogResult = OK[/codesnippet]&lt;/P&gt;&lt;P&gt;Do you have the same results when you call the DialogResult?&amp;nbsp; 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.&amp;nbsp; Thanks. :)</description><pubDate>Wed, 28 Nov 2007 22:16:11 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>