Solved

command line

Posted on 2003-10-27
5
175 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
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

705 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now