Guest User

Untitled

a guest
Feb 18th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.96 KB | None | 0 0
  1.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  2.         'I. Creer un GroupBox
  3.         '1. Declarer la variable
  4.         Dim myGroupBox As New GroupBox
  5.         '2. Initializer les propriétés
  6.         myGroupBox.Size = New Size(500, 300)
  7.         myGroupBox.Location = New Point(10, 10)
  8.         myGroupBox.Text = "Mon GroupBox"
  9.         '3. Attchaer le GroupBox à ma Form (Me)
  10.         Me.Controls.Add(myGroupBox)
  11.         '--------------------------------------------------
  12.         'II. Creer un RadioButton
  13.         '1. Declarer la variable
  14.         Dim myRadioButton As New RadioButton
  15.         '2. Initializer les propriétés
  16.         myRadioButton.Location = New Point(10, 100)
  17.         myRadioButton.AutoSize = True
  18.         myRadioButton.Text = "Mon RadioButton"
  19.         myRadioButton.Checked = True
  20.         '3. Attacher le RadioButton au GroupBox
  21.         myGroupBox.Controls.Add(myRadioButton)
  22.     End Sub
Add Comment
Please, Sign In to add comment