From: BeeJ on 11 Aug 2010 21:07 My report back. Yes, it all works now. I have a Sub Main added. I make that the startup object. I have all the other ActiveX EXE related flags set as an ActiveX EXE should. In the sub main I check to see who is starting it and put up a MsgBox if it is a stand alone attempt. This is optional but I like it. So if a user click on the ActiveX EXE a message box admonishes. When it is instantiated as an ActiveX EXE from the main app, the sub main is dropped through (see Dee's code) and the class interface is active and functional. That was a learning curve of great heights for me but worth it cause I learned something new and interesting. In one ActiveX EXE i show a form by calling a startup from initialize. That seems OK. In other ActiveX EXEs i have no forms. They all work. And I finally got them to all close properly and leave nothing behind. But most important, all the timing has now smoothed out and looks good. Thanks for all who directly helped and those who, although off a little, did make me think harder. It all works together and I squeezed out something that works. I now consider myself an ActiveX EXE expert (sort of). I am writing up a how to article. Wonder if anyone will be interested. Oh well, I like putting my thoughts together in one place. Why, cause in a couple of weeks I will have to go back and read my article to figure out how to do it again.
From: Dee Earley on 12 Aug 2010 03:59 On 12/08/2010 02:07, BeeJ wrote: > My report back. > > Yes, it all works now. > > I have a Sub Main added. I make that the startup object. > I have all the other ActiveX EXE related flags set as an ActiveX EXE > should. > In the sub main I check to see who is starting it and put up a MsgBox if > it is a stand alone attempt. This is optional but I like it. > So if a user click on the ActiveX EXE a message box admonishes. > > When it is instantiated as an ActiveX EXE from the main app, the sub > main is dropped through (see Dee's code) and the class interface is > active and functional. > > That was a learning curve of great heights for me but worth it cause I > learned something new and interesting. > > In one ActiveX EXE i show a form by calling a startup from initialize. > That seems OK. > In other ActiveX EXEs i have no forms. They all work. > And I finally got them to all close properly and leave nothing behind. > > But most important, all the timing has now smoothed out and looks good. > > Thanks for all who directly helped and those who, although off a little, > did make me think harder. It all works together and I squeezed out > something that works. > > I now consider myself an ActiveX EXE expert (sort of). > I am writing up a how to article. Wonder if anyone will be interested. > Oh well, I like putting my thoughts together in one place. > Why, cause in a couple of weeks I will have to go back and read my > article to figure out how to do it again. Ahh, that'd be useful, I'm no good at writing articles that make sense to anyone bar me.. <plug> I'll happily offer it a home on my VB wiki at: http://hashvb.earlsoft.co.uk/ :) </plug> -- 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.)
From: David Youngblood on 12 Aug 2010 06:44 "Kevin Provance" <k(a)p.c> wrote in message news:i3ui29$v7h$1(a)news.eternal-september.org... > > "BeeJ" <nospam(a)live.com> wrote in message > news:i3uhh7$g3e$1(a)speranza.aioe.org... > : Dee Earley formulated the question : > : > : But there is no sub main. > : And the ActiveX EXE is starting. > : The entry class has a startup call to a module where a form is opened. > : > : So it looks like even with the parameters set as mentioned in a > : previous post, the ActiveX still opens. > : > : Maybe i can try the App.StartMode and see how it is starting and then > : not call the startup and just drop thru. > > Well, that answers it. If there is no Sub Main, VB automatically loads > the default form at startup. Am I missing something? I can't dublicate that behavior. If I compile an activex.exe with 1 class, 1 form and 1 module with sub main, Double clicking the file does not show a form, does not fire class intialize, does not run sub main and does not show up in Task Manager. Showing a form at start up is not even an option. David
From: Dee Earley on 12 Aug 2010 06:51 On 12/08/2010 11:44, David Youngblood wrote: > "Kevin Provance"<k(a)p.c> wrote in message > news:i3ui29$v7h$1(a)news.eternal-september.org... >> >> "BeeJ"<nospam(a)live.com> wrote in message >> news:i3uhh7$g3e$1(a)speranza.aioe.org... >> : Dee Earley formulated the question : >> : >> : But there is no sub main. >> : And the ActiveX EXE is starting. >> : The entry class has a startup call to a module where a form is opened. >> : >> : So it looks like even with the parameters set as mentioned in a >> : previous post, the ActiveX still opens. >> : >> : Maybe i can try the App.StartMode and see how it is starting and then >> : not call the startup and just drop thru. >> >> Well, that answers it. If there is no Sub Main, VB automatically loads >> the default form at startup. > > Am I missing something? I can't dublicate that behavior. If I compile an > activex.exe with 1 class, 1 form and 1 module with sub main, Double clicking > the file does not show a form, does not fire class intialize, does not run > sub main and does not show up in Task Manager. Showing a form at start up is > not even an option. That is how it should be (If you'd told it not to use Sub Main). I don't know why BeeJ's form was being shown. -- 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.)
From: BeeJ on 12 Aug 2010 07:10 After serious thinking Dee Earley wrote : > On 12/08/2010 11:44, David Youngblood wrote: >> "Kevin Provance"<k(a)p.c> wrote in message >> news:i3ui29$v7h$1(a)news.eternal-september.org... >>> >>> "BeeJ"<nospam(a)live.com> wrote in message >>> news:i3uhh7$g3e$1(a)speranza.aioe.org... >>> : Dee Earley formulated the question : >>> : >>> : But there is no sub main. >>> : And the ActiveX EXE is starting. >>> : The entry class has a startup call to a module where a form is opened. >>> : >>> : So it looks like even with the parameters set as mentioned in a >>> : previous post, the ActiveX still opens. >>> : >>> : Maybe i can try the App.StartMode and see how it is starting and then >>> : not call the startup and just drop thru. >>> >>> Well, that answers it. If there is no Sub Main, VB automatically loads >>> the default form at startup. >> >> Am I missing something? I can't dublicate that behavior. If I compile an >> activex.exe with 1 class, 1 form and 1 module with sub main, Double >> clicking >> the file does not show a form, does not fire class intialize, does not run >> sub main and does not show up in Task Manager. Showing a form at start up >> is >> not even an option. > > That is how it should be (If you'd told it not to use Sub Main). > I don't know why BeeJ's form was being shown. This is without a Sub Main. i.e. startup object is set to none. In class_initialize of the entry class that gets instantiated by the main app, I call a sub in a module that opens a form. I did this rather than to have to call a sub in this class from the main app.
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 5 Prev: Find the Windows Sidebar under Vista/7 using FindWindow(Ex) Next: Help with Zebra ZM400 |