Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---make.bat---
- @echo off
- for /f "usebackq" %%d in (`dir/w %WINDIR%\Microsoft.NET\Framework ^| findstr [v`) do set dotnetdir=%%d
- set dotnetdir=%dotnetdir:[=%
- set dotnetdir=%dotnetdir:]=%
- rem echo %dotnetdir%
- set VBCOMPILER=%windir%\Microsoft.NET\Framework\%dotnetdir%\vbc.exe
- %VBCOMPILER% /target:winexe /main:App /platform:anycpu /out:skeleton.exe Main.vb Form1.vb
- pause
- ---end make.bat---
- ---Main.vb---
- Imports System
- Imports System.Windows.Forms
- Public Class App
- <STAThread()> _
- Shared Sub Main()
- Application.EnableVisualStyles()
- Application.Run(New Form1)
- End Sub
- End Class
- ---end Main.vb---
- ---Form1.vb---
- Imports System
- Imports System.Windows.Forms
- Public Class Form1
- Inherits Form
- Public WithEvents Button1 As Button
- Public Sub New()
- Button1 = New Button
- Button1.Top = 10
- Button1.Left = 10
- Button1.Text = "hello"
- Me.Controls.Add(Button1)
- End Sub
- Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
- MessageBox.Show("hello")
- End Sub
- End Class
- ---end Form1.vb---
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement