|
-
Mar 15th, 2004, 03:12 AM
#1
Thread Starter
New Member
Pass Parameter to an Application
Hi everybody...
I want to develop an application using VB.NET..
my application will run from another application developed using oracle forms...
my application should recieve username, password , and other information from the other application..
the problem is how to recieve these information as parameters?
-
Mar 15th, 2004, 07:40 AM
#2
Fanatic Member
I assume you want to create a .NET application with a .exe extension (a true application not a component).
I dont know much about running external apps from Oracle forms, but I presume you have to execute the application by its name. If this is the case then you can use normal command line parameters.
Eg. "C:\myapp.exe param1=value1 param2=value2"
You can access the parameters using "Microsoft.VisualBasic.Command".
You will need to parse the string to get the parameter values.
When you find the solution, please post the code required to call the application from Oracle Forms. I am maintaining old Oracle Forms 3, so I am interested to see how its done now days.
-
Mar 15th, 2004, 08:39 AM
#3
Sleep mode
The application must have Sub Main() method as entry point of the application with paramters (I think it's the same as in C# app) .
-
Mar 15th, 2004, 08:53 AM
#4
yay gay
Yes. It's an awful idea to use the Compability namespace one when you can use a builtin one
\m/  \m/
-
Mar 15th, 2004, 09:07 AM
#5
Addicted Member
I do not think you need a Sub Main i could be wrong but in vb 6 you could call Command anywhere.
-
Mar 15th, 2004, 09:10 AM
#6
Sleep mode
Originally posted by Tewl
I do not think you need a Sub Main i could be wrong but in vb 6 you could call Command anywhere.
How will the syntax look like then ?
-
Mar 15th, 2004, 09:16 AM
#7
Addicted Member
Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
MsgBox(Microsoft.VisualBasic.Command())
End Sub
-
Mar 15th, 2004, 09:23 AM
#8
Sleep mode
Ok , can you pass argus to the formload event in commandline ,like this:
myapp.exe helloworld
?
-
Mar 15th, 2004, 02:50 PM
#9
yay gay
Originally posted by Tewl
I do not think you need a Sub Main i could be wrong but in vb 6 you could call Command anywhere.
That's not the point. The point is if you have a built-in way in .NET framework why in the world would you use the compability namespace?
\m/  \m/
-
Mar 15th, 2004, 06:05 PM
#10
Addicted Member
I import Microsoft.VisualBasic for many things such as left and right why would it matter.
-
Mar 15th, 2004, 06:08 PM
#11
yay gay
I really don't get why would you still want Left() and Right() functions in VB.NET. You have .Substring() method that does what you need, if yo uwant Left()/Right() you could even implement it in a class made by your own(though i NEVER really needed it, i find the .Substring() method way best) removing the Compability namespace depency. Sure it is in .net framework but until when? And having in consideration that all that's there exists in equal or similar way in the .net framework I think it's a shame to use it :S
\m/  \m/
-
Mar 15th, 2004, 06:14 PM
#12
Addicted Member
I suppose. I don't use vb .net much anyway, I prefer C#
-
Mar 15th, 2004, 11:40 PM
#13
Sleep mode
PHP Code:
if (YouHaveTo())
{
Use ("Microsoft.VisualBasic.dll")
}else{
Use ("string methods")
}
-
Mar 16th, 2004, 10:42 AM
#14
New Member
You can use Environment.GetCommandLineArgs()
VB Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim UserName As String = Environment.GetCommandLineArgs(1)
Dim Password As String = Environment.GetCommandLineArgs(2)
etc.
Last edited by iljhar; Mar 16th, 2004 at 11:03 AM.
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
|