Webカラーを作成する  次の文書

Private Sub R_Change()
'10進→16進
R値.Caption = Hex(R.Value)
RGB色変更
End Sub

Private Sub G_Change()
G値.Caption = Hex(G.Value)
RGB色変更
End Sub

Private Sub B_Change()
B値.Caption = Hex(B.Value)
RGB色変更
End Sub

Sub RGB色変更()
If IsNumeric(R.Value) = False Then
R.Value = 0
End If

If IsNumeric(G.Value) = False Then
G.Value = 0
End If

If IsNumeric(B.Value) = False Then
B.Value = 0
End If

If R値.Caption = "R値" Then
R値.Caption = 0
End If
If G値.Caption = "G値" Then
G値.Caption = 0
End If
If B値.Caption = "B値" Then
B値.Caption = 0
End If

If Len(R値.Caption) = 1 Then
R値.Caption = "0" & R値.Caption
End If

If Len(G値.Caption) = 1 Then
G値.Caption = "0" & G値.Caption
End If

If Len(B値.Caption) = 1 Then
B値.Caption = "0" & B値.Caption
End If

RGB色.BackColor = RGB(R.Val

 



← 左の文字をここへ入力後 登録ボタンをクリックしてください

(サイト管理者承認後掲載されます)