StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Hooking into my app before creation...Expand / Collapse
Author
Message
Posted 08/14/2006 1:24:29 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 07/09/2008 2:20:16 PM
Posts: 436, Visits: 944
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?

Public NotInheritable Class AppMain

_
Public Shared Sub Main()
'-- Enable the visual styles
System.Windows.Forms.Application.EnableVisualStyles()

'-- Add the handlers for the application events
AddHandler StrataFrameApplication.ShowGateway, AddressOf ShowGateway
AddHandler StrataFrameApplication.InitializingApplication, AddressOf InitApplication
AddHandler StrataFrameApplication.SetDataSources, AddressOf SetDataSources
AddHandler StrataFrameApplication.UnhandledExceptionFound, AddressOf UnhandledExceptionFound
AddHandler StrataFrameApplication.ShowLoginAndInitializeForm, AddressOf ShowLoginAndInitMainForm

My other code here?

'-- Run the application
StrataFrameApplication.RunApplication()

'-- Forcibly close the application to stop message pumps from looping and preventing the application
' from closing
End
End Sub


P.S. Is that the right terminology? Hooking into the app before it's created?

Thanks
Post #2180
Posted 08/14/2006 1:29:03 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 10:32:08 AM
Posts: 4,565, Visits: 4,547
It depends on what you are attempting to accomplish.  If you need to show a form before a logon form, then no, you would want to put it higher up.  But it you are just wanted to execute code before the application is placed in a "wait" state, then this owuld work.  Really the best place to add additional code is the InitApplication  or ShowLogonAndInitMainForm methods.  But what you have there will work fine.
Post #2181
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 1:09pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.031. 9 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.