Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
2nd posting - ANYONE?????
Message
 
To
26/02/2004 10:57:36
Scott Malinowski
Arizona Fox Software LLC
Arizona, United States
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00881096
Message ID:
00881950
Views:
14
Scott,

>I've tried to trap the error and VFP 8 just throws up all over me and then throws me out to boot! VFP terminates!

Have you tried adding SET STEP ON to the code right before the line executes? Sometimes that works better than setting a breakpoint.

Although I'm not exactly sure what's going on here, I have an alternate method of handling a single instance of a form. You can add the following code to the top of your DoForm() function in Utility.prg:
FUNCTION DoForm(tcClassName,tuParm1,tuParm2,tuParm3,tuParm4,tuParm5,tuParm6,tuParm7)
	LOCAL loObject

	*--- If only one instance of this form is allowed and there is 
	*--- already an active instance, just Show it
	IF TYPE("goApp.oForms") == "O" 
		LOCAL loForm
		loForm = goApp.oForms.Get(tcClassName)
		IF TYPE('loForm') == "O" AND !loForm.lallowmultipleinstances
	        loForm.Show()
	        RETURN .T.
		ENDIF
	ENDIF
This code simply sets focus to an existing instance if someone tries to launch a second instance.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform