Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Prevent User From Leaving Form
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00383396
Message ID:
00383488
Views:
59
Hi Nick,

>the form becomes visible and VFP comes up with an error "Cannot change modality of a visible form"

The following works for me in VFP5 and VFP6/SP3 on Windows 2000. I can use the buttons to switch between modal and modeless. Does it work for you?
Public oForm
oForm = CreateObject("SwitchForm")
oForm.Show()

Define Class SwitchForm as Form
	Add Object cmdModal as CommandButton With Caption="Modal"
	Add Object cmdModeless as CommandButton With ;
		Caption="Modeless", ;
		Top = 50
	Procedure cmdModal.Click
		Thisform.Hide()
		Thisform.Show(1)
		Thisform.Show(2)
	Procedure cmdModeless.Click
		Thisform.Hide()
Enddefine
Christof
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform