﻿<?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?)  » Hooking into my app before creation...</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 05:46:25 GMT</lastBuildDate><ttl>20</ttl><item><title>Hooking into my app before creation...</title><link>http://forum.strataframe.net/FindPost2180.aspx</link><description>I have another DLL that needs to hook into my app before its created/initialized. Notice the bold text below... is this where I would put it?&lt;br&gt;
&lt;br&gt;
Public NotInheritable Class AppMain&lt;br&gt;
&lt;br&gt;
    &lt;STAThread()&gt; _&lt;br&gt;
    Public Shared Sub Main()&lt;br&gt;
        '-- Enable the visual styles&lt;br&gt;
        System.Windows.Forms.Application.EnableVisualStyles()&lt;br&gt;
&lt;br&gt;
        '-- Add the handlers for the application events&lt;br&gt;
        AddHandler StrataFrameApplication.ShowGateway, AddressOf ShowGateway&lt;br&gt;
        AddHandler StrataFrameApplication.InitializingApplication, AddressOf InitApplication&lt;br&gt;
        AddHandler StrataFrameApplication.SetDataSources, AddressOf SetDataSources&lt;br&gt;
        AddHandler StrataFrameApplication.UnhandledExceptionFound, AddressOf UnhandledExceptionFound&lt;br&gt;
        AddHandler StrataFrameApplication.ShowLoginAndInitializeForm, AddressOf ShowLoginAndInitMainForm&lt;br&gt;
&lt;br&gt;
[b] My other code here?[/b]&lt;br&gt;
&lt;br&gt;
        '-- Run the application&lt;br&gt;
        StrataFrameApplication.RunApplication()&lt;br&gt;
&lt;br&gt;
        '-- Forcibly close the application to stop message pumps from looping and preventing the application &lt;br&gt;
        '   from closing&lt;br&gt;
        End&lt;br&gt;
    End Sub&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
P.S. Is that the right terminology? Hooking into the app before it's created? &lt;br&gt;
&lt;br&gt;
Thanks</description><pubDate>Mon, 14 Aug 2006 13:29:03 GMT</pubDate><dc:creator>StarkMike</dc:creator></item><item><title>RE: Hooking into my app before creation...</title><link>http://forum.strataframe.net/FindPost2181.aspx</link><description>It depends on what you are attempting to accomplish.&amp;nbsp; If you need to show a form before a logon form, then no, you would want to put it higher up.&amp;nbsp; But it you are just wanted to execute code before the application is placed in a "wait" state, then this owuld work.&amp;nbsp; Really the best place to add additional code is the InitApplication&amp;nbsp; or ShowLogonAndInitMainForm methods.&amp;nbsp; But what you have there will work fine.</description><pubDate>Mon, 14 Aug 2006 13:29:03 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>