home *** CD-ROM | disk | FTP | other *** search
- '************************************************
- ' File: Form.vb (21-Aug-2002)
- ' Author: G. Born www.borncity.de
- '
- ' Class with Main Sub, Creates a simple form
- '
- ' Compile with:
- ' vbc <name>.vbs /t:winexe /Win32Icon:<name>.ico
- ' /r:system.dll /r:system.windows.forms.dll
- ' /r:system.drawing.dll
- '************************************************
- Option Strict
-
- Imports System.Drawing
- Imports System.Windows.Forms
-
- Module Formular
-
- Sub Main() ' Main to invoke form
- Dim oForm As New frmHaupt() ' instantiate form
- oForm.ShowDialog () ' show form
- oForm.Dispose() ' destroy object
- End Sub
-
- Public Class frmHaupt
- ' This ist the Class-Code to create a form
- Inherits System.Windows.Forms.Form
- Sub New() ' New-Construktor to create form
- MyBase.New() ' create from base class
- With Me
- .Text = "My simple form" ' title text
- .Width = 300
- .Height = 100
- .Left = 100
- .Top = 200
-
-
- End With
- End Sub
- End Class
- End Module
-