Color RGB from a Long Using "Point" method
After using the POINT method the computer returns a long value like 16711680 but with this function it will return the color in the RGB(R,G,B) format.
AI
สรุปโดย AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
ซอร์สโค้ด
Public Blue As Double
Public Green As Double
Public Red As Double
Public BlueS As Double
Public GreenS As Double
Public RGBs As String
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, _
Y As Single)
Call ConvertRGB(Form1.Point(X, Y))
Form1.Caption = RGBs
End Sub
Public Function ConvertRGB(P)
Blue = Fix((P / 256) / 256)
BlueS = (Blue * 256) * 256
Green = Fix((P - BlueS) / 256)
GreenS = Green * 256
Red = Fix(P - BlueS - GreenS)
RGBs = "RGB(" & Red & ", " & Green & ", " & Blue & ")"
End Function
ความคิดเห็นดั้งเดิม (3)
กู้คืนจาก Wayback Machine