Click here to Skip to main content
15,885,679 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: hi Pin
Dave Kreskowiak9-Mar-12 3:12
mveDave Kreskowiak9-Mar-12 3:12 
QuestionMaking a programming language in VB Pin
Member 83786918-Mar-12 22:29
Member 83786918-Mar-12 22:29 
AnswerRe: Making a programming language in VB Pin
Simon_Whale8-Mar-12 22:44
Simon_Whale8-Mar-12 22:44 
GeneralRe: Making a programming language in VB Pin
Member 837869112-Mar-12 21:47
Member 837869112-Mar-12 21:47 
GeneralRe: Making a programming language in VB Pin
Simon_Whale12-Mar-12 23:14
Simon_Whale12-Mar-12 23:14 
AnswerRe: Making a programming language in VB Pin
Bernhard Hiller9-Mar-12 2:26
Bernhard Hiller9-Mar-12 2:26 
AnswerRe: Making a programming language in VB Pin
Bert Mitton9-Mar-12 7:40
professionalBert Mitton9-Mar-12 7:40 
AnswerRe: Making a programming language in VB Pin
Johan Hakkesteegt12-Mar-12 1:56
Johan Hakkesteegt12-Mar-12 1:56 
My guess is, that you are having trouble phrasing your question.

By the look of your questions, you are not making a programming language, instead you are just trying to write a program ? (and perhaps this program is supposed to do something with languages ?)

So to answer your questions:
1. Conditions in VB.NET are simple:
VB
If string1 = "Hello" Then
     'Code that you write here, will execute when 
     'the condition above is true
Else
     'Code that you write here, will execute when 
     'the condition above is false
     'The Else clause is optional,
     'you do not have to use it
End If

2. You can add parameters to executing code using Subs and Functions. A Sub will simply execute whatever code you write in it, and a function is otherwise the same, but it will return a value.
VB
Public Sub ExecuteWhenTrue(Byval Par1 as String)
     MsgBox(Par1)
End Sub

Public Function ExecuteWhenFalse(Byval Par1 as String) As String
     Return "You are not very polite " & Par1
End Function

If string1 = "Hello" Then
     ExecuteWhenTrue("Well, hello to you too!")
Else
     MsgBox(ExecuteWhenFalse("buddy"))
End If

3. Just write a Sub with the code that you want to execute at the finish (of what ?)
If you mean when the user has given all the correct parameters, then just execute the sub once all your conditions (see point 1) are true.
If you mean when you close the program, then execute the sub in the Closing or Closed event of the form.

Good luck
Johan
My advice is free, and you may get what you paid for.

QuestionMultiple Keys Combination using Select Case Pin
Midnight Ahri8-Mar-12 19:47
Midnight Ahri8-Mar-12 19:47 
AnswerRe: Multiple Keys Combination using Select Case Pin
Richard MacCutchan8-Mar-12 21:34
mveRichard MacCutchan8-Mar-12 21:34 
QuestionSerializer complex class Pin
boagrius8-Mar-12 13:42
boagrius8-Mar-12 13:42 
AnswerRe: Serializer complex class Pin
Bernhard Hiller8-Mar-12 22:17
Bernhard Hiller8-Mar-12 22:17 
QuestionModules don't like Overloading Pin
Clark Kent1237-Mar-12 8:43
professionalClark Kent1237-Mar-12 8:43 
AnswerRe: Modules don't like Overloading Pin
Eddy Vluggen7-Mar-12 11:10
professionalEddy Vluggen7-Mar-12 11:10 
AnswerRe: Modules don't like Overloading Pin
Simon_Whale7-Mar-12 11:28
Simon_Whale7-Mar-12 11:28 
QuestionRe: Modules don't like Overloading Pin
Clark Kent1238-Mar-12 1:35
professionalClark Kent1238-Mar-12 1:35 
AnswerRe: Modules don't like Overloading Pin
Simon_Whale8-Mar-12 1:49
Simon_Whale8-Mar-12 1:49 
GeneralRe: Modules don't like Overloading Pin
Clark Kent1238-Mar-12 3:42
professionalClark Kent1238-Mar-12 3:42 
GeneralRe: Modules don't like Overloading Pin
Simon_Whale8-Mar-12 3:48
Simon_Whale8-Mar-12 3:48 
AnswerRe: Modules don't like Overloading Pin
Dave Kreskowiak7-Mar-12 11:59
mveDave Kreskowiak7-Mar-12 11:59 
QuestionRe: Modules don't like Overloading Pin
Clark Kent1238-Mar-12 1:31
professionalClark Kent1238-Mar-12 1:31 
AnswerRe: Modules don't like Overloading Pin
Dave Kreskowiak8-Mar-12 3:14
mveDave Kreskowiak8-Mar-12 3:14 
QuestionForce the vertical scrollbar down Pin
Brandon-X120007-Mar-12 2:39
Brandon-X120007-Mar-12 2:39 
AnswerRe: Force the vertical scrollbar down Pin
Dave Kreskowiak7-Mar-12 3:37
mveDave Kreskowiak7-Mar-12 3:37 
GeneralRe: Force the vertical scrollbar down Pin
Brandon-X120007-Mar-12 5:35
Brandon-X120007-Mar-12 5:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.