hiro1357 icon

VB.NET Form Application Skeleton

hiro1357 | PRO | 12/02/15 10:26:03 AM UTC | 0 ⭐ | 386 👁️ | Never ⏰ | []
text |

1.07 KB

|

None

|

0 👍

/

0 👎

---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---

Comments