From: BeeJ on 10 Aug 2010 18:15 I would like to prevent my ActiveX EXE from starting by double-clicking it in Windows Explorer. Only the main app that instantiates the ActiveX EXE should do this. How do I prevent this? The only crude way I can think of is to start a timer in the Initialize event and if a parameter is not set by the timeout then it is not the main app that is starting it. But there has to be a more sophisticated method.
From: Kevin Provance on 10 Aug 2010 19:00 "BeeJ" <nospam(a)nowhere.com> wrote in message news:i3sj2p$dh3$1(a)speranza.aioe.org... :I would like to prevent my ActiveX EXE from starting by double-clicking : it in Windows Explorer. : Only the main app that instantiates the ActiveX EXE should do this. : How do I prevent this? : The only crude way I can think of is to start a timer in the Initialize : event and if a parameter is not set by the timeout then it is not the : main app that is starting it. But there has to be a more sophisticated : method. Under Properties>Component, what do you have "Start Mode" as? IIRC, if you tick it to ActiveX Component, stand alone startup shouldn't be an issue.
From: BeeJ on 10 Aug 2010 20:19 After serious thinking Kevin Provance wrote : > "BeeJ" <nospam(a)nowhere.com> wrote in message > news:i3sj2p$dh3$1(a)speranza.aioe.org... >> I would like to prevent my ActiveX EXE from starting by double-clicking >> it in Windows Explorer. >> Only the main app that instantiates the ActiveX EXE should do this. >> How do I prevent this? >> The only crude way I can think of is to start a timer in the Initialize >> event and if a parameter is not set by the timeout then it is not the >> main app that is starting it. But there has to be a more sophisticated >> method. > > Under Properties>Component, what do you have "Start Mode" as? IIRC, if you > tick it to ActiveX Component, stand alone startup shouldn't be an issue. Startup object is set to none. Start mode is set to ActiveX component. And yet it starts and displays a form. I have to use Process Explorer to Kill.
From: David Youngblood on 10 Aug 2010 22:49 "BeeJ" <nospam(a)nowhere.com> wrote in message news:i3sqaq$5la$1(a)speranza.aioe.org... > After serious thinking Kevin Provance wrote : >> "BeeJ" <nospam(a)nowhere.com> wrote in message >> news:i3sj2p$dh3$1(a)speranza.aioe.org... >>> I would like to prevent my ActiveX EXE from starting by double-clicking >>> it in Windows Explorer. >>> Only the main app that instantiates the ActiveX EXE should do this. >>> How do I prevent this? >>> The only crude way I can think of is to start a timer in the Initialize >>> event and if a parameter is not set by the timeout then it is not the >>> main app that is starting it. But there has to be a more sophisticated >>> method. >> >> Under Properties>Component, what do you have "Start Mode" as? IIRC, if >> you tick it to ActiveX Component, stand alone startup shouldn't be an >> issue. > > Startup object is set to none. > Start mode is set to ActiveX component. > And yet it starts and displays a form. > I have to use Process Explorer to Kill. Can you post some example code that demonstrates that? David
From: Dee Earley on 11 Aug 2010 03:54 On 10/08/2010 23:15, BeeJ wrote: > I would like to prevent my ActiveX EXE from starting by double-clicking > it in Windows Explorer. > Only the main app that instantiates the ActiveX EXE should do this. > How do I prevent this? > The only crude way I can think of is to start a timer in the Initialize > event and if a parameter is not set by the timeout then it is not the > main app that is starting it. But there has to be a more sophisticated > method. It will exit immediately unless you do something in the Sub Main. If you want to show a message, and exit, do something like: If App.StartMode = vbSModeStandalone Then MsgBox "This can not be run standalone" End If -- Dee Earley (dee.earley(a)icode.co.uk) i-Catcher Development Team iCode Systems (Replies direct to my email address will be ignored. Please reply to the group.)
|
Next
|
Last
Pages: 1 2 3 4 5 Prev: Find the Windows Sidebar under Vista/7 using FindWindow(Ex) Next: Help with Zebra ZM400 |