ABOUT Visual Basic Programmieren Programmierung Download Downloads Tips & Tricks Tipps & Tricks Know-How Praxis VB VBA Visual Basic for Applications VBS VBScript Scripting Windows ActiveX COM OLE API ComputerPC Microsoft Office Microsoft Office 97 Office 2000 Access Word Winword Excel Outlook Addins ASP Active Server Pages COMAddIns ActiveX-Controls OCX UserControl UserDocument Komponenten DLL EXE
Diese Seite wurde zuletzt aktualisiert am 28.06.2000

Diese Seite wurde zuletzt aktualisiert am 28.06.2000
Aktuell im ABOUT Visual Basic-MagazinGrundlagenwissen und TechnologienKnow How, Tipps und Tricks rund um Visual BasicAddIns für die Visual Basic-IDE und die VBA-IDEVBA-Programmierung in MS-Office und anderen AnwendungenScripting-Praxis für den Windows Scripting Host und das Scripting-ControlTools, Komponenten und Dienstleistungen des MarktesRessourcen für Programmierer (Bücher, Job-Börse)Dies&Das...

Themen und Stichwörter im ABOUT Visual Basic-Magazin
Code, Beispiele, Komponenten, Tools im Überblick, Shareware, Freeware
Ihre Service-Seite, Termine, Job-Börse
Melden Sie sich an, um in den vollen Genuss des ABOUT Visual Basic-Magazins zu kommen!
Informationen zur AVB-Web-Site, Kontakt und Impressum

Zurück...

Zurück...


Anzeige

Code des Controls FontGroupCtl

Private mFontGroup As FontGroup

Public Property Get CountAttached() As Long
  CountAttached = mFontGroup.CountAttached
End Property

Public Property Get Font() As StdFont
  Set Font = mFontGroup.Font
End Property

Public Property Let Font(New_Font As StdFont)
  mFontGroup.Font = New_Font
  PropertyChanged "Font"
End Property

Public Property Set Font(New_Font As StdFont)
  Set mFontGroup.Font = New_Font
  PropertyChanged "Font"
End Property

Public Property Get FontTemplates() As FontTemplates
  Set FontTemplates = mFontGroup.FontTemplates
End Property

Public Property Get ForeColor() As OLE_COLOR
  ForeColor = mFontGroup.ForeColor
End Property

Public Property Let ForeColor(ByVal New_ForeColor As OLE_COLOR)
  mFontGroup.ForeColor = New_ForeColor
  PropertyChanged "ForeColor"
End Property

Public Property Get TestCaption() As String
  TestCaption = cmd.Caption
End Property

Public Property Let TestCaption(New_TestCaption As String)
  cmd.Caption = New_TestCaption
  PropertyChanged "TestCaption"
End Property

Public Sub AttachControls(ParamArray Controls() As Variant)
  mFontGroup.AttachControls Controls
End Sub

Public Sub DetachControls(ParamArray Controls() As Variant)
  mFontGroup.DetachControls Controls
End Sub

Public Sub SelectFontTemplate(KeyIndex As Variant)
  mFontGroup.SelectFontTemplate KeyIndex
End Sub

Private Sub UserControl_Initialize()
  Set mFontGroup = New FontGroup
End Sub

Private Sub UserControl_InitProperties()
  With mFontGroup
    Set .Font = Ambient.Font
    .FontTemplates.Add "Ambient", Ambient.Font
  End With
End Sub

Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
  With mFontGroup
    Set .Font = PropBag.ReadProperty("Font", Ambient.Font)
    .ForeColor = PropBag.ReadProperty("ForeColor", vbWindowText)
    .FontTemplates.Add "Ambient", Ambient.Font
  End With
  cmd.Caption = PropBag.ReadProperty("TestCaption", "ABC")
End Sub

Private Sub UserControl_Resize()
  If Not Ambient.UserMode Then
    With UserControl
      cmd.Move 0, 0, .ScaleWidth, .ScaleHeight
    End With
  End If
End Sub

Private Sub UserControl_Show()
  mFontGroup.AttachControls cmd
End Sub

Private Sub UserControl_Terminate()
  Set mFontGroup = Nothing
End Sub

Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
  With mFontGroup
    PropBag.WriteProperty "Font", .Font, Ambient.Font
    PropBag.WriteProperty "ForeColor", .ForeColor, vbWindowText
  End With
  PropBag.WriteProperty "TestCaption", cmd.Caption, "ABC"
End Sub

Zurück zu "Font-Gemeinsamkeiten" Zurück zum Text   


Komponenten-Übersicht

Zum Seitenanfang

Copyright © 1999 - 2017 Harald M. Genauck, ip-pro gmbh  /  Impressum

Zum Seitenanfang

Zurück...

Zurück...

Download Internet Explorer