|
-
Nov 13th, 2000, 08:39 PM
#1
Thread Starter
Addicted Member
I am trying to make a cmdbutton click event that will look at txtExampleBG.BackColor & lblExampleFont.ForeColor and take their values and apply it to txtDialog.ForeColor and txtDialog.BackColor.
I tried this but it was a flop:
Code:
'Set the Background Color
txtExampleBG.BackColor = txtDialog.Backcolor
'Set the Font Color
lblExampleFont.ForeColor = txtDialog.ForeColor
How can I code this?
I appreciate all of your time and effort,
Daniel Christie
VB 5 and 6 Enterprise Editions,
Html, Java scipt, Vb script,
& etc...
http://www.qwcd.com
-
Nov 13th, 2000, 08:53 PM
#2
Thread Starter
Addicted Member
I tried this too and al it changed was the BG and text to black only....weird???
Code:
Private Sub cmdOkChange_Click()
Dim BG As Long
Dim Font As Long
frmSettings.txtExampleBG.BackColor = BG
frmSettings.txtExampleBG.ForeColor = Font
'Set the Background Color
BG = frmMain.txtDialog.BackColor
'Set the Font Color
Font = frmMain.txtDialog.ForeColor
End Sub
I appreciate all of your time and effort,
Daniel Christie
VB 5 and 6 Enterprise Editions,
Html, Java scipt, Vb script,
& etc...
http://www.qwcd.com
-
Nov 13th, 2000, 09:39 PM
#3
Thread Starter
Addicted Member
Well, I am sure there is simpler way to code this, but it works great for what I needed...
Code:
Private Sub cmdOkChange_Click()
'Set the Background Color for the Chat Window
If txtExampleBG.BackColor = &H0& Then
frmMain.txtDialog.BackColor = &H0&
ElseIf txtExampleBG.BackColor = &H808080 Then
frmMain.txtDialog.BackColor = &H808080
ElseIf txtExampleBG.BackColor = &HFF& Then
frmMain.txtDialog.BackColor = &HFF&
ElseIf txtExampleBG.BackColor = &HFF00& Then
frmMain.txtDialog.BackColor = &HFF00&
ElseIf txtExampleBG.BackColor = &HFFFFFF Then
frmMain.txtDialog.BackColor = &HFFFFFF
ElseIf txtExampleBG.BackColor = &HFFFF& Then
frmMain.txtDialog.BackColor = &HFFFF&
ElseIf txtExampleBG.BackColor = &HFFFF00 Then
frmMain.txtDialog.BackColor = &HFFFF00
ElseIf txtExampleBG.BackColor = &HC000C0 Then
frmMain.txtDialog.BackColor = &HC000C0
End If
'Set the Font Color for the Chat Window
If txtExampleBG.ForeColor = &H0& Then
frmMain.txtDialog.ForeColor = &H0&
ElseIf txtExampleBG.ForeColor = &H808080 Then
frmMain.txtDialog.ForeColor = &H808080
ElseIf txtExampleBG.ForeColor = &HFF& Then
frmMain.txtDialog.ForeColor = &HFF&
ElseIf txtExampleBG.ForeColor = &HFF00& Then
frmMain.txtDialog.ForeColor = &HFF00&
ElseIf txtExampleBG.ForeColor = &HFFFFFF Then
frmMain.txtDialog.ForeColor = &HFFFFFF
ElseIf txtExampleBG.ForeColor = &HFFFF& Then
frmMain.txtDialog.ForeColor = &HFFFF&
ElseIf txtExampleBG.ForeColor = &HFFFF00 Then
frmMain.txtDialog.ForeColor = &HFFFF00
ElseIf txtExampleBG.ForeColor = &HC000C0 Then
frmMain.txtDialog.ForeColor = &HC000C0
End If
frmSettings.Hide
frmMain.Show
End Sub
I appreciate all of your time and effort,
Daniel Christie
VB 5 and 6 Enterprise Editions,
Html, Java scipt, Vb script,
& etc...
http://www.qwcd.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|