﻿<?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?)  » Wierdness in new SF Windows App</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 17:44:34 GMT</lastBuildDate><ttl>20</ttl><item><title>Wierdness in new SF Windows App</title><link>http://forum.strataframe.net/FindPost2345.aspx</link><description>I created a new SF Windows App, added a few controls and bo's and hit run and got a complaint about:&lt;br&gt;
&lt;br&gt;
        private static void InitApplication(InitializingApplicationEventArgs e)&lt;br&gt;
        {&lt;br&gt;
            //-- Add the main form type&lt;br&gt;
            //-- If more than one form is added to the collection, they can be chosen by showing a "Gateway" form&lt;br&gt;
            //   and supplying the index of the form to show (At least 1 form type must be added to the collection&lt;br&gt;
            e.Forms.Add(typeof(MainForm.ResultSetBuilder));&lt;br&gt;
&lt;br&gt;
            //-- ToDo:  Add any extra application initialization&lt;br&gt;
            MicroFour.StrataFrame.UI.Localization.MessageKeyType = MicroFour.StrataFrame.Messaging.MessageKeyDataType.XML;&lt;br&gt;
            MicroFour.StrataFrame.UI.Localization.MessageLocaleID = MicroFour.StrataFrame.UI.Localization.GetActiveLanguage("ResultSetBuilder", "", false); ;&lt;br&gt;
        }&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
The project is named ResultSetBuilder and the form is named MainForm.&lt;br&gt;
I don't understand why the code generator put this:&lt;br&gt;
MainForm.ResultSetBuilder&lt;br&gt;
&lt;br&gt;
in the e.Forms.Add&lt;br&gt;
&lt;br&gt;
Removing the .ResultSetBuilder obviously resolves the runtime error.</description><pubDate>Wed, 23 Aug 2006 08:54:47 GMT</pubDate><dc:creator>Daniel Essin</dc:creator></item><item><title>RE: Wierdness in new SF Windows App</title><link>http://forum.strataframe.net/FindPost2395.aspx</link><description>Yes, I've seen the C# refactor do some strange things... it only guarantees that the renaming will complete successfully if the project can successfully build and has been built recently.</description><pubDate>Wed, 23 Aug 2006 08:54:47 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Wierdness in new SF Windows App</title><link>http://forum.strataframe.net/FindPost2387.aspx</link><description>I'll try again. Probably just a fluke.&lt;br&gt;
Thanks.</description><pubDate>Tue, 22 Aug 2006 19:50:49 GMT</pubDate><dc:creator>Daniel Essin</dc:creator></item><item><title>RE: Wierdness in new SF Windows App</title><link>http://forum.strataframe.net/FindPost2354.aspx</link><description>I'm not sure exactly what happened either... when you add a new SF winforms app, the template for that line of code looks like this:&lt;/P&gt;&lt;P&gt;e.Forms.Add(typeof($safeprojectname$.Form1));&lt;/P&gt;&lt;P&gt;So, the project name (which is the default namespace) would be put first, and then the text "Form1" would be put.&amp;nbsp; Since "Form1" is not anywhere to be seen in the code that you posted, I can only assume that the line was modified by hand after the project was created, or that the C# refactor tool failed to properly rename the form from Form1 to MainForm.</description><pubDate>Tue, 22 Aug 2006 09:23:16 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>