|
-
Jul 2nd, 2005, 10:00 AM
#1
Thread Starter
New Member
[RESOLVED] Openargs
Hi
I'm pretty new to .net from vb.
Can you pass input parameters to a compiled.net exe file - a bit like openargs in vb e.g. dotnetproj.exe 1000
or do you have to have an exe for each of the different input parameters that you need e.g.
dotnetproj1000.exe,
dotnetproj2000.exe,
dotnetproj3000.exe
etc
cheers
Last edited by jimjamjo; Jul 2nd, 2005 at 10:04 AM.
-
Jul 2nd, 2005, 10:31 AM
#2
Re: Openargs
You can pass them in the commandline arguments and receive them in your app by checking in the Form_Load event or New
procedure by using Environment.CommandLine()
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 5th, 2005, 12:15 PM
#3
Thread Starter
New Member
Re: Openargs
Thanks
and then you remove the path from the string within the project?
Last edited by jimjamjo; Jul 5th, 2005 at 12:23 PM.
-
Jul 5th, 2005, 12:22 PM
#4
Re: Openargs
It would be passed in something that is easily parsable.
VB Code:
run proj1.exe /1 /debug /false
sub form_load
dim ar() as string
ar = Environment.CommandLine.Split("/")
messagebox.show(ar(0))
messagebox.show(ar(1))
messagebox.show(ar(2))
end sub
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 5th, 2005, 12:24 PM
#5
Thread Starter
New Member
Re: Openargs
OK thats quick !!!!!!!!!!!!!!!!!!!!!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|