Click here to Skip to main content
15,888,073 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Extracting colors Pin
Luc Pattyn25-Sep-10 9:01
sitebuilderLuc Pattyn25-Sep-10 9:01 
GeneralRe: Extracting colors Pin
Pasan14825-Sep-10 23:00
Pasan14825-Sep-10 23:00 
GeneralRe: Extracting colors Pin
Richard MacCutchan26-Sep-10 1:14
mveRichard MacCutchan26-Sep-10 1:14 
GeneralRe: Extracting colors Pin
Luc Pattyn26-Sep-10 1:53
sitebuilderLuc Pattyn26-Sep-10 1:53 
JokeRepost Pin
dan!sh 26-Sep-10 2:54
professional dan!sh 26-Sep-10 2:54 
AnswerRe: No more Pin
Luc Pattyn26-Sep-10 3:03
sitebuilderLuc Pattyn26-Sep-10 3:03 
GeneralRe: Extracting colors Pin
Pasan14826-Sep-10 6:53
Pasan14826-Sep-10 6:53 
AnswerRe: Extracting colors Pin
Luc Pattyn26-Sep-10 3:01
sitebuilderLuc Pattyn26-Sep-10 3:01 
The mathematical alternative is:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    showColorComponents(Color.LightYellow)
    showColorComponents(Color.FromArgb(11, 22, 33, 44))
End Sub
Private Sub showColorComponents(ByVal col As Color)
    log("col=" & col.ToString & " = " & col.A & "," & col.R & "," & col.G & "," & col.B)
    Dim I As Int32 = col.ToArgb()
    log("I=0x" & I.ToString("X8"))
    Dim B As Int32 = I And 255
    Dim G As Int32 = (I >> 8) And 255
    Dim R As Int32 = (I >> 16) And 255
    Dim A As Int32 = (I >> 24) And 255
    log("ARGB=" & A & "," & R & "," & G & "," & B)
End Sub


Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


QuestionSystem.AccessViolationException Closing Windows Form Contianing An ActiveX Control Pin
Stinebaugh23-Sep-10 14:11
Stinebaugh23-Sep-10 14:11 
AnswerRe: System.AccessViolationException Closing Windows Form Contianing An ActiveX Control Pin
Stinebaugh28-Sep-10 9:15
Stinebaugh28-Sep-10 9:15 
GeneralRe: System.AccessViolationException Closing Windows Form Contianing An ActiveX Control Pin
Stinebaugh9-Nov-10 1:36
Stinebaugh9-Nov-10 1:36 
QuestionIs it possible to remove default selection in DataGridView? Pin
Andraw Tang23-Sep-10 11:36
Andraw Tang23-Sep-10 11:36 
AnswerRe: Is it possible to remove default selection in DataGridView? Pin
Luc Pattyn23-Sep-10 12:00
sitebuilderLuc Pattyn23-Sep-10 12:00 
GeneralRe: Is it possible to remove default selection in DataGridView? Pin
Andraw Tang23-Sep-10 12:20
Andraw Tang23-Sep-10 12:20 
QuestionVB6 MKGrid Pin
KhadijaYaseen23-Sep-10 10:36
KhadijaYaseen23-Sep-10 10:36 
AnswerRe: VB6 MKGrid Pin
Dave Kreskowiak27-Sep-10 3:55
mveDave Kreskowiak27-Sep-10 3:55 
Questionhow to read xml in VB6 Pin
jainiraj23-Sep-10 4:01
jainiraj23-Sep-10 4:01 
QuestionSpecific version property when adding references Pin
Jon_Boy22-Sep-10 6:09
Jon_Boy22-Sep-10 6:09 
AnswerRe: Specific version property when adding references Pin
Eddy Vluggen22-Sep-10 9:14
professionalEddy Vluggen22-Sep-10 9:14 
GeneralRe: Specific version property when adding references Pin
Jon_Boy23-Sep-10 2:05
Jon_Boy23-Sep-10 2:05 
QuestionDetecting disconnection from database Pin
chrispowell1234522-Sep-10 0:56
chrispowell1234522-Sep-10 0:56 
AnswerRe: Detecting disconnection from database Pin
Simon_Whale22-Sep-10 1:09
Simon_Whale22-Sep-10 1:09 
GeneralRe: Detecting disconnection from database Pin
chrispowell1234522-Sep-10 1:44
chrispowell1234522-Sep-10 1:44 
GeneralRe: Detecting disconnection from database Pin
Dave Kreskowiak22-Sep-10 2:04
mveDave Kreskowiak22-Sep-10 2:04 
AnswerRe: Detecting disconnection from database Pin
David Mujica22-Sep-10 3:26
David Mujica22-Sep-10 3:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.