哈,解出來了
如果能縮短程式行數那就更好了...
ꐊ
Private Sub Form_Load()
For i = 0 To 3
DataRGB(j) = "000000000000" '初值
Next i
Text4.Text = DataRGB(0) & DataRGB(1) & DataRGB(2) & DataRGB(3)
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single,
Y As Single)
For j = 0 To 3
If (X > Shape1(j).Left And X < Shape1(j).Left + Shape1(j).Height)
And (Y > Shape1(j).Top And Y < Shape1(j).Top + Shape1(j).Height) Then
HByteR = Left(Hex(List1.List(List1.TopIndex)), 2)
LByteR = Right(Hex(List1.List(List1.TopIndex)), 2)
HByteG = Left(Hex(List2.List(List2.TopIndex)), 2)
LByteG = Right(Hex(List2.List(List2.TopIndex)), 2)
HByteB = Left(Hex(List3.List(List3.TopIndex)), 2)
LByteB = Right(Hex(List3.List(List3.TopIndex)), 2)
DataRGB(j) = HByteR & LByteR & HByteG & LByteG & HByteB & LByteB
End If
Text4.Text = DataRGB(0) & DataRGB(1) & DataRGB(2) & DataRGB(3)
Next j
End If
End Sub
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 123.195.12.186
※ 編輯: CuckooBoy 來自: 123.195.12.186 (12/26 01:02)