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

Form Sequence

Status
Not open for further replies.

sohrab100

Programmer
Jan 18, 2002
56
HK
I have a problem concerning the focus of form.
I want to know if all forms are modal, the form sequence should follow one by one? Will it be suddenly active the form at the bottom? Since I have experience that when i have a bottom modeless form 0 and calling modal form1 ->
form2 -> form3, suddenly form 0 gotfocus and make form3 abnormal.

Will it be happen again when all form is modal?


sohrab100
 
Hi Shorab,

In a modal form sequence, the sequence should follow as a logic.

BUt when it is Modal and Non-Modal, it is not always the same. Let me exaplin it with some code as to how, you can make a form run modal and then non-modal way.

Here is the code..
*******************************************
PUBLIC oForm
oForm = CREATEOBJECT("SwitchForm")
oForm.SHOW()

DEFINE CLASS SwitchForm AS FORM

ADD OBJECT cmdModal AS COMMANDBUTTON WITH ;
CAPTION = "Modal", ;
HEIGHT = 27, ;
LEFT = 30, ;
TOP = 50

ADD OBJECT cmdModeless AS COMMANDBUTTON WITH ;
CAPTION = "Modeless", ;
HEIGHT = 27, ;
LEFT = 30, ;
TOP = 100

PROCEDURE cmdModal.CLICK
THISFORM.HIDE()
THISFORM.SHOW(1)
THISFORM.SHOW(2)

PROCEDURE cmdModeless.CLICK
THISFORM.HIDE()
ENDDEFINE
****************************************
So you can switch between the modalities !
The above may not perfectly work, but illustrates how the modality gets changed.

:)

____________________________________________
ramani - (Subramanian.G) :)
When you ask VFP questions, please add VFP version.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top