Form/ 폼 중앙 배치
*
Me.Location = New Point(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width() / 2 - 200, System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height() / 2 - 200)

원래 폼 사이즈 800*400 폼을 400,400 사이즈 변경 후

 

중앙에 위치하게

 

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Me.Size = New System.Drawing.Size(400, 400)

        Me.Location = New Point(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width() / 2 - 200, System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height() / 2 - 200)

    End Sub

이 게시물을

댓글'2'

GroupBox 이동 

 

Public Class Form1

 

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Me.Size = New System.Drawing.Size(400, 400)

        MaximizeBox = False

        MinimizeBox = False

        Me.Location = New Point(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width() / 2 - 200, System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height() / 2 - 200)

        Button1.Text = ">"

    End Sub

 

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        If Button1.Text = ">" Then

            GroupBox1.Location = New Point(-10, -10)

            GroupBox1.Size = New System.Drawing.Size(420, 420)

            Button1.Text = "<"

        Else

            GroupBox1.Location = New Point(400, 10)

            GroupBox1.Size = New System.Drawing.Size(420, 420)

            Button1.Text = ">"

        End If

  

    End Sub

End Class

 

이 댓글을

Me.BackColor = Color.FromArgb(255,255,255)

이 댓글을

공유하기

SEARCH

MENU NAVIGATION