Label.Font.Style : Label « 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 » Label 
Label.Font.Style
  




Imports System.Windows.Forms
Imports System.Drawing
Imports System.Drawing.Drawing2D

public class CheckBoxEvent
   public Shared Sub Main
        Application.Run(New FrmCheckBox)
   End Sub
End class


Public Class FrmCheckBox
   Inherits System.Windows.Forms.Form
   Friend WithEvents chkItalic As System.Windows.Forms.CheckBox
   Friend WithEvents lblOutput As System.Windows.Forms.Label
   Friend WithEvents chkBold As System.Windows.Forms.CheckBox

   Public Sub New()
      MyBase.New()

      Me.lblOutput = New System.Windows.Forms.Label()
      Me.chkItalic = New System.Windows.Forms.CheckBox()
      Me.chkBold = New System.Windows.Forms.CheckBox()
      Me.SuspendLayout()
      Me.lblOutput.Font = New System.Drawing.Font("Microsoft Sans Serif"11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
      Me.lblOutput.Location = New System.Drawing.Point(4824)
      Me.lblOutput.Name = "lblOutput"
      Me.lblOutput.Size = New System.Drawing.Size(20824)
      Me.lblOutput.TabIndex = 0
      Me.lblOutput.Text = "Watch the font style change"
      '
      'chkItalic
      '
      Me.chkItalic.Font = New System.Drawing.Font("Microsoft Sans Serif"9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
      Me.chkItalic.Location = New System.Drawing.Point(15264)
      Me.chkItalic.Name = "chkItalic"
      Me.chkItalic.Size = New System.Drawing.Size(6424)
      Me.chkItalic.TabIndex = 2
      Me.chkItalic.Text = "Italic"
      '
      'chkBold
      '
      Me.chkBold.Font = New System.Drawing.Font("Microsoft Sans Serif"9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
      Me.chkBold.Location = New System.Drawing.Point(8064)
      Me.chkBold.Name = "chkBold"
      Me.chkBold.Size = New System.Drawing.Size(5624)
      Me.chkBold.TabIndex = 1
      Me.chkBold.Text = "Bold"
      '
      'FrmCheckBox
      '
      Me.AutoScaleBaseSize = New System.Drawing.Size(614)
      Me.ClientSize = New System.Drawing.Size(292117)
      Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.chkItalic, Me.chkBold, Me.lblOutput})
      Me.Font = New System.Drawing.Font("Microsoft Sans Serif"9!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
      Me.Name = "FrmCheckBox"
      Me.Text = "CheckBoxTest"
      Me.ResumeLayout(False)

   End Sub

   Private Sub chkItalic_CheckedChanged _
      (ByVal sender As System.Object, ByVal e As System.EventArgs_
      Handles chkItalic.CheckedChanged

      lblOutput.Font = New Font("Microsoft Sans Serif", _
         lblOutput.Font.Size, lblOutput.Font.Style Xor FontStyle.Italic)
   End Sub 

   Private Sub chkBold_CheckedChanged _
      (ByVal sender As System.Object, ByVal e As System.EventArgs_
      Handles chkBold.CheckedChanged

      lblOutput.Font = New Font("Microsoft Sans Serif", _
         lblOutput.Font.Size, lblOutput.Font.Style Xor FontStyle.Bold)
   End Sub 

End Class 

   
    
  
Related examples in the same category
1.Label.BorderStyle
2.Label.Click
3.Label.DataBindings.Add
4.Label.DoDragDrop
5.Label.DoubleClick
6.Label.DragDrop
7.Label.DragEnter
8.Label.Font.Size
9.Label.ForeColor
10.Label.Image
11.Label.ImageAlign
12.Label.ImageIndex
13.Label.ImageList
14.Label.MouseDown
15.Label.MouseEnter
16.Label.MouseHover
17.Label.MouseLeave
18.Label.MouseMove
19.Label.MouseUp
20.Label.MouseWheel
21.Label.SetBounds
22.Label.Text
23.Label.TextAlign
24.Label.Visible
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.