Example : How to open another form control from one form.
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
        Form2.ShowDialog()
        'Form2.Show()
End Sub

NB : Write code on first form on button click event.
Example : How to Hide another form control from one form.
 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
     Me.Hide()
     Form2.ShowDialog()
 End Sub
Example : How to set Form name or title head dynamically using VB .Net code.
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load        
        Me.Text = "Codershelpline.com"       
End Sub
Example : How to set Form Background Color dynamically using VB .Net code.
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Me.BackColor = Color.Blue
End Sub
Example : How to Maximize the Form Window dynamically using VB .Net code.
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Me.WindowState = FormWindowState.Maximized
End Sub
Example : How to Make a Form at the Topmost level of another form dynamically using VB .Net code.
 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
     Me.TopMost = True
 End Sub
Example : How to Make a Child Form appear at the Center of the Screen/Parent form dynamically using VB .Net code.
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Me.StartPosition = FormStartPosition.CenterScreen
    Me.StartPosition = FormStartPosition.CenterParent
End Sub
Example : How to Set the Size of a Form to do work dynamically using VB .Net code.
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Me.Width = 900
    Me.Height = 900
End Sub
Example : How to Set/Make a Form with a different format to do work dynamically using VB .Net code.
  Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
     Me.FormBorderStyle = FormBorderStyle.None  'A form with no menu bar and control buttons   
     Me.FormBorderStyle = FormBorderStyle.Sizable  'Normal form with all buttons
     Me.FormBorderStyle = FormBorderStyle.FixedSingle  'A form with fixed size and some control buttons
     Me.FormBorderStyle = FormBorderStyle.FixedDialog  'A form with fixed size and all control buttons
     Me.FormBorderStyle = FormBorderStyle.FixedToolWindow  'A form with fixed size and only close control buttons

  End Sub

Loading

Categories: VB .Net Codes

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.