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 07.01.2000

Diese Seite wurde zuletzt aktualisiert am 07.01.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 der Klasse clsStoreScaleMode

Option Explicit

Public Enum ssmErrorConstants
  ssmErrNoScaleModeProperty = vbObjectError + 10001
  ssmErrNoScaleProperties = vbObjectError + 10002
  ssmErrNoObject = vbObjectError + 10003
  ssmErrUnknown = vbObjectError + 10010
End Enum

Private pObject As Object
Private pScaleHeight As Single
Private pScaleLeft As Single
Private pScaleMode As ScaleModeConstants
Private pScaleTop As Single
Private pScaleWidth As Single

Public Property Get Object() As Object
  Set Object = pObject
End Property

Public Property Set Object(New_Object As Object)
  Set pObject = New_Object
End Property

Public Property Get ScaleHeight() As Single
  ScaleHeight = pScaleHeight
End Property

Public Property Let ScaleHeight(ByVal New_ScaleHeight As Single)
  pScaleHeight = New_ScaleHeight
  pScaleMode = vbUser
End Property

Public Property Get ScaleLeft() As Single
  ScaleLeft = pScaleLeft
End Property

Public Property Let ScaleLeft(ByVal New_ScaleLeft As Single)
  pScaleLeft = New_ScaleLeft
  pScaleMode = vbUser
End Property

Public Property Get ScaleMode() As ScaleModeConstants
  ScaleMode = pScaleMode
End Property

Public Property Let ScaleMode(ByVal New_ScaleMode _
 As ScaleModeConstants)
  pScaleMode = New_ScaleMode
End Property

Public Property Get ScaleTop() As Single
  ScaleTop = pScaleTop
End Property

Public Property Let ScaleTop(ByVal New_ScaleTop As Single)
  pScaleTop = New_ScaleTop
  pScaleMode = vbUser
End Property

Public Property Get ScaleWidth() As Single
  ScaleWidth = pScaleWidth
End Property

Public Property Let ScaleWidth(ByVal New_ScaleWidth As Single)
  pScaleWidth = New_ScaleWidth
  pScaleMode = vbUser
End Property

Public Sub Store(Object As Object, _
 Optional ByVal StoreObject As Boolean = True)

  Dim nObject As Object
  
  If StoreObject Then
    Set pObject = Object
    Set nObject = pObject
  Else
    If Object Is Nothing Then
      Set nObject = pObject
    Else
      Set nObject = Object
    End If
  End If
  If nObject Is Nothing Then
    Err.Raise ssmErrNoObject, "clsStoreScaleMode.Store", _
     "Kein Objekt."
  Else
    With nObject
      On Error Resume Next
      pScaleMode = .ScaleMode
      Select Case Err.Number
        Case 0
          pScaleLeft = .ScaleLeft
          pScaleTop = .ScaleTop
          pScaleHeight = .ScaleHeight
          pScaleWidth = .ScaleWidth
          Select Case Err.Number
            Case 438
              Err.Raise ssmErrNoScaleProperties, _
               "clsStoreScaleMode.Store", _
               "Objekt verfügt nicht über Scale-Eigenschaften."
            Case Else
              Err.Raise ssmErrUnknown, _
               "clsStoresScaleMode.Store", _
               "Objekt-Fehler Nr. " & Err.Number
          End Select
        Case 438
          Err.Raise ssmErrNoScaleModeProperty, _
           "clsStoreScaleMode.Store", _
           "Objekt verfügt nicht über ScaleMode-Eigenschaft."
        Case Else
          Err.Raise ssmErrUnknown, _
           "clsStoresScaleMode.Store", _
           "Objekt-Fehler Nr. " & Err.Number
      End Select
    End With
  End With
End Sub

Public Sub Restore(Optional Object As Object)
  Dim nObject As Object
  
  If Object Is Nothing Then
    Set nObject = pObject
  Else
    Set nObject = Object
  End If
  If nObject Is Nothing Then
    Err.Raise ssmErrNoObject, "clsStoreScaleMode.Restore", _
     "Kein Objekt."
  Else
    With Object
      On Error Resume Next
      .ScaleMode = pScaleMode
      Select Case Err.Number
        Case 0
          If pScaleMode = vbUser Then
            .ScaleLeft = pScaleLeft
            .ScaleTop = pScaleTop
            .ScaleHeight = pScaleHeight
            .ScaleWidth = pScaleWidth
            Select Case Err.Number
              Case 438
                Err.Raise ssmErrNoScaleProperties, _
                 "clsStoreScaleMode.Restore", _
                 "Objekt verfügt nicht über Scale-Eigenschaften."
              Case Else
                Err.Raise ssmErrUnknown, _
                 "clsStoresScaleMode.Restore", _
                 "Objekt-Fehler Nr. " & Err.Number
            End Select
          End If
        Case 438
          Err.Raise ssmErrNoScaleModeProperty, _
           "clsStoreScaleMode.Restore", _
           "Objekt verfügt nicht über ScaleMode-Eigenschaft."
        Case Else
          Err.Raise ssmErrUnknown, _
           "clsStoresScaleMode.Restore", _
           "Objekt-Fehler Nr. " & Err.Number
      End Select
    End With
  End With
End Sub

Private Sub Class_Terminate()
  Set pObject = Nothing
End Su

Zurück zu "ScaleMode-Speicher" 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