Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can ActiveX EXEs Appear on TaskBar? 1

Status
Not open for further replies.

BlackburnKL

Programmer
Oct 21, 2002
196
US
I am working on a project (VB6) that is set to create an ActiveX EXE. It doesn't appear as an application on the TaskBar (not the System Tray). This makes it difficult to switch between tasks.

Can ActiveX EXEs appear on the TaskBar like Standard EXEs? If so, what am I missing?

Thanks (in advance) for your help. BlackburnKL
 
Well, apart from making Active EXE servers for doing some crunching stuff for clients, you could also make ActiveX EXE's which show dialogs. Just like a normal application, except it has COM interfaces that could be used by anyone interested. I.e. besides being launched by an interactive user, they can be launched, and used, by COM as well.

These can be made visble on the taskbar. I suppose it's just setting the properties of your form (isn't it ShowInTaskbar or something like that).

However, if you're not using any UI, then of course it is not possible (what would you like to show on the taskbar then?).
Greetings,
Rick
 
Thank you for your responses. I'm not certain what causes the behavior we're getting, but allow me to provide this insight:

ActiveX EXEs don't start up to a form. They start from a Sub Main in a .BAS module. The project has several forms and the ShowInTaskBar property on them is set to True, but nothing shows up in the TaskBar. BlackburnKL
 
I just created a very simple ActiveX exe:

Startup with sub Main(), show an empty form.

The form appears in the taskbar. However, if you use frmX.Show vbModal, it does not appear in the taskbar. Maybe that's what's wrong?
Greetings,
Rick
 
That is very likely the problem. I'll have to look into it further.

Any idea why a modal form would not show? There's probably some logic to it that I've just missed along the way.

Thanks, again, for your help and insights. BlackburnKL
 
I guess that the reason for that is that modal dialog boxes aren't necessary to show up in the taskbar. If it's hidden behind anoher application it will come out when you push the taskbarbutton of its owner. It's bad practise anyway to have multiple taskbar buttons for one application (don't you just hate what they did to Access 2000 as opposed to the way Access 97 handled its child forms?).

And since the very first form you're usually showing in an application usually is some kind of modal, it can be shown modelessly they must have thought. Although I cannot find any reason in that though, since it limits the way you can launch your application (it would have been nice if you could launch the very first form modal, still having it visible in the taskbar, from within the main sub and clean up after it's gone....).
Greetings,
Rick
 
LazyMe,

It has taken me a while to get around to handling this, but your advice was right on the mark. We've been down quite a few wrong roads on this one, but the vbModal thing was the answer.

To resolve it, we have added an empty form with a title and an icon. I have made it as small as possible and loaded it off of the screen (.Left < 0) so that the user never sees it. It puts the button on the TaskBar and returns us to the modal forms when clicked. It is a workaround for our odd circumstances, but it works.

Thank you for your help. I've awarded you a star for your expertise in this situation. Thanks again.

BlackburnKL BlackburnKL
 
Well, as you say it is a bit odd, but I'm sure you've seen worse....
Greetings,
Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top