473,405 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

How to call a dos variable in visual basic?

I would like to know how to call a variable I have set in ms-dos using e.g. set h=hello in visual basic. Can this be done?
Jan 20 '11 #1

✓ answered by Guido Geurs

External parameters (like the %1 in DOSshell or BAT files) are enterd in VB by arguments.

Command Line Arguments, if passed to an executable, are stored in a special System Variable,
and can be returned to our program using the "Command" Function.

The result is only seen by executing the program, not at program Run.

The var "Command" is always present in VB (no need to define it)
De var COMMAND is altijd aanwezig in een VB programma (het moet niet gedefineerd worden !)

VB program=

Private Sub Form_Load()
Label1.Caption = Command
End Sub

1 1604
Guido Geurs
767 Expert 512MB
External parameters (like the %1 in DOSshell or BAT files) are enterd in VB by arguments.

Command Line Arguments, if passed to an executable, are stored in a special System Variable,
and can be returned to our program using the "Command" Function.

The result is only seen by executing the program, not at program Run.

The var "Command" is always present in VB (no need to define it)
De var COMMAND is altijd aanwezig in een VB programma (het moet niet gedefineerd worden !)

VB program=

Private Sub Form_Load()
Label1.Caption = Command
End Sub
Jan 20 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: John | last post by:
I have a problem, it's not with any code I have because... there is no code. When I run a blank visual basic 6 form, it opens up just fine. When I add a text box, a caption, and a button... it...
2
by: Marcel | last post by:
Hi, I'm using Microsoft Visual Basic .NET and want to reference the ThisApplication variable but cannot get to it or find the OfficeCodeBehind class. Is this a shortcomming of the fact that I...
1
by: Tom Rahav | last post by:
Hello all! I develop application in Visual Basic .NET and ORACLE database. My question is how do I "send" script file to the database using visual basic .net. Other words, is there any way to...
4
by: sqlguy | last post by:
Why do we have to contact MS for a problem that has been with this compiler from at least the beta of VS 20005. I am so sick and tired of the 30 - 40 clicks it takes to dismiss VS when there is a...
6
by: Carol | last post by:
Hi. When I try to run Visual Studio 2003 I get the message "MS development environment is not installed for the current user. Please run setup to install the application." Is there any way to...
97
by: Master Programmer | last post by:
An friend insider told me that VB is to be killled off within 18 months. I guess this makes sence now that C# is here. I believe it and am actualy surprised they ever even included it in VS 2003 in...
4
by: Goran Djuranovic | last post by:
Hi all, I am experiencing a strange thing happening with a "designer.vb" page. Controls I manually declare in this page are automatically deleted after I drop another control on a ".aspx" page. -...
0
AHMEDYO
by: AHMEDYO | last post by:
Hi Every one... With this visual Basic 6.0 Code you can handle more event that visual basic Support as Mouse wheel and hover or you can control event before VB IDE Default Windows proc as...
2
by: kosmous | last post by:
Hi, i'm new with visual basic. My problem is the following : According to the code i have attached, i use two buttons, when i press the BUTTON1, opens Browse Folder, i select the drive where...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.