Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Catch 22
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00221090
Message ID:
00221525
Views:
12
Ok, for those of you tyhat care, here's what I did. I'm not completely satisfied, but it works like I need it to.

Curtis mentioned something that reminded me that a modal form effectively issues it's own "READ EVENTS", so I concluded from there that really all I needed was a way to have a modal form appear as if it was a top-level form.

So in the settings form's init method I out some code like this:
IF _SCREEN.visible = .F.
	_SCREEN.BorderStyle = 0
	SET SYSMENU TO
	_SCREEN.Width = THIS.Width
	_SCREEN.Height = THIS.Height
	_SCREEN.Icon = THIS.Icon
	_SCREEN.Caption = THIS.Caption
	_SCREEN.AutoCenter = .T.

	THIS.MinButton = .F.
	THIS.maxButton = .F.
	THIS.Closable = .F.
	THIS.ControlBox = .F.
	THIS.Caption = ""
	THIS.Movable = .F.

	_SCREEN.Visible = .T.
	THIS.Top = 1
	THIS.Left = 1
	
	THIS.ShowedScreen = .T.
ENDIF
THIS puts the settings form inside the _SCREEN object, and sets everything up to make it look like it's a top level form. So then in my startup program, I have code like:
oUser = NEWOBJECT("UserInfo", "Userinfo")
llValidSettings = oUser.ValidSettings()

IF !llValidSettings
	DO FORM UserSettings TO llValidSettings
ENDIF

IF llValidSettings
	DO FORM Calendar WITH oUser
	READ EVENTS
ENDIF
This way, the settings form can be called from the main menu as well, and although it shows up in the taskbar as a Top-level form, it is actually modal.

Thanks to everyone for their ideas.
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform