Ok, here is one for someone to speculate on, I have yet to find out the reason for it ....
I have created a form, that has a property VISIBLE = False, I do not want the user to see the form when the program runs, I only want it to initialize and store data in the form, this form will load when Windows starts.
If I programmatically change the value to VISIBLE = True, the form shows and all is well, there is a time when I WANT the form to show....
Anyway, what I am doing is creating a routine in the program that if the user starts the program from the icon, with no command line parameters (IE from an executable), it will detect the form is already loaded and not attempt to load another instance ... i.e. if App.PrevInstance = True
Now, if App.PrevInstance is true, I can find the hidden window programmatically, but I cannot seem to get it accept the SendMessage command...
i.e.
SendMessage (App.Form1.hWnd, WS_VISIBLE, 0&, 0&)
Theoretically, this should change the visible property to true and repaint the window, but I have not had any luck....
Oh, and yes, in this project I have managed to do all of the following so far with pretty good success....
Interface with the AutoCAD VBE environment and dynamically load/unload VBA projects, Send lisp and vlisp commands to AutoCAD, Load/Unload Arx modules, Call Win APIs, VBA, and VB and JavaScript functions and dynamically link to type libraries to solve the VB5/VB6 and AC15/AC16 problems associated with declaring type libraries in the reference window.
I just need to be able to set the visible flag to true on a VB Form by only knowing it's handle
Any Takers???