Form.Text : Form « System.Windows.Forms « VB.Net by API






Form.Text

  
Option Strict On

Imports System.Drawing
Imports System.Windows.Forms

Public Class Form1 : Inherits Form
   Private WithEvents cmdClickCtr As Button = New Button()

   Public Sub New()
      Me.cmdClickCtr.Location = New Point(100, 75)
      Me.cmdClickCtr.Size = New Size(100, 50)
      Me.cmdClickCtr.Text = "Click Counter"
      
      Me.Controls.Add(cmdClickCtr)
      Me.Text = "Click Counter"
   End Sub
   
   Private Sub cmdClickCtr_Click(ByVal sender As System.Object, _
               ByVal e As System.EventArgs) _
               Handles cmdClickCtr.Click
      Static ctr As Integer = 1
      MsgBox("Button was clicked " & ctr & " times.")
      ctr += 1
   End Sub
   
   Public Shared Sub Main()
      Dim frm As New Form1()
      frm.ShowDialog()
   End Sub
End Class

   
    
  








Related examples in the same category

1.Inherits Form
2.Form.AcceptButton
3.Form.Activated
4.Form.AddOwnedForm
5.Form.AutoScaleBaseSize
6.Form.AutoScroll
7.Form.CancelButton
8.Form.Click
9.Form.ClientSize
10.Form.Controls
11.Form.Controls.Add
12.Form.Controls.AddRange
13.Form.CreateGraphics
14.Form.Deactivate
15.Form.Enter
16.Form.FormBorderStyle
17.Form.Icon
18.Form.IsMdiContainer
19.Form.LayoutMdi
20.Form.Leave
21.Form.Load
22.Form.MdiParent
23.Form.Menu
24.Form.MouseDown
25.Form.MouseMove
26.Form.MouseUp
27.Form.OnNotifyMessage
28.Form.OnPaint
29.Form.OnResize
30.Form.Opacity
31.Form.Paint
32.Form.Region
33.Form.RemoveOwnedForm
34.Form.Resize
35.Form.ResizeRedraw
36.Form.SetStyle
37.Form.ShowDialog
38.Form.Size
39.Form.StartPosition
40.Form.TransparencyKey
41.Form.WndProc