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

How to determine expression of form?

Status
Not open for further replies.

SYN

Programmer
Nov 2, 2000
45
NL
Hi,
can anyone help me with this: I create several forms and at any moment I want to know the expression of the active form.
for example

MyForm1 = CreateObject("MainForm")
MyForm2 = CreateObject("MainForm")

How will I know at any moment which is the active form
MyForm1 or MyForm2 ?



 
Chris,

lcName = _SCREEN.ActiveForm.Name gives the name of the form

I can't use that because I want to add an object like this:

MyForm1 = CreateObject("MainForm")
MyForm2 = CreateObject("MainForm")


than later...
lcName = determine the expression, f.e. Myform1

lcName.ADDOBJECT( "Myline" , 'line' )

You understand?
 
SYN

I probably misunderstood your question.

Are you creating a number of instances of the same form? HTH

Chris [pc2]
 
the idea is that _SCREEN holds the key to what you are looking to do. Chirs pointed out that _SCREEN.ActiveForm.Name can provide the name of the form. that way you could use this for decision making. then use
_SCREEN.ActiveForm.AddObject() to add the object.
the help file list all the properties and methods of _SCREEN. Attitude is Everything
 
Danceman and Chris,

thanks. With the _screen.activeform.addobject the problem is solved....

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top