﻿<?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?)  » Simulating Clicking on New/Edit buttons on MFTS</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sun, 05 Apr 2026 18:10:20 GMT</lastBuildDate><ttl>20</ttl><item><title>Simulating Clicking on New/Edit buttons on MFTS</title><link>http://forum.strataframe.net/FindPost9411.aspx</link><description>In my form constructor I passing the initial editing state&amp;nbsp;for the form. What event should I be&amp;nbsp;adding my code to change the editing state based on my parameter, so it maintains the same functionality as clicking on New or Edit button.&lt;/P&gt;&lt;P&gt;Right now I have my code in the ParentFormLoading event of my primary business object. It does&amp;nbsp;change the editing state correctly,&amp;nbsp;but it will not honor the form properties 'FocusControlOnAdd and FocusControlOnEdit'.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tim</description><pubDate>Fri, 08 Jun 2007 13:34:04 GMT</pubDate><dc:creator>Tim Dol</dc:creator></item><item><title>RE: Simulating Clicking on New/Edit buttons on MFTS</title><link>http://forum.strataframe.net/FindPost9440.aspx</link><description>Your suggestion worked fine.&amp;nbsp; :)&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Tim</description><pubDate>Fri, 08 Jun 2007 13:34:04 GMT</pubDate><dc:creator>Tim Dol</dc:creator></item><item><title>RE: Simulating Clicking on New/Edit buttons on MFTS</title><link>http://forum.strataframe.net/FindPost9416.aspx</link><description>Yeah, and this actually won't work correctly when the form is loading due to the initialization sequence.&amp;nbsp; All I would do is look at the FocusControlOnAdd or FocusControlOnEdit property and do this yourself.&lt;/P&gt;&lt;P&gt;[codesnippet]If me.FocusControlOnAdd IsNot Nothing Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; me.FocusControlOnAdd.Focus()&lt;BR&gt;End If[/codesnippet]&lt;/P&gt;&lt;P&gt;You may need to do this in the Shown event of the form in order to make this work properly with the Focus().</description><pubDate>Thu, 07 Jun 2007 15:14:00 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Simulating Clicking on New/Edit buttons on MFTS</title><link>http://forum.strataframe.net/FindPost9414.aspx</link><description>That's exactly what I'm doing, and it does seem to work, except for setting focus on the assigned control. I tried my code in a number of events, including the Form Load event.&amp;nbsp; Do you happen to know if there is an Form event that gets fired when all business objects and form stuff has been completed?</description><pubDate>Thu, 07 Jun 2007 14:52:13 GMT</pubDate><dc:creator>Tim Dol</dc:creator></item><item><title>RE: Simulating Clicking on New/Edit buttons on MFTS</title><link>http://forum.strataframe.net/FindPost9413.aspx</link><description>Well, all you really need to do is call the Edit() or Add() on the form and it will do the same thing as clicking the New or Edit on the MaintenanceFormToolstrip.&amp;nbsp; So just pass over your parm, and if it is add, then just call the Add() on the form and it will do the same thing as the MFToolstrip.</description><pubDate>Thu, 07 Jun 2007 14:15:28 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>