Solved

command line

Posted on 2003-10-27
5
192 Views
Last Modified: 2010-08-05
Does anyone know a way to get the command line of the parent exe from inside a usercontrol/ocx ?
GetCommandLine API is no good.
0
Comment
Question by:crazyman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 

Expert Comment

by:puneetminda
ID: 9632371
Hey We cannot get the command line back from th usercontrol or ocx
0
 
LVL 5

Expert Comment

by:phyderous
ID: 9632692
hi

what do you mean by command line?

the argument use to call the program?
0
 

Expert Comment

by:Hyperon
ID: 9632697
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
 
LVL 13

Author Comment

by:crazyman
ID: 9632717
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
 
LVL 15

Accepted Solution

by:
SRigney earned 250 total points
ID: 9633380
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

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month10 days, 6 hours left to enroll

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question