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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a Form as a Com server

Status
Not open for further replies.

wsobers

IS-IT--Management
Dec 2, 2000
43
0
0
BB
My goal is to have a VB application load a vfp com server to print a report. This part has worked well so far.
Now I want the com server to display information about the print process.
I have followed faq 184-2061 far enough to create and display a form from a exe after loading it via createobject but it bombs if I try to close the form using the 'X' in the top right corner.
I am trying to hide the form in the queryunload event but the form remains stuck on the screen. Can anyone give me some guidence in getting this operational.
TIA

Wayne
 
How do you try to hide the form?

I believe this would:

in QueryUnload:
Code:
THISFORM.Visible = .F.
*  I don't know if this is necessary:
DOEVENTS   && allow windows to repaint the form immediately..
NODEFAULT  && Don't release the form
 
Thanks for the reply. I tried your solution but the problem is still there.
There is another problem in that if I move the form, its image is left on the screen.
My form issues a read events in the activate event and uses a boolean property to prevent it from being issued again.
Could this be causing a problem?

Wayne
 
is your _SCREEN.LockScreen (or any other .LockScreen) getting set .T.?

If so, even though the form IS hidden, the form under it isn't being repainted.
 
The main vfp screen is off from a configuration setting, and Lockscreen is off.
I'm going to look for an alternate solution for the time being.
Thanks for replying.

Wayne
 
If you want to close the form - issue CLEAR EVENTS in the QueryUnload() event.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top