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

Home
VB.Net by API
1.Microsoft.VisualBasic
2.Microsoft.Win32
3.System
4.System.Collections
5.System.Collections.Generic
6.System.Collections.Specialized
7.System.ComponentModel
8.System.Configuration.ConfigurationSettings
9.System.Data
10.System.Data.Odbc
11.System.Data.OleDb
12.System.Data.OracleClient
13.System.Data.SqlClient
14.System.Diagnostics
15.System.Drawing
16.System.Drawing.Drawing2D
17.System.Drawing.Imaging
18.System.Drawing.Printing
19.System.Drawing.Text
20.System.Globalization
21.System.IO
22.System.IO.IsolatedStorage
23.System.IO.Ports
24.System.Media
25.System.Messaging
26.System.Net
27.System.Net.Sockets
28.System.Reflection
29.System.Runtime.InteropServices
30.System.Runtime.Remoting.Channels
31.System.Runtime.Serialization
32.System.Runtime.Serialization.Formatters.Binary
33.System.Runtime.Serialization.Formatters.Soap
34.System.Security.Cryptography
35.System.Security.Cryptography.X509Certificates
36.System.Security.Permissions
37.System.Security.Principal
38.System.ServiceProcess
39.System.Text
40.System.Text.RegularExpressions
41.System.Threading
42.System.Web
43.System.Web.Mail
44.System.Windows.Forms
45.System.Xml
46.System.Xml.Schema
47.System.Xml.Serialization
48.System.Xml.Xsl
VB.Net
VB.Net Tutorial
VB.Net by API » System.Windows.Forms » Form 
Form.Size
  

Imports System.Windows.Forms

public class FormDemo
   public Shared Sub Main
        Application.Run(New Form1)
   End Sub
End class

Public Class Form1
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is NothingThen
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub
    Friend WithEvents Button1 As System.Windows.Forms.Button
    Friend WithEvents Button2 As System.Windows.Forms.Button
    Friend WithEvents btnChangeColor As System.Windows.Forms.Button
    Friend WithEvents btnRGB As System.Windows.Forms.Button
    Friend WithEvents btnCompare As System.Windows.Forms.Button
    Friend WithEvents btnFont As System.Windows.Forms.Button
    Friend WithEvents btnBigger As System.Windows.Forms.Button
    Friend WithEvents btnSmaller As System.Windows.Forms.Button
    Friend WithEvents btnFormText As System.Windows.Forms.Button

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()Private Sub InitializeComponent()
        Dim configurationAppSettings As System.Configuration.AppSettingsReader = New System.Configuration.AppSettingsReader()
        Me.Button1 = New System.Windows.Forms.Button()
        Me.Button2 = New System.Windows.Forms.Button()
        Me.btnChangeColor = New System.Windows.Forms.Button()
        Me.btnRGB = New System.Windows.Forms.Button()
        Me.btnCompare = New System.Windows.Forms.Button()
        Me.btnFont = New System.Windows.Forms.Button()
        Me.btnBigger = New System.Windows.Forms.Button()
        Me.btnSmaller = New System.Windows.Forms.Button()
        Me.btnFormText = New System.Windows.Forms.Button()
        Me.SuspendLayout()
        '
        'Button1
        '
        Me.Button1.Location = New System.Drawing.Point(5616)
        Me.Button1.Name = "Button1"
        Me.Button1.TabIndex = 1
        Me.Button1.TabStop = False
        Me.Button1.Text = "Button1"
        '
        'Button2
        '
        Me.Button2.Location = New System.Drawing.Point(21616)
        Me.Button2.Name = "Button2"
        Me.Button2.TabIndex = 0
        Me.Button2.TabStop = False
        Me.Button2.Text = "Button2"
        '
        'btnChangeColor
        '
        Me.btnChangeColor.Location = New System.Drawing.Point(5656)
        Me.btnChangeColor.Name = "btnChangeColor"
        Me.btnChangeColor.Size = New System.Drawing.Size(12823)
        Me.btnChangeColor.TabIndex = 2
        Me.btnChangeColor.Text = "Change Color"
        '
        'btnRGB
        '
        Me.btnRGB.Location = New System.Drawing.Point(5696)
        Me.btnRGB.Name = "btnRGB"
        Me.btnRGB.Size = New System.Drawing.Size(12823)
        Me.btnRGB.TabIndex = 3
        Me.btnRGB.Text = "Use RGB"
        '
        'btnCompare
        '
        Me.btnCompare.Location = New System.Drawing.Point(56136)
        Me.btnCompare.Name = "btnCompare"
        Me.btnCompare.Size = New System.Drawing.Size(12824)
        Me.btnCompare.TabIndex = 4
        Me.btnCompare.Text = "Compare"
        '
        'btnFont
        '
        Me.btnFont.Font = New System.Drawing.Font("Edwardian Script ITC"20.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.btnFont.Location = New System.Drawing.Point(56184)
        Me.btnFont.Name = "btnFont"
        Me.btnFont.Size = New System.Drawing.Size(20864)
        Me.btnFont.TabIndex = 5
        Me.btnFont.Text = "Change Font!"
        '
        'btnBigger
        '
        Me.btnBigger.Location = New System.Drawing.Point(64264)
        Me.btnBigger.Name = "btnBigger"
        Me.btnBigger.Size = New System.Drawing.Size(8024)
        Me.btnBigger.TabIndex = 6
        Me.btnBigger.Text = "Bigger"
        '
        'btnSmaller
        '
        Me.btnSmaller.Location = New System.Drawing.Point(64304)
        Me.btnSmaller.Name = "btnSmaller"
        Me.btnSmaller.Size = New System.Drawing.Size(8024)
        Me.btnSmaller.TabIndex = 7
        Me.btnSmaller.Text = "Smaller"
        '
        'btnFormText
        '
        Me.btnFormText.Location = New System.Drawing.Point(64344)
        Me.btnFormText.Name = "btnFormText"
        Me.btnFormText.Size = New System.Drawing.Size(12832)
        Me.btnFormText.TabIndex = 8
        Me.btnFormText.Text = "Change Form Text"
        '
        'Form1
        '
        Me.AcceptButton = Me.Button2
        Me.AutoScaleBaseSize = New System.Drawing.Size(513)
        Me.AutoScroll = True
        Me.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(128, Byte), CType(128, Byte))
        Me.ClientSize = New System.Drawing.Size(320382)
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.btnFormText, Me.btnSmaller, Me.btnBigger, Me.btnFont, Me.btnCompare, Me.btnRGB, Me.btnChangeColor, Me.Button2, Me.Button1})
        Me.ForeColor = System.Drawing.Color.Black
        Me.Name = "Form1"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = "old value"
        Me.TopMost = True
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgsHandles Button1.Click
        MsgBox("I am Button1!")
    End Sub

    Private Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgsHandles Button2.Click
        MsgBox("I am Button2!")
    End Sub

    Private Sub btnChangeColor_Click(ByVal sender As Object, ByVal e As System.EventArgsHandles btnChangeColor.Click
        Me.BackColor = System.Drawing.Color.Yellow
    End Sub

    Private Sub btnRGB_Click(ByVal sender As Object, ByVal e As System.EventArgsHandles btnRGB.Click
        Me.BackColor = System.Drawing.Color.Red
    End Sub

    Private Sub btnCompare_Click(ByVal sender As Object, ByVal e As System.EventArgsHandles btnCompare.Click
        Dim formcolor As System.Drawing.Color
        formcolor = Me.BackColor
        If System.Drawing.Color.op_Equality(formcolor, System.Drawing.color.AliceBlueThen
            MsgBox("Color changed!")
        Else
            MsgBox("Not yet")
        End If
    End Sub

    Private Sub btnFont_Click(ByVal sender As Object, ByVal e As System.EventArgsHandles btnFont.Click
        Me.btnFont.Font = New System.Drawing.Font("WingDings"20)

    End Sub

    Private Sub btnBigger_Click(ByVal sender As Object, ByVal e As System.EventArgsHandles btnBigger.Click
        Me.Size = New System.Drawing.Size(500600)
    End Sub

    Private Sub btnSmaller_Click(ByVal sender As Object, ByVal e As System.EventArgsHandles btnSmaller.Click
        Me.Size = New System.Drawing.Size(100150)
    End Sub

    Private Sub btnFormText_Click(ByVal sender As Object, ByVal e As System.EventArgsHandles btnFormText.Click
        Me.Text = " new Text"
    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.StartPosition
39.Form.Text
40.Form.TransparencyKey
41.Form.WndProc
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.