Hi guys, this should be a simple question to answer [i hope]...
When the EXPLORER.EXE task crashes, when it restores [Due to another explorer.exe being initiated via taskmanager etc...]
the message 49252 gets sent to the open forms..... as the systray etc restores itself.
now, i use an systray icon in my app, so, i have decided to take advantage of this, to always restore my icon, when explorer crashes [IE: like yahoo, MSN, and most other app's (ZA Pro, Norton AV ETC)], as i hate having to end the process / restart the app to get the icon back for hidden apps, which i am sure users of my app will be like..
anyhow, i have got this working, via subclassing my main form, but, when i end my program, it is causing an error, which closes out the VB IDE, when in edit, and sends an invalid process termination message when run as an EXE.
now, i am guessing i havent unsubclassed my form correctly, however, i unsubclass before removing my program icon, and it removes my program icon perfectly fine,
anyhow:
I call in form load: modIcon.AddIcon
and in form queryunload: modicon.DeleteIcon
Add icon then calls subclass form
and delete icon then calls to unsubclass the form
now, if anyone can see what i've done wrong here, that would be brilliant [as i aint the best with subclassing etc]
i have got the icon to re-add in my other app, but only really because i call to update the icon from a peice of already inserted subclassing, so i am thinkin it has to be something i got wrong on my subclassing...
Thanks..
Last edited by wpearsall; Aug 12th, 2003 at 12:24 AM.
try making a new app that only contains the re-adding icon and subclassing part. if it doesn't crash then it is something with the main program. also try stepping through the code (using F8) to determine if it is crashing at the unsubclass point or anything else.
Remember, if someone's post was not helpful, you can always rate their post negatively .
OK!! I will post it as another thread as well..
But i m having the problem in subclassing.. I want to capture WM_CLOSE message and want to do something other than just closing.. then i want to close the form as well. ... everything goes right..other than when i try to close the form.. i don't want it's default proc to handle this message so i skip calling it.. but when i use SendMessage to close my form.. it's closing my whole application... and if i use DestroyWindow then it's not returning resources to the system... so form is out but resources are still there...
Do u have any idea?
it normally always handles any close method? [to help stop destroying the application from running, since lots of apps need to delete / write files etc, as they close]