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

Keeping forms as visible = .F.

Status
Not open for further replies.

USMA99

Programmer
Oct 12, 2000
82
US
For various reasons I would like to load several forms when I launch my application, but not show them to the user yet. I set their visible property to false at design time, but when I run them their visible settings always becomes true and wallah ... there the buggers are. Sure, I can hide them but there's this rather annoying flicker and it's going to upset my sensibilities if if I have to take the time to code something to handle the flicker when I think I should just be able to have them be invisible, just like I created them.

How does one accomplish what I am attempting to do?

(I'd rather stay away from a formset as well.) This has to be a fairly common task but I didn't see it searching the forum. Thanks in advance.
 
Define it as a class. This will work with most relatively uncomplicated froms.

Brian

1) Tools -> Class Browser
2) Dropdown -> "FORM"
3) (Folder Icon) to Select your form
4) (Table and '+' Icon) to View Code
5) Use code

Code:
PUBLIC loForm
loForm  = CREATEOBJECT("form1")

lnSeconds=seconds()

do while seconds()-lnSeconds<1
  wait wind nowait [Form Not Visible]
enddo

loForm.Show()


**************************************************
*-- Form:         form1 (c:\data\form2.scx)
*-- ParentClass:  form
*-- BaseClass:    form
*-- Time Stamp:   06/09/06 12:01:07 AM
*
DEFINE CLASS form1 AS form
	DoCreate = .T.
	Caption = "Form1"
	Enabled = .T.
	WindowState = 0
	Name = "form1"
ENDDEFINE
*
*-- EndDefine: form1
**************************************************
 
Didn't we answer this one arlead???

Best Regards,
Scott

&quot;Everything should be made as simple as possible, and no simpler.&quot;[hammer]
 
Maybe, but I don't think I got to see the answer. A mod removed my post and told me to put it here instead...


Thanks though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top