VERSION 5.00 Object = "{F4B4BFE0-25E1-11D0-B26A-006008104BEC}#1.0#0"; "VW4Key.ocx" Begin VB.UserControl VWTrendTime ClientHeight = 4125 ClientLeft = 0 ClientTop = 0 ClientWidth = 7575 LockControls = -1 'True PropertyPages = "VWTrendTime.ctx":0000 ScaleHeight = 275 ScaleMode = 3 'Pixel ScaleWidth = 505 ToolboxBitmap = "VWTrendTime.ctx":003E Begin VW4KeyLib.VWKey key Height = 975 Index = 0 Left = 0 TabIndex = 0 Top = 0 Width = 1155 _Version = 65536 _ExtentX = 2037 _ExtentY = 1720 _StockProps = 72 BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Alignment = 1 Caption = "" End Begin VW4KeyLib.VWKey key Height = 975 Index = 2 Left = 2400 TabIndex = 2 Top = 0 Width = 1155 _Version = 65536 _ExtentX = 2037 _ExtentY = 1720 _StockProps = 72 BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Alignment = 1 Caption = "" End Begin VW4KeyLib.VWKey key Height = 975 Index = 3 Left = 3600 TabIndex = 3 Top = 0 Width = 1155 _Version = 65536 _ExtentX = 2037 _ExtentY = 1720 _StockProps = 72 BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Alignment = 1 Caption = "" End Begin VW4KeyLib.VWKey key Height = 975 Index = 4 Left = 4800 TabIndex = 4 Top = 0 Width = 1155 _Version = 65536 _ExtentX = 2037 _ExtentY = 1720 _StockProps = 72 BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Alignment = 1 Caption = "" End Begin VW4KeyLib.VWKey key Height = 975 Index = 1 Left = 1200 TabIndex = 1 Top = 0 Width = 1155 _Version = 65536 _ExtentX = 2037 _ExtentY = 1720 _StockProps = 72 BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Alignment = 1 Caption = "" End Begin VB.Timer timRepeat Enabled = 0 'False Interval = 1000 Left = 6420 Top = 180 End Begin VB.PictureBox Picture1 BorderStyle = 0 'Kein Height = 1200 Index = 5 Left = 6480 Picture = "VWTrendTime.ctx":0138 ScaleHeight = 1200 ScaleWidth = 915 TabIndex = 16 TabStop = 0 'False Tag = "0,7625" Top = 1800 Visible = 0 'False Width = 915 End Begin VB.PictureBox Picture2 AutoRedraw = -1 'True BorderStyle = 0 'Kein Height = 795 Index = 5 Left = 6720 ScaleHeight = 795 ScaleWidth = 555 TabIndex = 15 TabStop = 0 'False Top = 3120 Visible = 0 'False Width = 555 End Begin VB.PictureBox Picture2 AutoRedraw = -1 'True BorderStyle = 0 'Kein Height = 795 Index = 4 Left = 5580 ScaleHeight = 795 ScaleWidth = 555 TabIndex = 14 TabStop = 0 'False Top = 3120 Visible = 0 'False Width = 555 End Begin VB.PictureBox Picture1 BorderStyle = 0 'Kein Height = 1200 Index = 0 Left = 480 Picture = "VWTrendTime.ctx":02A0 ScaleHeight = 1200 ScaleWidth = 1200 TabIndex = 13 TabStop = 0 'False Tag = "1" Top = 1800 Visible = 0 'False Width = 1200 End Begin VB.PictureBox Picture1 BorderStyle = 0 'Kein Height = 1200 Index = 1 Left = 2040 Picture = "VWTrendTime.ctx":0400 ScaleHeight = 1200 ScaleWidth = 630 TabIndex = 12 TabStop = 0 'False Tag = "0,525" Top = 1800 Visible = 0 'False Width = 630 End Begin VB.PictureBox Picture2 AutoRedraw = -1 'True BorderStyle = 0 'Kein Height = 795 Index = 2 Left = 3060 ScaleHeight = 795 ScaleWidth = 555 TabIndex = 11 TabStop = 0 'False Top = 3120 Visible = 0 'False Width = 555 End Begin VB.PictureBox Picture2 AutoRedraw = -1 'True BorderStyle = 0 'Kein Height = 795 Index = 3 Left = 4320 ScaleHeight = 795 ScaleWidth = 555 TabIndex = 10 TabStop = 0 'False Top = 3120 Visible = 0 'False Width = 555 End Begin VB.PictureBox Picture2 AutoRedraw = -1 'True BorderStyle = 0 'Kein Height = 795 Index = 1 Left = 1980 ScaleHeight = 795 ScaleWidth = 555 TabIndex = 9 TabStop = 0 'False Top = 3120 Visible = 0 'False Width = 555 End Begin VB.PictureBox Picture2 AutoRedraw = -1 'True BorderStyle = 0 'Kein Height = 795 Index = 0 Left = 840 ScaleHeight = 795 ScaleWidth = 555 TabIndex = 8 TabStop = 0 'False Top = 3120 Visible = 0 'False Width = 555 End Begin VB.PictureBox Picture1 BorderStyle = 0 'Kein Height = 1200 Index = 4 Left = 5340 Picture = "VWTrendTime.ctx":04E6 ScaleHeight = 1200 ScaleWidth = 915 TabIndex = 7 TabStop = 0 'False Tag = "0,7625" Top = 1800 Visible = 0 'False Width = 915 End Begin VB.PictureBox Picture1 BorderStyle = 0 'Kein Height = 1200 Index = 2 Left = 3060 Picture = "VWTrendTime.ctx":064A ScaleHeight = 1200 ScaleWidth = 645 TabIndex = 6 TabStop = 0 'False Tag = "0,5375" Top = 1800 Visible = 0 'False Width = 645 End Begin VB.PictureBox Picture1 BorderStyle = 0 'Kein Height = 1200 Index = 3 Left = 3960 Picture = "VWTrendTime.ctx":0730 ScaleHeight = 1200 ScaleWidth = 1200 TabIndex = 5 TabStop = 0 'False Tag = "1" Top = 1800 Visible = 0 'False Width = 1200 End End Attribute VB_Name = "VWTrendTime" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = True Attribute VB_PredeclaredId = False Attribute VB_Exposed = False Option Explicit Public Enum EInterval inSecond = 0 inMinute = 1 inHour = 2 inDay = 3 inMonth = 4 inYear = 5 End Enum 'Eigenschaftsvariablen: Private m_TrendControl As String Private m_Orientation As EOrientation Private m_MaxChange As Integer Private m_MinChange As Integer Private m_MaxInterval As EInterval Private m_MinInterval As EInterval 'Definition der benötigten Konstanten: Private Const m_def_BackColor = &H8000000F Private Const m_def_FontClass = "" Private Const m_def_ForeColor = &H80000012 Private Const m_def_MaxInterval = inMinute Private Const m_def_MaxChange = 1 Private Const m_def_MinInterval = inSecond Private Const m_def_MinChange = 1 Private Const m_def_Orientation = orHorizontal Private Const m_def_TrendControl = "" Private Const m_def_Height = 495 Private Const m_def_Width = 3075 'interne Variablen Private objTrend As Object Private mgstrMaxInterval As String Private mgstrMinInterval As String '======================================================================================= 'öffentliche Ereignisse '======================================================================================= 'öffentliche Eigenschaften Public Property Get Alignment() As VWCAlign Attribute Alignment.VB_Description = "Textausrichtung innerhalb des Objektes" Attribute Alignment.VB_ProcData.VB_Invoke_Property = ";Darstellung" Alignment = key(0).Alignment End Property Public Property Let Alignment(ByVal NewValue As VWCAlign) SetAlignment NewValue PropertyChanged "Alignment" End Property Public Property Get BackColor() As OLE_COLOR Attribute BackColor.VB_Description = "Hintergrundfarbe" Attribute BackColor.VB_ProcData.VB_Invoke_Property = ";Darstellung" BackColor = key(0).BackColor End Property Public Property Let BackColor(ByVal NewValue As OLE_COLOR) SetBackColor NewValue PropertyChanged "BackColor" End Property Public Property Get CaptionBack() As String Attribute CaptionBack.VB_Description = "Beschriftung für die ""<""-Taste" Attribute CaptionBack.VB_ProcData.VB_Invoke_Property = "PVWIndexText;Text" CaptionBack = key(1).Caption End Property Public Property Let CaptionBack(ByVal NewValue As String) key(1).Caption = NewValue PropertyChanged "CaptionBack" End Property Public Property Get CaptionFastBack() As String Attribute CaptionFastBack.VB_Description = "Beschriftung für die ""<<""-Taste" Attribute CaptionFastBack.VB_ProcData.VB_Invoke_Property = "PVWIndexText;Text" CaptionFastBack = key(0).Caption End Property Public Property Let CaptionFastBack(ByVal NewValue As String) key(0).Caption = NewValue PropertyChanged "CaptionFastBack" End Property Public Property Get CaptionFastForward() As String Attribute CaptionFastForward.VB_Description = "Beschriftung für die "">>""-Taste" Attribute CaptionFastForward.VB_ProcData.VB_Invoke_Property = "PVWIndexText;Text" CaptionFastForward = key(3).Caption End Property Public Property Let CaptionFastForward(ByVal NewValue As String) key(3).Caption = NewValue PropertyChanged "CaptionFastForward" End Property Public Property Get CaptionForward() As String Attribute CaptionForward.VB_Description = "Beschriftung für die "">""-Taste" Attribute CaptionForward.VB_ProcData.VB_Invoke_Property = "PVWIndexText;Text" CaptionForward = key(2).Caption End Property Public Property Let CaptionForward(ByVal NewValue As String) key(2).Caption = NewValue PropertyChanged "CaptionForward" End Property Public Property Get CaptionOnline() As String Attribute CaptionOnline.VB_Description = "Beschriftung für die ""||""-Taste" Attribute CaptionOnline.VB_ProcData.VB_Invoke_Property = "PVWIndexText;Text" CaptionOnline = key(4).Caption End Property Public Property Let CaptionOnline(ByVal NewValue As String) key(4).Caption = NewValue PropertyChanged "CaptionOnline" End Property Public Property Get Enabled() As Boolean Attribute Enabled.VB_Description = "Legt fest, ob das Steuerelement auf Benutzereingaben per Tastatur oder Maus reagiert." Attribute Enabled.VB_ProcData.VB_Invoke_Property = ";Verhalten" Enabled = UserControl.Enabled End Property Public Property Let Enabled(ByVal NewValue As Boolean) SetEnabled NewValue PropertyChanged "Enabled" End Property 'Legt die Schriftart für die Darstellung der Namen fest Public Property Get Font() As Font Attribute Font.VB_Description = "Schriftart" Attribute Font.VB_ProcData.VB_Invoke_Property = ";Schriftart" Set Font = key(0).Font End Property Public Property Set Font(ByVal NewValue As Font) SetFont NewValue PropertyChanged "Font" End Property 'Legt die Fontklasse fest für die Darstellung der Namen. 'Dies ist optional zur Font-Eigenschaft, dadurch wird aber bei der Sprachumschaltung 'auch der Font automatisch aus der Projektdatenbank geladen. Public Property Get FontClass() As String Attribute FontClass.VB_Description = "Fontklasse, über die die sprachumgeschaltete Schriftart bestimmt wird" Attribute FontClass.VB_ProcData.VB_Invoke_Property = "PVWFontClass;Schriftart" FontClass = key(0).FontClass End Property Public Property Let FontClass(ByVal NewValue As String) SetFontClass NewValue PropertyChanged "FontClass" End Property Public Property Get ForeColor() As OLE_COLOR Attribute ForeColor.VB_Description = "Textfarbe" Attribute ForeColor.VB_ProcData.VB_Invoke_Property = ";Darstellung" ForeColor = key(0).ForeColor End Property Public Property Let ForeColor(ByVal NewValue As OLE_COLOR) SetForeColor NewValue PropertyChanged "ForeColor" End Property Public Property Get IndexGroup() As String Attribute IndexGroup.VB_Description = "Indextextgruppe, aus der die Texte für die Beschriftung geladen werden sollen" Attribute IndexGroup.VB_ProcData.VB_Invoke_Property = "PVWIndexText;Text" IndexGroup = key(0).IndexGroup End Property Public Property Let IndexGroup(ByVal NewValue As String) SetIndexGroup NewValue PropertyChanged "IndexGroup" End Property Public Property Get KeyBack() As Long Attribute KeyBack.VB_Description = "Tastencode für die ""<""-Taste" Attribute KeyBack.VB_ProcData.VB_Invoke_Property = "PVWKeyCode;Verhalten" KeyBack = key(1).key End Property Public Property Let KeyBack(ByVal NewValue As Long) key(1).key = NewValue PropertyChanged "KeyBack" End Property Public Property Get KeyFastBack() As Long Attribute KeyFastBack.VB_Description = "Tastencode für die ""<<""-Taste" Attribute KeyFastBack.VB_ProcData.VB_Invoke_Property = "PVWKeyCode;Verhalten" KeyFastBack = key(0).key End Property Public Property Let KeyFastBack(ByVal NewValue As Long) key(0).key = NewValue PropertyChanged "KeyFastBack" End Property Public Property Get KeyFastForward() As Long Attribute KeyFastForward.VB_Description = "Tastencode für die "">>""-Taste" Attribute KeyFastForward.VB_ProcData.VB_Invoke_Property = "PVWKeyCode;Verhalten" KeyFastForward = key(3).key End Property Public Property Let KeyFastForward(ByVal NewValue As Long) key(3).key = NewValue PropertyChanged "KeyFastForward" End Property Public Property Get KeyForward() As Long Attribute KeyForward.VB_Description = "Tastencode für die "">""-Taste" Attribute KeyForward.VB_ProcData.VB_Invoke_Property = "PVWKeyCode;Verhalten" KeyForward = key(2).key End Property Public Property Let KeyForward(ByVal NewValue As Long) key(2).key = NewValue PropertyChanged "KeyForward" End Property Public Property Get KeyOnline() As Long Attribute KeyOnline.VB_Description = "Tastencode für die ""||""-Taste" Attribute KeyOnline.VB_ProcData.VB_Invoke_Property = "PVWKeyCode;Verhalten" KeyOnline = key(4).key End Property Public Property Let KeyOnline(ByVal NewValue As Long) key(4).key = NewValue PropertyChanged "KeyOnline" End Property Public Property Get MaxChange() As Long Attribute MaxChange.VB_Description = "Wert der Änderung beim Drücken der ""<<""- oder "">>""-Taste" Attribute MaxChange.VB_ProcData.VB_Invoke_Property = ";Verhalten" MaxChange = m_MaxChange End Property Public Property Let MaxChange(ByVal NewValue As Long) m_MaxChange = NewValue PropertyChanged "MaxChange" End Property Public Property Get MaxInterval() As EInterval Attribute MaxInterval.VB_Description = "Intervall-Typ für die Wertänderung beim Drücken der ""<<""- oder "">>""-Taste" Attribute MaxInterval.VB_ProcData.VB_Invoke_Property = ";Verhalten" MaxInterval = m_MaxInterval End Property Public Property Let MaxInterval(ByVal NewValue As EInterval) m_MaxInterval = NewValue PropertyChanged "MaxInterval" IntervallChanged End Property Public Property Get MinChange() As Long Attribute MinChange.VB_Description = "Wert der Änderung beim Drücken der ""<""- oder "">""-Taste" Attribute MinChange.VB_ProcData.VB_Invoke_Property = ";Verhalten" MinChange = m_MinChange End Property Public Property Let MinChange(NewValue As Long) m_MinChange = NewValue PropertyChanged "MinChange" End Property Public Property Get MinInterval() As EInterval Attribute MinInterval.VB_Description = "Intervall-Typ für die Wertänderung beim Drücken der ""<""- oder "">""-Taste" Attribute MinInterval.VB_ProcData.VB_Invoke_Property = ";Verhalten" MinInterval = m_MinInterval End Property Public Property Let MinInterval(ByVal NewValue As EInterval) m_MinInterval = NewValue PropertyChanged "MinInterval" IntervallChanged End Property 'Legt die Ausrichtung fest: ' - orHorizontal: Namen nebeneinander, darunter die Linien ' - orVertical: Namen untereinander, daneben die Linien Public Property Get Orientation() As EOrientation Attribute Orientation.VB_Description = "Ausrichtung der Schaltflächen" Attribute Orientation.VB_ProcData.VB_Invoke_Property = ";Darstellung" Orientation = m_Orientation End Property Public Property Let Orientation(ByVal NewValue As EOrientation) Dim lngHeight As Long Dim lngWidth As Long If m_Orientation <> NewValue Then m_Orientation = NewValue lngHeight = Height lngWidth = Width Width = lngHeight Height = lngWidth PropertyChanged "Orientation" UserControl_Resize 'Neuplatzierung der Objekte End If End Property Public Property Get PictureAlign() As VWCPictureAlign Attribute PictureAlign.VB_Description = "Ausrichtung der Grafik auf den Schaltflächen" Attribute PictureAlign.VB_ProcData.VB_Invoke_Property = ";Darstellung" PictureAlign = key(0).PictureAlign End Property Public Property Let PictureAlign(ByVal NewValue As VWCPictureAlign) SetPictureAlign NewValue PropertyChanged "PictureAlign" End Property 'Legt das VWTrend-Steuerelement fest, zu dem dieses Steuerelement die Legende 'anzeigen soll; das VWTrend-Steuerelement befindet sich auf demselben Formular Public Property Get TrendControl() As String Attribute TrendControl.VB_Description = "Name des VWTrend-Steuerelementes, das kontrolliert werden soll" Attribute TrendControl.VB_ProcData.VB_Invoke_Property = "PVWTrendTime;Verhalten" TrendControl = m_TrendControl End Property Public Property Let TrendControl(ByVal NewValue As String) m_TrendControl = NewValue PropertyChanged "TrendControl" TrendControlChanged End Property '======================================================================================= 'öffentliche Methoden '======================================================================================= 'interne Ereignisse Private Sub UserControl_Resize() Dim sng As Single, n As Integer Dim l As Long Dim lngHeight As Long lngHeight = ScaleHeight If lngHeight < 0 Then lngHeight = 0 End If 'Anpassen der Grafik For n = 0 To 5 l = ScaleHeight - 11 If l < 0 Then l = ScaleHeight End If Picture2(n).Height = l sng = Picture2(n).Height * Picture1(n).Tag Picture2(n).Width = sng Set Picture2(n).Picture = Picture1(n).Picture Next n If m_Orientation = orHorizontal Then sng = ScaleWidth / 5 'Anpassen der Button(Höhe) For n = 0 To 4 key(n).Top = 0 key(n).Left = CLng(n * sng) key(n).Height = lngHeight Next n For n = 0 To 3 Set key(n).Picture = Picture2(n).Image 'Anpassen der Button(Weite) key(n).Width = key(n + 1).Left - key(n).Left Next n key(4).Width = ScaleWidth - key(4).Left ShowOnline Else sng = ScaleHeight / 5 'Anpassen der Button(Weite) For n = 0 To 4 key(n).Left = 0 key(n).Top = CLng(n * sng) key(n).Width = ScaleWidth Next n For n = 0 To 3 Set key(n).Picture = Picture2(n).Image 'Anpassen der Button(Höhe) key(n).Height = key(n + 1).Top - key(n).Top Next n key(4).Height = ScaleHeight - key(4).Top ShowOnline End If End Sub Private Sub UserControl_Show() TrendControlChanged End Sub 'Beim Platzieren des Controls werden die Eigenschaften initialisiert. Private Sub UserControl_InitProperties() SetFont Ambient.Font m_MaxChange = m_def_MaxChange m_MaxInterval = m_def_MaxInterval m_MinChange = m_def_MinChange m_MinInterval = m_def_MinInterval m_Orientation = m_def_Orientation m_TrendControl = m_def_TrendControl UserControl.Height = m_def_Height UserControl.Width = m_def_Width End Sub 'Beim Laden des Controls werden die eingestellten Eigenschaften gelesen. Private Sub UserControl_ReadProperties(PropBag As PropertyBag) SetAlignment PropBag.ReadProperty("Alignment", vwLeftVCenter) SetBackColor PropBag.ReadProperty("BackColor", m_def_BackColor) key(1).Caption = PropBag.ReadProperty("CaptionBack", "") key(0).Caption = PropBag.ReadProperty("CaptionFastBack", "") key(3).Caption = PropBag.ReadProperty("CaptionFastForward", "") key(2).Caption = PropBag.ReadProperty("CaptionForward", "") key(4).Caption = PropBag.ReadProperty("CaptionOnline", "") SetEnabled PropBag.ReadProperty("Enabled", True) SetFont PropBag.ReadProperty("Font", Ambient.Font) SetFontClass PropBag.ReadProperty("FontClass", m_def_FontClass) SetForeColor PropBag.ReadProperty("ForeColor", m_def_ForeColor) key(1).key = PropBag.ReadProperty("KeyBack", 0) key(0).key = PropBag.ReadProperty("KeyFastBack", 0) key(3).key = PropBag.ReadProperty("KeyFastForward", 0) key(2).key = PropBag.ReadProperty("KeyForward", 0) key(4).key = PropBag.ReadProperty("KeyOnline", 0) m_MaxChange = PropBag.ReadProperty("MaxChange", m_def_MaxChange) m_MaxInterval = PropBag.ReadProperty("MaxInterval", m_def_MaxInterval) m_MinChange = PropBag.ReadProperty("MinChange", m_def_MinChange) m_MinInterval = PropBag.ReadProperty("MinInterval", m_def_MinInterval) m_Orientation = PropBag.ReadProperty("Orientation", m_def_Orientation) SetPictureAlign PropBag.ReadProperty("PictureAlign", vwPCenterVCenter) m_TrendControl = PropBag.ReadProperty("TrendControl", m_def_TrendControl) IntervallChanged End Sub 'Speichern der Eigenschaften. Private Sub UserControl_WriteProperties(PropBag As PropertyBag) Call PropBag.WriteProperty("Alignment", key(0).Alignment, vwLeftVCenter) Call PropBag.WriteProperty("BackColor", key(0).BackColor, m_def_BackColor) Call PropBag.WriteProperty("CaptionBack", key(1).Caption, "") Call PropBag.WriteProperty("CaptionFastBack", key(0).Caption, "") Call PropBag.WriteProperty("CaptionFastForward", key(3).Caption, "") Call PropBag.WriteProperty("CaptionForward", key(2).Caption, "") Call PropBag.WriteProperty("CaptionOnline", key(4).Caption, "") Call PropBag.WriteProperty("Enabled", UserControl.Enabled, True) Call PropBag.WriteProperty("Font", key(0).Font, Ambient.Font) Call PropBag.WriteProperty("FontClass", key(0).FontClass, m_def_FontClass) Call PropBag.WriteProperty("ForeColor", key(0).ForeColor, m_def_ForeColor) Call PropBag.WriteProperty("KeyBack", key(1).key, 0) Call PropBag.WriteProperty("KeyFastBack", key(0).key, 0) Call PropBag.WriteProperty("KeyFastForward", key(3).key, 0) Call PropBag.WriteProperty("KeyForward", key(2).key, 0) Call PropBag.WriteProperty("KeyOnline", key(4).key, 0) Call PropBag.WriteProperty("MaxChange", m_MaxChange, m_def_MaxChange) Call PropBag.WriteProperty("MaxInterval", m_MaxInterval, m_def_MaxInterval) Call PropBag.WriteProperty("MinChange", m_MinChange, m_def_MinChange) Call PropBag.WriteProperty("MinInterval", m_MinInterval, m_def_MinInterval) Call PropBag.WriteProperty("Orientation", m_Orientation, m_def_Orientation) Call PropBag.WriteProperty("PictureAlign", key(0).PictureAlign, vwPCenterVCenter) Call PropBag.WriteProperty("TrendControl", m_TrendControl, m_def_TrendControl) End Sub '======================================================================================= 'private Hilfsfunktionen 'Prozedur zur Übernahme der Trend-Eigenschaften in das UserControl: 'Schreibt den Laufzeinamen der Trends in die VWIndex und zeichnet Linien 'mit der zum Trend gehörenden Linienbreite und Linienfarbe in die Pictureboxen. Private Sub TrendControlChanged() 'Wenn die TrendControl-Eigenschaft nicht leer ist If Len(m_TrendControl) = 0 Then Exit Sub End If On Error Resume Next Err.Clear Set objTrend = UserControl.Extender.Parent.Controls(m_TrendControl) If Err <> 0 Then Set objTrend = Nothing End If End Sub Private Sub IntervallChanged() Select Case m_MaxInterval Case inSecond mgstrMaxInterval = "s" Case inMinute mgstrMaxInterval = "n" Case inHour mgstrMaxInterval = "h" Case inDay mgstrMaxInterval = "d" Case inMonth mgstrMaxInterval = "m" Case inYear mgstrMaxInterval = "yyyy" End Select Select Case m_MinInterval Case inSecond mgstrMinInterval = "s" Case inMinute mgstrMinInterval = "n" Case inHour mgstrMinInterval = "h" Case inDay mgstrMinInterval = "d" Case inMonth mgstrMinInterval = "m" Case inYear mgstrMinInterval = "yyyy" End Select End Sub Private Sub SetAlignment(ByVal NewValue As VWCAlign) Dim i As Integer For i = 0 To 4 key(i).Alignment = NewValue Next i End Sub Private Sub SetBackColor(ByVal NewValue As OLE_COLOR) Dim i As Integer For i = 0 To 4 key(i).BackColor = NewValue Next i For i = 0 To 5 Picture2(i).BackColor = NewValue Next i UserControl_Resize End Sub Private Sub SetForeColor(ByVal NewValue As OLE_COLOR) Dim i As Integer For i = 0 To 4 key(i).ForeColor = NewValue Next i End Sub Private Sub SetEnabled(ByVal NewValue As Boolean) Dim n As Integer UserControl.Enabled = NewValue For n = 0 To 4 key(n).Enabled = NewValue Next n End Sub Private Sub SetFont(ByVal NewValue As StdFont) Dim i As Integer For i = 0 To 4 Set key(i).Font = NewValue Next i End Sub Private Sub SetFontClass(ByVal NewValue As String) Dim i As Integer For i = 0 To 4 key(i).FontClass = NewValue Next i End Sub Private Sub SetIndexGroup(ByVal NewValue As String) Dim i As Integer For i = 0 To 4 key(i).IndexGroup = NewValue Next i End Sub Private Sub SetPictureAlign(ByVal NewValue As VWCPictureAlign) Dim i As Integer For i = 0 To 4 key(i).PictureAlign = NewValue Next i End Sub '======================================================================================= 'private Hilfsfunktionen 'Hilfsfunktion für die PropertyPage zur Anzeige der Trend-Controls. Friend Function Container() As Object Set Container = UserControl.Extender.Parent End Function Private Sub key_MouseDown(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single) timRepeat.Interval = 1000 timRepeat.Tag = Index timRepeat.Enabled = True End Sub Private Sub key_MouseUp(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single) timRepeat.Enabled = False End Sub Private Sub key_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer) timRepeat.Interval = 1000 timRepeat.Tag = Index timRepeat.Enabled = True End Sub Private Sub key_KeyUp(Index As Integer, KeyCode As Integer, Shift As Integer) timRepeat.Enabled = False End Sub Private Sub timRepeat_Timer() timRepeat.Interval = 200 KeyAction timRepeat.Tag End Sub Private Sub key_Click(Index As Integer) KeyAction Index End Sub Private Sub KeyAction(intIndex As Integer) If Not (objTrend Is Nothing) Then Select Case intIndex Case 0 ' schnell zurück objTrend.Online = False objTrend.ScrollTime = DateAdd(mgstrMaxInterval, -m_MaxChange, objTrend.ScrollTime) Case 1 'zurück objTrend.Online = False objTrend.ScrollTime = DateAdd(mgstrMinInterval, -m_MinChange, objTrend.ScrollTime) Case 2 ' vor objTrend.Online = False objTrend.ScrollTime = DateAdd(mgstrMinInterval, m_MinChange, objTrend.ScrollTime) Case 3 ' schnell vor objTrend.Online = False objTrend.ScrollTime = DateAdd(mgstrMaxInterval, m_MaxChange, objTrend.ScrollTime) Case 4 ' online/offline objTrend.Online = Not objTrend.Online End Select ShowOnline End If End Sub Private Sub ShowOnline() If Not objTrend Is Nothing Then If objTrend.Online = True Then Set key(4).Picture = Picture2(5).Image Else Set key(4).Picture = Picture2(4).Image End If Else Set key(4).Picture = Picture2(5).Image End If End Sub