command line

Does anyone know a way to get the command line of the parent exe from inside a usercontrol/ocx ?
GetCommandLine API is no good.
LVL 13
crazymanAsked:
Who is Participating?
 
SRigneyCommented:
If you store it in a public property in the form that the control resides on then you can use control.parent.commandlineproperty, or you can use frmMain.commandlineproperty  But as far as good programming practices go it is better to make a property on the control and pass that information to the control from the main form.
0
 
puneetmindaCommented:
Hey We cannot get the command line back from th usercontrol or ocx
0
 
phyderousCommented:
hi

what do you mean by command line?

the argument use to call the program?
0
 
HyperonCommented:
u would hsave to pass itto the ocx, add afunction that passes it to the ocx, or write it into a file on the hard drive, read it in via ocx, then delete the temp. file
0
 
crazymanAuthor Commented:
I can get the path of the parent exe easily but i cannot get the command line passed at the end of it, i know i can pass it into the control using a property/function etc... this is no good i need to do it from the control with no action needed outside of the control
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.