General information
Category:
Forms & Form designer
There are multiple ways of changing the properties as everyone else has mentioned. The one that seems to work best for me is to do something similar to this. The form will remain active till the variable goes out of scope which
will not happen since its created public. The use of the READ EVENTS is usually used somewhere in the program. You will also be able to call any procedures from inside the program or menu or wherever and as long as you give it the right variable you can access the properties and methods of this form.
Hope this helps.
Chris
DO l_lnkfrm WITH "go_form", "myform"
*-- Change forms caption
go_form.Caption = "See I can still change my caption=o)~"
READ EVENTS
PROCEDURE l_lnkfrm
PARAMETERS pc_lnkobj, ; && object to create
pc_frm && form to run
PRIVATE ll_create
ll_create = .f.
*-- Runs the object out of scope and recreates it
*-- which will close the window if it exists and recreate
IF TYPE(pc_lnkobj) = "O"
RELEASE &pc_lnkobj.
PUBLIC &pc_lnkobj.
ll_create = .t.
ENDIF
DO FORM (pc_frm) NAME &pc_lnkobj. LINKED NOSHOW
&pc_frm..Caption = "My new form before going outside procedure"
*-- If newly created show the form
IF ll_create
&pc_lnkobj..SHOW()
ENDIF
RETURN
ENDPROC
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only