demo:vb.net 打开记事本、beep、msgbox、取程序路径

来源:百度文库 编辑:神马文学网 时间:2024/10/02 19:07:54
demo:vb.net 打开记事本、beep、msgbox、取程序路径━━━━━━━━━━━━━━━━━━━━━━━━━━   Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click        Shell("notepad.exe", AppWinStyle.NormalFocus)    End Sub
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click        Dim a As Integer        a = 1        If a < 1 Then            MsgBox("ok")        Else            If MsgBox("no", MsgBoxStyle.OkCancel + 32, "message") = MsgBoxResult.Ok Then End        End If        Console.Beep()        End    End Sub
    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click        MsgBox(Application.StartupPath)    End Sub