Jump to content

Visual Basic Console Program

- - - - -

  • Please log in to reply
6 replies to this topic

#1
shivam

shivam

    Newbie

  • Members
  • PipPip
  • 27 posts
I want to know how to run a Console Program in VB Like JAVA..What is the Default Folder in vb like jdk/bin in JAVA and how to set the Environment Path in vb ??

Please Help..!!!!

Example Code:

Imports System
Module Module1
Sub Main()
Console.WriteLine("Hello World!")
End Sub
End Module

#2
CommittedC0der

CommittedC0der

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,565 posts
Well I assume you have Visual Studio, so just create a new VB project, and when it comes up asking you what to name your program change the project type from winForms, to console.
[ATTACH=CONFIG]3732[/ATTACH]

Good luck ~ Committed. :)

A man can be defined by what he does when no one is looking.
Science is only an educated theory, which we cannot disprove.

#3
shivam

shivam

    Newbie

  • Members
  • PipPip
  • 27 posts
Yeah Definitely this is an option to run the Console VB Program.. But i don't want to use the Framework of Visual Studio. I just Like To use it as a JAVA Program. Simply Write in a Notepad Save it as Example.vb and run from Console cmd...

#4
CommittedC0der

CommittedC0der

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,565 posts
Why would you want to use notepad to edit code? :blink: Anyway im not sure how you would do that, I dont see anything on Google saying how. :worry:
~ Committed.
A man can be defined by what he does when no one is looking.
Science is only an educated theory, which we cannot disprove.

#5
shivam

shivam

    Newbie

  • Members
  • PipPip
  • 27 posts
I am Reading a Book and it says that we can also run a program of vb using notepad and cmd..So i tried to do so :c-cool:well its better that i stay on the Visual Studio 2010:c-smile:

Well Thanx for advice:c-smile:

#6
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
  • Location:Vancouver, Eh! Cleverness: 200
Visual studio has a command line compiler, you can read about it here: How to: Invoke the Command-Line Compiler

I would recommend you get a proper IDE (Geany for example) and set it up so the compiler option uses vbc.exe automatically to aid in the process of building, doing it by command line manually is counterproductive.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#7
shivam

shivam

    Newbie

  • Members
  • PipPip
  • 27 posts

Alexander said:

Visual studio has a command line compiler, you can read about it here: How to: Invoke the Command-Line Compiler

I would recommend you get a proper IDE (Geany for example) and set it up so the compiler option uses vbc.exe automatically to aid in the process of building, doing it by command line manually is counterproductive.

This is what i am looking for.. thanks a ton Alexander..:c-smile:




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users