Author Topic: A simple VB2008 question.  (Read 4049 times)

0 Members and 1 Guest are viewing this topic.

Offline !Donovan

  • Web Analyst
  • Avast Evangelist
  • Super Poster
  • ***
  • Posts: 2219
    • The WAR Against Malware
A simple VB2008 question.
« on: May 31, 2009, 07:05:01 AM »
I was making a Message Maker and I tryed to add a view code feature so you could view the code on how to make the application. Didn't go well. The code is here:

Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If RadioButton1.Checked = True Then
            MsgBox(TextBox1.Text, MsgBoxStyle.Critical, TextBox2.Text)
        ElseIf RadioButton2.Checked = True Then
            MsgBox(TextBox1.Text, MsgBoxStyle.Exclamation, TextBox2.Text)
        ElseIf RadioButton3.Checked = True Then
            MsgBox(TextBox1.Text, MsgBoxStyle.Information, TextBox2.Text)
        ElseIf RadioButton4.Checked = True Then
            MsgBox(TextBox1.Text, MsgBoxStyle.Question, TextBox2.Text)
        End If
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Dim CodeInfoMsgBoxTry1 As String
        Dim CodeInfoMsgBoxTry2 As String
        Dim CodeInfoMsgBoxTry3 As String
        CodeInfoMsgBoxTry1 = TextBox1.Text
        CodeInfoMsgBoxTry2 = TextBox2.Text
        CodeInfoMsgBoxTry3 = RadioButton1.Text
        MsgBox("MsgBox(" + CodeInfoMsgBoxTry1 + ")," + CodeInfoMsgBoxTry2 + ")," + CodeInfoMsgBoxTry3 + "),")
    End Sub
End Class
Familiarize Yourself! | Educate Yourself! | Beautify Yourself! | Scan Yourself!
"People who say it cannot be done should not interrupt those who are doing it."