Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

RGB (Structures)
 
.
Summary
Describes a color consisting of relative intensities of red, green, and blue.
Summary
TODO - a short description

C# Definition:

[StructLayout(LayoutKind.Sequential)]
public struct RGBQUAD
{
    public byte rgbBlue;
    public byte rgbGreen;
    public byte rgbRed;
    public byte rgbReserved;
struct RGB {
   public TODO;
}

VB Definition:

<StructLayout(LayoutKind.Sequential)> _
Structure RGBQUAD
    Public rgbBlue As Byte
    Public rgbGreen As Byte
    Public rgbRed As Byte
    Public rgbReserved As Byte
End Structure
    <StructLayout(LayoutKind.Sequential)> _
   Private Structure RGB
    Dim byRed, byGreen, byBlue, RESERVED As Byte
    Public Sub New(ByVal colorIn As Color)
        byRed = colorIn.R
        byGreen = colorIn.G
        byBlue = colorIn.B
        RESERVED = 0
    End Sub
    Public Function ToInt32() As Int32
        Dim RGBCOLORS(3) As Byte
        RGBCOLORS(0) = byRed
        RGBCOLORS(1) = byGreen
        RGBCOLORS(2) = byBlue
        RGBCOLORS(3) = RESERVED
        Return BitConverter.ToInt32(RGBCOLORS, 0)
    End Function
    End Structure

User-Defined Field Types:

None.

Notes:

None.

Documentation
RGBQUAD on MSDN
Documentation
RGB on MSDN

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • alternate definitions?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions