vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
TOP-Angebot: 17 bzw. 24 Entwickler-Vollversionen zum unschlagbaren Preis!  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2025
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

Visual-Basic Einsteiger
Re: Farbänderung aller Frames im Projekt? 
Autor: alert
Datum: 20.09.02 14:09

Hi Dieter,
wäre echt klasse wenn Du da einen globalen Weg finden würdest.
Bin selber natürlich auch dabei einen Weg zu finden, wobei alle
Formen des gesamten Projektes als Beispiel:
Form1
frmOptionen
frmAuslesen
frmAdresse
frmMuster
etc.
ca. 30 Formen mit unterschiedlichen Namen
Jetzt sollen aber alle diese Formen auch die gleichen Farb und Eigenschaftswerte
bekommen wie sie in den letzten Codes geschrieben war.
Also ListBox, TextBox, CommandButton etc.
Nur eben für alle Formen mit den entsprechenden Form1.Controls global
für alle weiteren Formen im Projekt.

Hier der Beispielcode, der auch funktioniert nur eben sehr umfangreich
und wenn eine neue Form hinzukommen soll ist wieder viel zu schreiben.

Aber bitte nicht hauen weil ich zu viel reinschreibe *ggg*.
'
'
Private Sub Form_Load()
Einlesen ' <------ Einlesen!
End Sub

Private Sub Form_Unload(Cancel As Integer)
Speichern ' <------ Speichern!
Unload Me
End
End Sub

Private Sub Einlesen() ' <------ Einlesen!
FormHintergrundFarbeIn
FensterSizeIn
FrameHintergrundFarbeIn
FrameVordergrundFarbeIn
ButtonHintergrundFarbeIn
ListeVordergrundFarbeIn
ListeHintergrundFarbeIn
End Sub

Private Sub Speichern() ' <------ Speichern!
FormHintergrundFarbeOut
FensterSizeOut
FrameHintergrundFarbeOut
FrameVordergrundFarbeOut
ButtonHintergrundFarbeOut
ListeVordergrundFarbeOut
ListeHintergrundFarbeOut
End Sub

' ################################################ Form! #################
Private Sub FormHintergrundFarbeIn()
frmFarbOptionen.BackColor = GetSetting("COLOR", "Optionen", "frmFarbOptionen.BackColor", Default)
Form1.BackColor = GetSetting("COLOR", "Optionen", "Form1.BackColor", Default)
Form2.BackColor = GetSetting("COLOR", "Optionen", "Form2.BackColor", Default)
Form3.BackColor = GetSetting("COLOR", "Optionen", "Form3.BackColor", Default)
Form4.BackColor = GetSetting("COLOR", "Optionen", "Form4.BackColor", Default)
Form5.BackColor = GetSetting("COLOR", "Optionen", "Form5.BackColor", Default)
Form6.BackColor = GetSetting("COLOR", "Optionen", "Form6.BackColor", Default)
End Sub

Private Sub FormHintergrundFarbeOut()
SaveSetting "COLOR", "Optionen", "frmFarbOptionen.BackColor", frmFarbOptionen.BackColor
SaveSetting "COLOR", "Optionen", "Form1.BackColor", Form1.BackColor
SaveSetting "COLOR", "Optionen", "Form2.BackColor", Form2.BackColor
SaveSetting "COLOR", "Optionen", "Form3.BackColor", Form3.BackColor
SaveSetting "COLOR", "Optionen", "Form4.BackColor", Form4.BackColor
SaveSetting "COLOR", "Optionen", "Form5.BackColor", Form5.BackColor
SaveSetting "COLOR", "Optionen", "Form6.BackColor", Form6.BackColor
End Sub

Private Sub cmdHintergrundForm_Click()
On Local Error Resume Next
With CommonDialog1
.CancelError = True
.ShowColor
If Err = 0 Then
frmFarbOptionen.BackColor = CommonDialog1.Color
Form1.BackColor = CommonDialog1.Color
Form2.BackColor = CommonDialog1.Color
Form3.BackColor = CommonDialog1.Color
Form4.BackColor = CommonDialog1.Color
Form5.BackColor = CommonDialog1.Color
Form6.BackColor = CommonDialog1.Color
End If
End With
End Sub

' ################################################ Frame! #################
Private Sub FrameHintergrundFarbeIn()
Dim f As Control
For Each f In frmFarbOptionen.Controls
If TypeOf f Is Frame Then
f.BackColor = GetSetting("COLOR", "Optionen", "f.BackColor", Default)
End If
Next f
For Each f In Form1.Controls
If TypeOf f Is Frame Then
f.BackColor = GetSetting("COLOR", "Optionen", "f.BackColor", Default)
End If
Next f
For Each f In Form2.Controls
If TypeOf f Is Frame Then
f.BackColor = GetSetting("COLOR", "Optionen", "f.BackColor", Default)
End If
Next f
For Each f In Form3.Controls
If TypeOf f Is Frame Then
f.BackColor = GetSetting("COLOR", "Optionen", "f.BackColor", Default)
End If
Next f
For Each f In Form4.Controls
If TypeOf f Is Frame Then
f.BackColor = GetSetting("COLOR", "Optionen", "f.BackColor", Default)
End If
Next f
For Each f In Form5.Controls
If TypeOf f Is Frame Then
f.BackColor = GetSetting("COLOR", "Optionen", "f.BackColor", Default)
End If
Next f
For Each f In Form6.Controls
If TypeOf f Is Frame Then
f.BackColor = GetSetting("COLOR", "Optionen", "f.BackColor", Default)
End If
Next f
End Sub

Private Sub FrameHintergrundFarbeOut()
Dim f As Control
For Each f In frmFarbOptionen.Controls
If TypeOf f Is Frame Then
SaveSetting "COLOR", "Optionen", "f.BackColor", f.BackColor
End If
Next f
For Each f In Form1.Controls
If TypeOf f Is Frame Then
SaveSetting "COLOR", "Optionen", "f.BackColor", f.BackColor
End If
Next f
For Each f In Form2.Controls
If TypeOf f Is Frame Then
SaveSetting "COLOR", "Optionen", "f.BackColor", f.BackColor
End If
Next f
For Each f In Form3.Controls
If TypeOf f Is Frame Then
SaveSetting "COLOR", "Optionen", "f.BackColor", f.BackColor
End If
Next f
For Each f In Form4.Controls
If TypeOf f Is Frame Then
SaveSetting "COLOR", "Optionen", "f.BackColor", f.BackColor
End If
Next f
For Each f In Form5.Controls
If TypeOf f Is Frame Then
SaveSetting "COLOR", "Optionen", "f.BackColor", f.BackColor
End If
Next f
For Each f In Form6.Controls
If TypeOf f Is Frame Then
SaveSetting "COLOR", "Optionen", "f.BackColor", f.BackColor
End If
Next f
End Sub

Private Sub cmdFrameHintergrund_Click() 'cmd
On Local Error Resume Next
With CommonDialog1
.CancelError = True
.ShowColor
If Err = 0 Then
Dim f As Control
For Each f In frmFarbOptionen.Controls
If TypeOf f Is Frame Then
f.BackColor = CommonDialog1.Color
End If
Next f
For Each f In Form1.Controls
If TypeOf f Is Frame Then
f.BackColor = CommonDialog1.Color
End If
Next f
For Each f In Form2.Controls
If TypeOf f Is Frame Then
f.BackColor = CommonDialog1.Color
End If
Next f
For Each f In Form3.Controls
If TypeOf f Is Frame Then
f.BackColor = CommonDialog1.Color
End If
Next f
For Each f In Form4.Controls
If TypeOf f Is Frame Then
f.BackColor = CommonDialog1.Color
End If
Next f
For Each f In Form5.Controls
If TypeOf f Is Frame Then
f.BackColor = CommonDialog1.Color
End If
Next f
For Each f In Form6.Controls
If TypeOf f Is Frame Then
f.BackColor = CommonDialog1.Color
End If
Next f
End If
End With
End Sub

Private Sub FrameVordergrundFarbeIn()
Dim f As Control
For Each f In frmFarbOptionen.Controls
If TypeOf f Is Frame Then
f.ForeColor = GetSetting("COLOR", "Optionen", "f.ForeColor", Default)
End If
Next f
For Each f In Form1.Controls
If TypeOf f Is Frame Then
f.ForeColor = GetSetting("COLOR", "Optionen", "f.ForeColor", Default)
End If
Next f
For Each f In Form2.Controls
If TypeOf f Is Frame Then
f.ForeColor = GetSetting("COLOR", "Optionen", "f.ForeColor", Default)
End If
Next f
For Each f In Form3.Controls
If TypeOf f Is Frame Then
f.ForeColor = GetSetting("COLOR", "Optionen", "f.ForeColor", Default)
End If
Next f
For Each f In Form4.Controls
If TypeOf f Is Frame Then
f.ForeColor = GetSetting("COLOR", "Optionen", "f.ForeColor", Default)
End If
Next f
For Each f In Form5.Controls
If TypeOf f Is Frame Then
f.ForeColor = GetSetting("COLOR", "Optionen", "f.ForeColor", Default)
End If
Next f
For Each f In Form6.Controls
If TypeOf f Is Frame Then
f.ForeColor = GetSetting("COLOR", "Optionen", "f.ForeColor", Default)
End If
Next f
End Sub

Private Sub FrameVordergrundFarbeOut()
Dim f As Control
For Each f In frmFarbOptionen.Controls
If TypeOf f Is Frame Then
SaveSetting "COLOR", "Optionen", "f.ForeColor", f.ForeColor
End If
Next f
For Each f In Form1.Controls
If TypeOf f Is Frame Then
SaveSetting "COLOR", "Optionen", "f.ForeColor", f.ForeColor
End If
Next f
For Each f In Form2.Controls
If TypeOf f Is Frame Then
SaveSetting "COLOR", "Optionen", "f.ForeColor", f.ForeColor
End If
Next f
For Each f In Form3.Controls
If TypeOf f Is Frame Then
SaveSetting "COLOR", "Optionen", "f.ForeColor", f.ForeColor
End If
Next f
For Each f In Form4.Controls
If TypeOf f Is Frame Then
SaveSetting "COLOR", "Optionen", "f.ForeColor", f.ForeColor
End If
Next f
For Each f In Form5.Controls
If TypeOf f Is Frame Then
SaveSetting "COLOR", "Optionen", "f.ForeColor", f.ForeColor
End If
Next f
For Each f In Form6.Controls
If TypeOf f Is Frame Then
SaveSetting "COLOR", "Optionen", "f.ForeColor", f.ForeColor
End If
Next f
End Sub

Private Sub cmdFrameVordergrund_Click() 'cmd
On Local Error Resume Next
With CommonDialog1
.CancelError = True
.ShowColor
If Err = 0 Then
Dim f As Control
For Each f In frmFarbOptionen.Controls
If TypeOf f Is Frame Then
f.ForeColor = CommonDialog1.Color
End If
Next f
For Each f In Form1.Controls
If TypeOf f Is Frame Then
f.ForeColor = CommonDialog1.Color
End If
Next f
For Each f In Form2.Controls
If TypeOf f Is Frame Then
f.ForeColor = CommonDialog1.Color
End If
Next f
For Each f In Form3.Controls
If TypeOf f Is Frame Then
f.ForeColor = CommonDialog1.Color
End If
Next f
For Each f In Form4.Controls
If TypeOf f Is Frame Then
f.ForeColor = CommonDialog1.Color
End If
Next f
For Each f In Form5.Controls
If TypeOf f Is Frame Then
f.ForeColor = CommonDialog1.Color
End If
Next f
For Each f In Form6.Controls
If TypeOf f Is Frame Then
f.ForeColor = CommonDialog1.Color
End If
Next f
End If
End With
End Sub

' ################################################ Button! #################
Private Sub ButtonHintergrundFarbeIn()
Dim b As Control
For Each b In frmFarbOptionen.Controls
If TypeOf b Is CommandButton Then
b.BackColor = GetSetting("COLOR", "Optionen", "b.BackColor", Default)
End If
Next b
For Each b In Form1.Controls
If TypeOf b Is CommandButton Then
b.BackColor = GetSetting("COLOR", "Optionen", "b.BackColor", Default)
End If
Next b
For Each b In Form2.Controls
If TypeOf b Is CommandButton Then
b.BackColor = GetSetting("COLOR", "Optionen", "b.BackColor", Default)
End If
Next b
For Each b In Form3.Controls
If TypeOf b Is CommandButton Then
b.BackColor = GetSetting("COLOR", "Optionen", "b.BackColor", Default)
End If
Next b
For Each b In Form4.Controls
If TypeOf b Is CommandButton Then
b.BackColor = GetSetting("COLOR", "Optionen", "b.BackColor", Default)
End If
Next b
For Each b In Form5.Controls
If TypeOf b Is CommandButton Then
b.BackColor = GetSetting("COLOR", "Optionen", "b.BackColor", Default)
End If
Next b
For Each b In Form6.Controls
If TypeOf b Is CommandButton Then
b.BackColor = GetSetting("COLOR", "Optionen", "b.BackColor", Default)
End If
Next b
End Sub

Private Sub ButtonHintergrundFarbeOut()
Dim b As Control
For Each b In frmFarbOptionen.Controls
If TypeOf b Is CommandButton Then
SaveSetting "COLOR", "Optionen", "b.BackColor", b.BackColor
End If
Next b
For Each b In Form1.Controls
If TypeOf b Is CommandButton Then
SaveSetting "COLOR", "Optionen", "b.BackColor", b.BackColor
End If
Next b
For Each b In Form2.Controls
If TypeOf b Is CommandButton Then
SaveSetting "COLOR", "Optionen", "b.BackColor", b.BackColor
End If
Next b
For Each b In Form3.Controls
If TypeOf b Is CommandButton Then
SaveSetting "COLOR", "Optionen", "b.BackColor", b.BackColor
End If
Next b
For Each b In Form4.Controls
If TypeOf b Is CommandButton Then
SaveSetting "COLOR", "Optionen", "b.BackColor", b.BackColor
End If
Next b
For Each b In Form5.Controls
If TypeOf b Is CommandButton Then
SaveSetting "COLOR", "Optionen", "b.BackColor", b.BackColor
End If
Next b
For Each b In Form6.Controls
If TypeOf b Is CommandButton Then
SaveSetting "COLOR", "Optionen", "b.BackColor", b.BackColor
End If
Next b
End Sub

Private Sub cmdButtonHintergrund_Click() 'cmd
On Local Error Resume Next
With CommonDialog1
.CancelError = True
.ShowColor
If Err = 0 Then
Dim b As Control
For Each b In frmFarbOptionen.Controls
If TypeOf b Is CommandButton Then
b.BackColor = CommonDialog1.Color
End If
Next b
For Each b In Form1.Controls
If TypeOf b Is CommandButton Then
b.BackColor = CommonDialog1.Color
End If
Next b
For Each b In Form2.Controls
If TypeOf b Is CommandButton Then
b.BackColor = CommonDialog1.Color
End If
Next b
For Each b In Form3.Controls
If TypeOf b Is CommandButton Then
b.BackColor = CommonDialog1.Color
End If
Next b
For Each b In Form4.Controls
If TypeOf b Is CommandButton Then
b.BackColor = CommonDialog1.Color
End If
Next b
For Each b In Form5.Controls
If TypeOf b Is CommandButton Then
b.BackColor = CommonDialog1.Color
End If
Next b
For Each b In Form6.Controls
If TypeOf b Is CommandButton Then
b.BackColor = CommonDialog1.Color
End If
Next b
End If
End With
End Sub

' ################################################ Liste! #################
Private Sub ListeHintergrundFarbeIn()
Dim L As Control
For Each L In frmFarbOptionen.Controls
If TypeOf L Is ListBox Then
L.BackColor = GetSetting("COLOR", "Optionen", "L.BackColor", Default)
End If
Next L
For Each L In Form1.Controls
If TypeOf L Is ListBox Then
L.BackColor = GetSetting("COLOR", "Optionen", "L.BackColor", Default)
End If
Next L
For Each L In Form2.Controls
If TypeOf L Is ListBox Then
L.BackColor = GetSetting("COLOR", "Optionen", "L.BackColor", Default)
End If
Next L
For Each L In Form3.Controls
If TypeOf L Is ListBox Then
L.BackColor = GetSetting("COLOR", "Optionen", "L.BackColor", Default)
End If
Next L
For Each L In Form4.Controls
If TypeOf L Is ListBox Then
L.BackColor = GetSetting("COLOR", "Optionen", "L.BackColor", Default)
End If
Next L
For Each L In Form5.Controls
If TypeOf L Is ListBox Then
L.BackColor = GetSetting("COLOR", "Optionen", "L.BackColor", Default)
End If
Next L
For Each L In Form6.Controls
If TypeOf L Is ListBox Then
L.BackColor = GetSetting("COLOR", "Optionen", "L.BackColor", Default)
End If
Next L
End Sub

Private Sub ListeHintergrundFarbeOut()
Dim L As Control
For Each L In frmFarbOptionen.Controls
If TypeOf L Is ListBox Then
SaveSetting "COLOR", "Optionen", "L.BackColor", L.BackColor
End If
Next L
For Each L In Form1.Controls
If TypeOf L Is ListBox Then
SaveSetting "COLOR", "Optionen", "L.BackColor", L.BackColor
End If
Next L
For Each L In Form2.Controls
If TypeOf L Is ListBox Then
SaveSetting "COLOR", "Optionen", "L.BackColor", L.BackColor
End If
Next L
For Each L In Form3.Controls
If TypeOf L Is ListBox Then
SaveSetting "COLOR", "Optionen", "L.BackColor", L.BackColor
End If
Next L
For Each L In Form4.Controls
If TypeOf L Is ListBox Then
SaveSetting "COLOR", "Optionen", "L.BackColor", L.BackColor
End If
Next L
For Each L In Form5.Controls
If TypeOf L Is ListBox Then
SaveSetting "COLOR", "Optionen", "L.BackColor", L.BackColor
End If
Next L
For Each L In Form6.Controls
If TypeOf L Is ListBox Then
SaveSetting "COLOR", "Optionen", "L.BackColor", L.BackColor
End If
Next L
End Sub

Private Sub cmdListeHintergrund_Click() 'cmd
On Local Error Resume Next
With CommonDialog1
.CancelError = True
.ShowColor
If Err = 0 Then
Dim L As Control
For Each L In frmFarbOptionen.Controls
If TypeOf L Is ListBox Then
L.BackColor = CommonDialog1.Color
End If
Next L
For Each L In Form1.Controls
If TypeOf L Is ListBox Then
L.BackColor = CommonDialog1.Color
End If
Next L
For Each L In Form2.Controls
If TypeOf L Is ListBox Then
L.BackColor = CommonDialog1.Color
End If
Next L
For Each L In Form3.Controls
If TypeOf L Is ListBox Then
L.BackColor = CommonDialog1.Color
End If
Next L
For Each L In Form4.Controls
If TypeOf L Is ListBox Then
L.BackColor = CommonDialog1.Color
End If
Next L
For Each L In Form5.Controls
If TypeOf L Is ListBox Then
L.BackColor = CommonDialog1.Color
End If
Next L
For Each L In Form6.Controls
If TypeOf L Is ListBox Then
L.BackColor = CommonDialog1.Color
End If
Next L
End If
End With
End Sub

Private Sub ListeVordergrundFarbeIn()
Dim L As Control
For Each L In frmFarbOptionen.Controls
If TypeOf L Is ListBox Then
L.ForeColor = GetSetting("COLOR", "Optionen", "L.ForeColor", Default)
End If
Next L
For Each L In Form1.Controls
If TypeOf L Is ListBox Then
L.ForeColor = GetSetting("COLOR", "Optionen", "L.ForeColor", Default)
End If
Next L
For Each L In Form2.Controls
If TypeOf L Is ListBox Then
L.ForeColor = GetSetting("COLOR", "Optionen", "L.ForeColor", Default)
End If
Next L
For Each L In Form3.Controls
If TypeOf L Is ListBox Then
L.ForeColor = GetSetting("COLOR", "Optionen", "L.ForeColor", Default)
End If
Next L
For Each L In Form4.Controls
If TypeOf L Is ListBox Then
L.ForeColor = GetSetting("COLOR", "Optionen", "L.ForeColor", Default)
End If
Next L
For Each L In Form5.Controls
If TypeOf L Is ListBox Then
L.ForeColor = GetSetting("COLOR", "Optionen", "L.ForeColor", Default)
End If
Next L
For Each L In Form6.Controls
If TypeOf L Is ListBox Then
L.ForeColor = GetSetting("COLOR", "Optionen", "L.ForeColor", Default)
End If
Next L
End Sub

Private Sub ListeVordergrundFarbeOut()
Dim L As Control
For Each L In frmFarbOptionen.Controls
If TypeOf L Is ListBox Then
SaveSetting "COLOR", "Optionen", "L.ForeColor", L.ForeColor
End If
Next L
For Each L In Form1.Controls
If TypeOf L Is ListBox Then
SaveSetting "COLOR", "Optionen", "L.ForeColor", L.ForeColor
End If
Next L
For Each L In Form2.Controls
If TypeOf L Is ListBox Then
SaveSetting "COLOR", "Optionen", "L.ForeColor", L.ForeColor
End If
Next L
For Each L In Form3.Controls
If TypeOf L Is ListBox Then
SaveSetting "COLOR", "Optionen", "L.ForeColor", L.ForeColor
End If
Next L
For Each L In Form4.Controls
If TypeOf L Is ListBox Then
SaveSetting "COLOR", "Optionen", "L.ForeColor", L.ForeColor
End If
Next L
For Each L In Form5.Controls
If TypeOf L Is ListBox Then
SaveSetting "COLOR", "Optionen", "L.ForeColor", L.ForeColor
End If
Next L
For Each L In Form6.Controls
If TypeOf L Is ListBox Then
SaveSetting "COLOR", "Optionen", "L.ForeColor", L.ForeColor
End If
Next L
End Sub

Private Sub cmdListeVordergrund_Click() 'cmd
On Local Error Resume Next
With CommonDialog1
.CancelError = True
.ShowColor
If Err = 0 Then
Dim L As Control
For Each L In frmFarbOptionen.Controls
If TypeOf L Is ListBox Then
L.ForeColor = CommonDialog1.Color
End If
Next L
For Each L In Form1.Controls
If TypeOf L Is ListBox Then
L.ForeColor = CommonDialog1.Color
End If
Next L
For Each L In Form2.Controls
If TypeOf L Is ListBox Then
L.ForeColor = CommonDialog1.Color
End If
Next L
For Each L In Form3.Controls
If TypeOf L Is ListBox Then
L.ForeColor = CommonDialog1.Color
End If
Next L
For Each L In Form4.Controls
If TypeOf L Is ListBox Then
L.ForeColor = CommonDialog1.Color
End If
Next L
For Each L In Form5.Controls
If TypeOf L Is ListBox Then
L.ForeColor = CommonDialog1.Color
End If
Next L
For Each L In Form6.Controls
If TypeOf L Is ListBox Then
L.ForeColor = CommonDialog1.Color
End If
Next L
End If
End With
End Sub

' ################################################ Fenster! #################

Private Sub FensterSizeIn() ' <------ Einlesen!
Dim t As Control
Dim Default As Integer
Default = 8
For Each t In frmFarbOptionen.Controls
If TypeOf t Is TextBox Then
t.BackColor = GetSetting("COLOR", "Optionen", "t.BackColor", Default)
t.ForeColor = GetSetting("COLOR", "Optionen", "t.ForeColor", Default)
t.FontSize = Val(GetSetting("COLOR", "Optionen", "t.FontSize", CStr(Default))) ' FontSize einlesen!
t.FontBold = CBool(GetSetting("COLOR", "Optionen", "t.FontBold", CStr(Default))) ' FontBold einlesen!
t.FontItalic = CBool(GetSetting("COLOR", "Optionen", "t.FontItalic", CStr(Default))) ' FontItalic einlesen!
End If
Next t
For Each t In Form1.Controls
If TypeOf t Is TextBox Then
t.BackColor = GetSetting("COLOR", "Optionen", "t.BackColor", Default)
t.ForeColor = GetSetting("COLOR", "Optionen", "t.ForeColor", Default)
t.FontSize = Val(GetSetting("COLOR", "Optionen", "t.FontSize", CStr(Default))) ' FontSize einlesen!
t.FontBold = CBool(GetSetting("COLOR", "Optionen", "t.FontBold", CStr(Default))) ' FontBold einlesen!
t.FontItalic = CBool(GetSetting("COLOR", "Optionen", "t.FontItalic", CStr(Default))) ' FontItalic einlesen!
End If
Next t
For Each t In Form2.Controls
If TypeOf t Is TextBox Then
t.BackColor = GetSetting("COLOR", "Optionen", "t.BackColor", Default)
t.ForeColor = GetSetting("COLOR", "Optionen", "t.ForeColor", Default)
t.FontSize = Val(GetSetting("COLOR", "Optionen", "t.FontSize", CStr(Default))) ' FontSize einlesen!
t.FontBold = CBool(GetSetting("COLOR", "Optionen", "t.FontBold", CStr(Default))) ' FontBold einlesen!
t.FontItalic = CBool(GetSetting("COLOR", "Optionen", "t.FontItalic", CStr(Default))) ' FontItalic einlesen!
End If
Next t
For Each t In Form3.Controls
If TypeOf t Is TextBox Then
t.BackColor = GetSetting("COLOR", "Optionen", "t.BackColor", Default)
t.ForeColor = GetSetting("COLOR", "Optionen", "t.ForeColor", Default)
t.FontSize = Val(GetSetting("COLOR", "Optionen", "t.FontSize", CStr(Default))) ' FontSize einlesen!
t.FontBold = CBool(GetSetting("COLOR", "Optionen", "t.FontBold", CStr(Default))) ' FontBold einlesen!
t.FontItalic = CBool(GetSetting("COLOR", "Optionen", "t.FontItalic", CStr(Default))) ' FontItalic einlesen!
End If
Next t
For Each t In Form4.Controls
If TypeOf t Is TextBox Then
t.BackColor = GetSetting("COLOR", "Optionen", "t.BackColor", Default)
t.ForeColor = GetSetting("COLOR", "Optionen", "t.ForeColor", Default)
t.FontSize = Val(GetSetting("COLOR", "Optionen", "t.FontSize", CStr(Default))) ' FontSize einlesen!
t.FontBold = CBool(GetSetting("COLOR", "Optionen", "t.FontBold", CStr(Default))) ' FontBold einlesen!
t.FontItalic = CBool(GetSetting("COLOR", "Optionen", "t.FontItalic", CStr(Default))) ' FontItalic einlesen!
End If
Next t
For Each t In Form5.Controls
If TypeOf t Is TextBox Then
t.BackColor = GetSetting("COLOR", "Optionen", "t.BackColor", Default)
t.ForeColor = GetSetting("COLOR", "Optionen", "t.ForeColor", Default)
t.FontSize = Val(GetSetting("COLOR", "Optionen", "t.FontSize", CStr(Default))) ' FontSize einlesen!
t.FontBold = CBool(GetSetting("COLOR", "Optionen", "t.FontBold", CStr(Default))) ' FontBold einlesen!
t.FontItalic = CBool(GetSetting("COLOR", "Optionen", "t.FontItalic", CStr(Default))) ' FontItalic einlesen!
End If
Next t
For Each t In Form6.Controls
If TypeOf t Is TextBox Then
t.BackColor = GetSetting("COLOR", "Optionen", "t.BackColor", Default)
t.ForeColor = GetSetting("COLOR", "Optionen", "t.ForeColor", Default)
t.FontSize = Val(GetSetting("COLOR", "Optionen", "t.FontSize", CStr(Default))) ' FontSize einlesen!
t.FontBold = CBool(GetSetting("COLOR", "Optionen", "t.FontBold", CStr(Default))) ' FontBold einlesen!
t.FontItalic = CBool(GetSetting("COLOR", "Optionen", "t.FontItalic", CStr(Default))) ' FontItalic einlesen!
End If
Next t
End Sub

Private Sub FensterSizeOut() ' <------ Speichern!
Dim t As Control
For Each t In frmFarbOptionen.Controls
If TypeOf t Is TextBox Then
SaveSetting "COLOR", "Optionen", "t.BackColor", t.BackColor
SaveSetting "COLOR", "Optionen", "t.ForeColor", t.ForeColor
SaveSetting "COLOR", "Optionen", "t.FontSize", CStr(t.FontSize) ' FontSize speichern!
SaveSetting "COLOR", "Optionen", "t.FontBold", CStr(t.FontBold) ' FontBold speichern!
SaveSetting "COLOR", "Optionen", "t.FontItalic", CStr(t.FontItalic) ' FontItalic speichern!
End If
Next t
For Each t In Form1.Controls
If TypeOf t Is TextBox Then
SaveSetting "COLOR", "Optionen", "t.BackColor", t.BackColor
SaveSetting "COLOR", "Optionen", "t.ForeColor", t.ForeColor
SaveSetting "COLOR", "Optionen", "t.FontSize", CStr(t.FontSize) ' FontSize speichern!
SaveSetting "COLOR", "Optionen", "t.FontBold", CStr(t.FontBold) ' FontBold speichern!
SaveSetting "COLOR", "Optionen", "t.FontItalic", CStr(t.FontItalic) ' FontItalic speichern!
End If
Next t
For Each t In Form2.Controls
If TypeOf t Is TextBox Then
SaveSetting "COLOR", "Optionen", "t.BackColor", t.BackColor
SaveSetting "COLOR", "Optionen", "t.ForeColor", t.ForeColor
SaveSetting "COLOR", "Optionen", "t.FontSize", CStr(t.FontSize) ' FontSize speichern!
SaveSetting "COLOR", "Optionen", "t.FontBold", CStr(t.FontBold) ' FontBold speichern!
SaveSetting "COLOR", "Optionen", "t.FontItalic", CStr(t.FontItalic) ' FontItalic speichern!
End If
Next t
For Each t In Form3.Controls
If TypeOf t Is TextBox Then
SaveSetting "COLOR", "Optionen", "t.BackColor", t.BackColor
SaveSetting "COLOR", "Optionen", "t.ForeColor", t.ForeColor
SaveSetting "COLOR", "Optionen", "t.FontSize", CStr(t.FontSize) ' FontSize speichern!
SaveSetting "COLOR", "Optionen", "t.FontBold", CStr(t.FontBold) ' FontBold speichern!
SaveSetting "COLOR", "Optionen", "t.FontItalic", CStr(t.FontItalic) ' FontItalic speichern!
End If
Next t
For Each t In Form4.Controls
If TypeOf t Is TextBox Then
SaveSetting "COLOR", "Optionen", "t.BackColor", t.BackColor
SaveSetting "COLOR", "Optionen", "t.ForeColor", t.ForeColor
SaveSetting "COLOR", "Optionen", "t.FontSize", CStr(t.FontSize) ' FontSize speichern!
SaveSetting "COLOR", "Optionen", "t.FontBold", CStr(t.FontBold) ' FontBold speichern!
SaveSetting "COLOR", "Optionen", "t.FontItalic", CStr(t.FontItalic) ' FontItalic speichern!
End If
Next t
For Each t In Form5.Controls
If TypeOf t Is TextBox Then
SaveSetting "COLOR", "Optionen", "t.BackColor", t.BackColor
SaveSetting "COLOR", "Optionen", "t.ForeColor", t.ForeColor
SaveSetting "COLOR", "Optionen", "t.FontSize", CStr(t.FontSize) ' FontSize speichern!
SaveSetting "COLOR", "Optionen", "t.FontBold", CStr(t.FontBold) ' FontBold speichern!
SaveSetting "COLOR", "Optionen", "t.FontItalic", CStr(t.FontItalic) ' FontItalic speichern!
End If
Next t
For Each t In Form6.Controls
If TypeOf t Is TextBox Then
SaveSetting "COLOR", "Optionen", "t.BackColor", t.BackColor
SaveSetting "COLOR", "Optionen", "t.ForeColor", t.ForeColor
SaveSetting "COLOR", "Optionen", "t.FontSize", CStr(t.FontSize) ' FontSize speichern!
SaveSetting "COLOR", "Optionen", "t.FontBold", CStr(t.FontBold) ' FontBold speichern!
SaveSetting "COLOR", "Optionen", "t.FontItalic", CStr(t.FontItalic) ' FontItalic speichern!
End If
Next t
End Sub

Private Sub cmdSchriftartFenster_Click() 'cmd
On Local Error Resume Next
With CommonDialogSchriftart
.CancelError = True
If Err = 0 Then
.FontBold = Text1.FontBold
.FontName = Text1.FontName
.FontItalic = Text1.FontItalic
.FontSize = Text1.FontSize
.Flags = cdlCFBoth Or &H200000 Or &H100000
.ShowFont
End If
End With
Dim t As Control
For Each t In frmFarbOptionen.Controls
If TypeOf t Is TextBox Then
t.Font.Name = CommonDialogSchriftart.FontName
t.Font.Bold = CommonDialogSchriftart.FontBold
t.Font.Size = CommonDialogSchriftart.FontSize
t.Font.Italic = CommonDialogSchriftart.FontItalic
End If
Next t
For Each t In Form1.Controls
If TypeOf t Is TextBox Then
t.Font.Name = CommonDialogSchriftart.FontName
t.Font.Bold = CommonDialogSchriftart.FontBold
t.Font.Size = CommonDialogSchriftart.FontSize
t.Font.Italic = CommonDialogSchriftart.FontItalic
End If
Next t
For Each t In Form2.Controls
If TypeOf t Is TextBox Then
t.Font.Name = CommonDialogSchriftart.FontName
t.Font.Bold = CommonDialogSchriftart.FontBold
t.Font.Size = CommonDialogSchriftart.FontSize
t.Font.Italic = CommonDialogSchriftart.FontItalic
End If
Next t
For Each t In Form3.Controls
If TypeOf t Is TextBox Then
t.Font.Name = CommonDialogSchriftart.FontName
t.Font.Bold = CommonDialogSchriftart.FontBold
t.Font.Size = CommonDialogSchriftart.FontSize
t.Font.Italic = CommonDialogSchriftart.FontItalic
End If
Next t
For Each t In Form4.Controls
If TypeOf t Is TextBox Then
t.Font.Name = CommonDialogSchriftart.FontName
t.Font.Bold = CommonDialogSchriftart.FontBold
t.Font.Size = CommonDialogSchriftart.FontSize
t.Font.Italic = CommonDialogSchriftart.FontItalic
End If
Next t
For Each t In Form5.Controls
If TypeOf t Is TextBox Then
t.Font.Name = CommonDialogSchriftart.FontName
t.Font.Bold = CommonDialogSchriftart.FontBold
t.Font.Size = CommonDialogSchriftart.FontSize
t.Font.Italic = CommonDialogSchriftart.FontItalic
End If
Next t
For Each t In Form6.Controls
If TypeOf t Is TextBox Then
t.Font.Name = CommonDialogSchriftart.FontName
t.Font.Bold = CommonDialogSchriftart.FontBold
t.Font.Size = CommonDialogSchriftart.FontSize
t.Font.Italic = CommonDialogSchriftart.FontItalic
End If
Next t
End Sub

Private Sub cmdFensterHintergrund_Click()
On Local Error Resume Next
With CommonDialog1
.CancelError = True
.ShowColor
If Err = 0 Then
Dim t As Control
For Each t In frmFarbOptionen.Controls
If TypeOf t Is TextBox Then
t.BackColor = CommonDialog1.Color
End If
Next t
For Each t In Form1.Controls
If TypeOf t Is TextBox Then
t.BackColor = CommonDialog1.Color
End If
Next t
For Each t In Form2.Controls
If TypeOf t Is TextBox Then
t.BackColor = CommonDialog1.Color
End If
Next t
For Each t In Form3.Controls
If TypeOf t Is TextBox Then
t.BackColor = CommonDialog1.Color
End If
Next t
For Each t In Form4.Controls
If TypeOf t Is TextBox Then
t.BackColor = CommonDialog1.Color
End If
Next t
For Each t In Form5.Controls
If TypeOf t Is TextBox Then
t.BackColor = CommonDialog1.Color
End If
Next t
For Each t In Form6.Controls
If TypeOf t Is TextBox Then
t.BackColor = CommonDialog1.Color
End If
Next t
End If
End With
End Sub

Private Sub cmdFensterVordergrund_Click() 'cmd
On Local Error Resume Next
With CommonDialog1
.CancelError = True
.ShowColor
If Err = 0 Then
Dim t As Control
For Each t In frmFarbOptionen.Controls
If TypeOf t Is TextBox Then
t.ForeColor = CommonDialog1.Color
End If
Next t
For Each t In Form1.Controls
If TypeOf t Is TextBox Then
t.ForeColor = CommonDialog1.Color
End If
Next t
For Each t In Form2.Controls
If TypeOf t Is TextBox Then
t.ForeColor = CommonDialog1.Color
End If
Next t
For Each t In Form3.Controls
If TypeOf t Is TextBox Then
t.ForeColor = CommonDialog1.Color
End If
Next t
For Each t In Form4.Controls
If TypeOf t Is TextBox Then
t.ForeColor = CommonDialog1.Color
End If
Next t
For Each t In Form5.Controls
If TypeOf t Is TextBox Then
t.ForeColor = CommonDialog1.Color
End If
Next t
For Each t In Form6.Controls
If TypeOf t Is TextBox Then
t.ForeColor = CommonDialog1.Color
End If
Next t
End If
End With
End Sub

gruß, alert
alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
Farbänderung aller Frames im Projekt?110alert15.09.02 14:31
Re: Farbänderung aller Frames im Projekt?55Master15.09.02 15:03
Re: Farbänderung aller Frames im Projekt?52alert15.09.02 16:44
Re: Farbänderung aller Frames im Projekt?60alert16.09.02 15:51
Re: Farbänderung aller Frames im Projekt?468ModeratorDieter16.09.02 18:19
Re: Farbänderung aller Frames im Projekt?55alert16.09.02 18:41
Re: Farbänderung aller Frames im Projekt?443ModeratorDieter16.09.02 19:24
dankeeeeeeeeee Dieter51alert16.09.02 19:35
Re: Farbänderung aller Frames im Projekt?106alert17.09.02 09:22
Re: Farbänderung aller Frames im Projekt?449ModeratorDieter17.09.02 10:13
Re: Farbänderung aller Frames im Projekt?48alert17.09.02 10:20
Re: Farbänderung aller Frames im Projekt?128alert17.09.02 11:16
Re: Farbänderung aller Frames im Projekt?65alert17.09.02 11:35
Hi Dieter, oder.... wer auch immer helfen kann58alert18.09.02 11:30
Re: Hi Dieter, oder.... wer auch immer helfen kann475ModeratorDieter18.09.02 12:41
Re: Hi Dieter, oder.... wer auch immer helfen kann48alert18.09.02 12:54
Re: Farbänderung aller Frames im Projekt?52alert19.09.02 11:06
Re: Farbänderung aller Frames im Projekt?440ModeratorDieter20.09.02 00:15
Re: Farbänderung aller Frames im Projekt?136alert20.09.02 14:09
Re: Farbänderung aller Frames im Projekt?459ModeratorDieter20.09.02 21:12
Re: Farbänderung aller Frames im Projekt?51alert22.09.02 10:59

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2025 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel