I wonder what your reasons for wanting to hide the app from the Applications
List actually is and whether you really need to do it?
- No no virus program or anything like that. Let me explain and perhaps you
might be able to offer a solution. Three windows (forms) (well two actually).
FormA is the Main (parent - for lack of better term) that launches FormB.
FormB cannot be simply module (dialog) because it has to be cabable of
minimizing (and there are a number of other issues related to thirdparty
controls that have some bugs in them). It has to be in its own window, too
(so SetParent API is no good).
But the condition must be that you cannot access frmA when frmB is opened.
Think of it like MS Outlook with the main windows and an Email in a separate
window. When you minimize frmB, frmA should be minimized, too. When frmA and
frmB are shown (or when only FormA is shown), there should only be one
'processes' in the taskbar. To do this, I've created another form (let's call
it frmMain). It has its ShowInTaskbar set to true. frmA and frmB are set to
false. So basically frmMain will launch frmA (frmMain is off the screen so
the user can't see it, but it appears in the taskbar). When needed, frmA will
launch frmB (do you stuff in frmB and close it to go back to frmA). frmMain
has code in its resize even to handle set focus to the windowstate of the
user-shown form (A or B), minimizing, maximizing, etc. The AddOwnedForm
function did not work very well for this either, so it all had to be coded
seperately (for more control of min/max). To complicate it even more, some
users want to have a Systemtray icon (notify icon), again with similar
funcitonality as Outlook (hide when minimized, bring to front when opened,
etc.). And of course the option to show or hide the notify icon. This I've
put into the frmMain. Most things work, except for the following...
Unless frmA and frmB are set as Toolbars, they appear as separate icons in
the tasklist. If you set the Hide in Taskmanager, they still appear in the
Tasklist, but with out their properly associated icon. Regardless, I need to
have only one item in the Tasklist and in the Taskbar (that would be the
frmMain). When the Notify icon is present along with the Hide When Minimize
option, I can hide the frmMain (so only the one in the Taskbar appears), but
once again, I get the blank icon in the task list.
So with everything said....
What the heck is the best way to do this!?! I've been experimenting with
different ideas, but nothing 100% perfect has come up yet.
Basically, two forms (frmA, frmB) frmA is the parent. frmB can be min/max,
moved, but always stay sinfron of the dissabled frmA. When frm B is
minimized, frmA is minimized. When frmB is resized and max, frmA stays the
same. If the icon is in the systemtry and frmA or frmB are minimized, they
both dissappear and the associated 'button' in the taskbar dissappears as
well (like outlook). If frmA is resized and then frmB is opened, it still
maintains its size from before (not resized because frmA was resized).
So any thoughts an ideas would be greatly appreciated.
I'd like to get this program tested by qualitylogic so it can be added to
the Microsoft site, but I know it won't pass because of the icon issue in the
tasklist.