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

scx form name at run tim 1

Status
Not open for further replies.

EzLogic

Programmer
Aug 21, 2001
1,230
US
i have a form, which is a based on a custom form class.

how can i know what the form name is?

the scx name, not: thisform.name?

i tried sys(16), but, that gives me the VCT file, and not the someformname.sct/scx?



Ali Koumaiha
TeknoSoft Inc.
Michigan
 
sys(1271) would return that info but in your case as I understand your form is not based on a scx at all.

Cetin Basoz
MS Foxpro MVP, MCP
 
One can base a scx on a form class. But If Sys(16) is run within class code the scx inherits, the vct file is reported correctly, that's where that code is running.

Sys(1271,Thisform) helps anyway. When you do the scx form and Sys(1271) runs within the inherited code within the class it reports the scx file.

Bye, Olaf.
 
that worked well so far.. but, here's where i am stuck and i don't know if i should make another topic for that.

my app user has the option to "add" a link to any of the forms to their main screen. upon clicking on the new link created,


lcScript = GetUserFav(lnIID) && gets the command for that link

Execscript(lcScript)

--------------------
most of the commands are: do form someform.scx

problem: someform.scx could not be found (in run time)

however, from the menu or the pre-existing button that also launches that form, it works.. but, those are ocmpiled in the project, and the commands in the UserFav table are not.

so, is that why execscript() can't find the form? and how do i go about making it work?



Ali Koumaiha
TeknoSoft Inc.
Michigan
 
sometimes i wanna say to myself .. duhhhh lol :)

i figured it out, instead of execscript(), i did:

&lcScript

which solved the problem..



Ali Koumaiha
TeknoSoft Inc.
Michigan
 
Macrosubstitution works as long as it's just one command.

You can use execscript, but be aware execcscript compiles the script as a prg, so you have an fxp in the temp folder which is executed. That's still running inside of the process and so should find the scx anyway.

What is doable in any case is NewObject("formclass","vcxname","some.exe", param1, param2,...), or DO some.prg IN some.exe and you can parameterize a script and pass in goApp or some other reference.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top