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
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy

Search Results for "BITMAP" in [All]

user32

.

        else if (iData.GetDataPresent(DataFormats.Bitmap))

.

            Bitmap image = (Bitmap)iData.GetData(DataFormats.Bitmap);

.

static extern bool CreateCaret(IntPtr hWnd, IntPtr hBitmap, int nWidth,

.

    Public Shared Function CreateCaret(ByVal hWnd As IntPtr, ByVal hBitmap As IntPtr, ByVal nWidth As Integer, ByVal nHeight As Integer) As Boolean

.

If you're using a Bitmap image to render the caret, the colour will be changed based on the background of the Control. To ensure that you have the expected colour, first apply an XOR mask:

.

    Public Shared Function CreateCaret(ByVal hWnd As IntPtr, ByVal hBitmap As IntPtr, ByVal nWidth As Integer, ByVal nHeight As Integer) As Boolean

.

    Dim bmPtr As IntPtr = GetHBitmap()

.

    The hBitmap parameter is a handle to the bitmap you want to use(or gray/solid).

.

    Bitmaps have a method attached to return the handle

.

    Function GetHBitmap() As IntPtr

.

    Dim embeddedBitmap As Byte() = {137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 10, 0, 0, 0, 10, 8, 2, 0, 0, 0, 2, 80, 88, 234, 0, 0, 0, 1, 115, 82, 71, 66, 0, 174, 206, 28, 233, 0, 0, 0, 4, 103, 65, 77, 65, 0, 0, 177, 143, 11, 252, 97, 5, 0, 0, 0, 9, 112, 72, 89, 115, 0, 0, 14, 195, 0, 0, 14, 195, 1, 199, 111, 168, 100, 0, 0, 0, 48, 73, 68, 65, 84, 40, 83, 99, 248, 143, 23, 16, 39, 205, 192, 128, 162, 14, 206, 165, 138, 225, 184, 0, 204, 14, 252, 118, 3, 249, 8, 33, 100, 54, 132, 2, 2, 136, 40, 4, 64, 133, 144, 165, 177, 128, 255, 255, 1, 57, 41, 7, 8, 21, 108, 65, 188, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130}

.

    Dim bm As Bitmap

.

    Using s As New System.IO.MemoryStream(embeddedBitmap)

.

        bm = CType(Bitmap.FromStream(s), Bitmap)

.

    Return bm.GetHbitmap()

.

     public IntPtr MaskBitmap;

.

     public IntPtr ColorBitmap;

.

     Bitmap img = GetIconBitmap(...);

.

     IntPtr imgHandle = img.GetHbitmap();

.

     ii.MaskBitmap = imgHandle;

.

     ii.ColorBitmap = imgHandle;

.

Bitmap.FromHicon()

.

     public IntPtr MaskBitmap;

.

     public IntPtr ColorBitmap;

.

     Bitmap img = GetIconBitmap(...);

.

     IntPtr imgHandle = img.GetHbitmap();

.

     ii.MaskBitmap = imgHandle;

.

     ii.ColorBitmap = imgHandle;

.

    internal static extern int SetMenuItemBitmaps(HMenu hmenu, int nPosition, MFMENU uflags, IntPtr hBitmapUnchecked, IntPtr hBitmapChecked);

.

Bitmap bmp = (Bitmap)Image.FromFile(fileName);

.

    internal const UInt32 MF_USECHECKBITMAPS  =0x00000200;

.

    internal const UInt32 MF_BITMAP       =0x00000004;

.

    internal const UInt32 MFT_BITMAP      =MF_BITMAP;

.

    Dim myImage As Image = New Bitmap(size.Width, size.Height)

.

      Dim bmp As New Bitmap(area.Width, area.Height)

.

    /// - Win32 GDI objects (pens, brushes, fonts, palettes, regions, device contexts, bitmap headers)

.

    ///      - WIN32 resources (accelerator tables, bitmap resources, dialog box templates, font resources, menu resources, raw data resources, string table entries, message table entries, cursors/icons)

.

     public IntPtr hbmMask;     // (HBITMAP) Specifies the icon bitmask bitmap. If this structure defines a black and white icon,

.

     public IntPtr hbmColor;    // (HBITMAP) Handle to the icon color bitmap. This member can be optional if this

.

                    // flag to the destination; subsequently, the color bitmap is applied (using XOR) to the

.

This function CREATES two GDI objects: bitmap hbmColor and bitmap hbmMask. Don't forget to delete them!!!

.

    public Bitmap ColorBitmap {

.

        return Image.FromHbitmap(ii.hbmColor);

.

    public Bitmap MaskBitmap {

.

        return Image.FromHbitmap(ii.hbmMask);

.

  Private Function GetDecoratedFormImage() As Bitmap

.

    ' Make a Bitmap to hold the image.

.

    Dim TempBMP As New Bitmap(Me.Width, Me.Height, MyGrph)

.

    ' creating the new Bitmap, which uses me_gr.

.

    ' BitBlt the form's image onto the Bitmap.

.
Summary
.

static extern IntPtr LoadBitmap(IntPtr hInstance, string lpBitmapName);

.

Declare Function LoadBitmap Lib "user32" Alias "LoadBitmapA" (ByVal hInstance As IntPtr, ByVal lpBitmapName As String) As IntPtr

.

static extern IntPtr LoadBitmap(IntPtr hInstance, long resourceID)

.

static extern IntPtr LoadBitmap(IntPtr hInstance, int resourceID);

.
Documentation
[LoadBitmap] on MSDN
.

[System.Drawing.Bitmap.FromResource]

.

Screenshotting a form to a Bitmap in C#:

.

Bitmap bmp = new Bitmap(form.Size.Width, form.Size.Height, g);

.

Control.DrawToBitmap()

.

        else if (iData.GetDataPresent(DataFormats.Bitmap))

.

            Bitmap image = (Bitmap)iData.GetData(DataFormats.Bitmap);

.
Summary
.

static extern bool SetMenuItemBitmaps(IntPtr hMenu, uint uPosition,

.

   uint uFlags, IntPtr hBitmapUnchecked, IntPtr hBitmapChecked);

.

        public static extern int SetMenuItemBitmaps(IntPtr hMenu, IntPtr nPosition, int wFlags, IntPtr hBitmapUnchecked, IntPtr hBitmapChecked);

.

        private int AddImageToMenuItem(MenuItem mi,string bitmap_file)

.

            Bitmap bmp = new Bitmap(bitmap_file);

.

        private int AddImageToMenuItem(MenuItem mi,Bitmap bmp)

.

            IntPtr intp = bmp.GetHbitmap();

.

            return  SetMenuItemBitmaps(mi.Parent.Handle,(IntPtr) mi.Index,MF_BYPOSITION,intp,intp);

.
Documentation
[SetMenuItemBitmaps] on MSDN
.

Bitmap mybitmap = new Bitmap("1.jpg");

.

CreateCaret(listBox1.Handle,mybitmap.GetHbitmap(), 1, listBox1.Height);

.

    public void SetBackground(Control control, Bitmap bitmap)

.

        bitmap = la PNG da utilizzare come sfondo*/

.

        // Imposta le dimensioni del controllo come quelle della bitmap

.

        control.Width = bitmap.Width;

.

        control.Height = bitmap.Height;

.

        if (bitmap.PixelFormat != System.Drawing.Imaging.PixelFormat.Format32bppArgb)

.

        IntPtr hBitmap = IntPtr.Zero;

.

        IntPtr oldBitmap = IntPtr.Zero;

.

            hBitmap = bitmap.GetHbitmap(Color.FromArgb(0));

.

            oldBitmap = Win32.SelectObject(memDc, hBitmap);

.

            Win32.Size size = new Win32.Size(bitmap.Width, bitmap.Height);

.

            if (hBitmap != IntPtr.Zero)

.

                Win32.SelectObject(memDc, oldBitmap);

.

                Win32.DeleteObject(hBitmap);

comctl32

.

static extern bool ImageList_AddMasked(IntPtr hImageList, IntPtr hBitmap, int crMask);

.

Private Shared Function ImageList_AddMasked(hImageList As IntPtr, hBitmap As IntPtr, crMask As Integer) As Boolean

.

static extern bool ImageList_AddMasked(IntPtr hImageList, IntPtr hBitmap, int crMask);

.

       /// <param name="value">A Bitmap of the image to add to the list.</param>

.

       /// <param name="transparentColor">The color to use as the transparent color within the Bitmap.</param>

.

       /// <param name="value">A Bitmap of the image to add to the list.</param>

.

       /// <param name="transparentColor">The color to use as the transparent color within the Bitmap.</param>

Constants

.

        SetBitmap(buttonPlsVisible, IDB_NOW_PLAYING);

.

        SetBitmap(buttonPlsVisible, IDB_NOW_PLAYING);

.

        //SetBitmap(hWnd, (isPlaylistVisible ? IDB_RESTORE_PRESSED : IDB_CLOSE_PRESSED));

.

        //SetBitmap(hWnd, (isPlaylistVisible ? IDB_RESTORE_NORMAL : IDB_CLODE_NORMAL));

24: GGO_
.

public const uint GGO_BITMAP       = 1;

.

public const uint GGO_GRAY2_BITMAP = 4;

.

public const uint GGO_GRAY4_BITMAP = 5;

.

public const uint GGO_GRAY8_BITMAP = 6;

.

Public Const GGO_BITMAP       As Integer = 1;

.

Public Const GGO_GRAY2_BITMAP As Integer = 4;

.

Public Const GGO_GRAY4_BITMAP As Integer = 5;

.

Public Const GGO_GRAY8_BITMAP As Integer = 6;

25: IMAGE_
.

    /// Loads a bitmap.

.

    public const int IMAGE_BITMAP = 0;

.

    ''' <summary>Loads a bitmap.</summary>

.

    Public Const IMAGE_BITMAP As UInt32 = 0

26: LR_
.

    /// OBM_ OEM bitmaps

.

    /// Do not use this option if you are loading a bitmap with a color depth greater than 8bpp.

.

    /// Do not use this option if you are loading a bitmap with a color depth greater than 8bpp.

.

    /// When the uType parameter specifies IMAGE_BITMAP, causes the function to return a DIB section bitmap rather than a compatible bitmap.

.

    /// This flag is useful for loading a bitmap without mapping it to the colors of the display device.

.

    ''' OBM_ OEM bitmaps

.

    ''' Do not use this option if you are loading a bitmap with a color depth greater than 8bpp.

.

    ''' Do not use this option if you are loading a bitmap with a color depth greater than 8bpp.

.

    ''' When the uType parameter specifies IMAGE_BITMAP, causes the function to return a DIB section bitmap rather than a compatible bitmap.

.

    ''' This flag is useful for loading a bitmap without mapping it to the colors of the display device.

27: OBJ_
.

        OBJ_BITMAP=      7,

.

    /// <summary>The specified transform does not match the bitmap's color space.</summary>

.

public const int FSCTL_GET_VOLUME_BITMAP = 0x0009006f;

.

        /// The specified transform does not match the bitmap's color space.

.

        /// There was an error in a Windows GDI call while converting the bitmap to a DIB

.

        public const int CONVERT10_E_OLESTREAM_BITMAP_TO_DIB = (int)(0x800401C3 - 0x100000000);

.

        /// There was an error in a Windows GDI call while converting the DIB to a bitmap.

.

        public const int CONVERT10_E_STG_DIB_TO_BITMAP = (int)(0x800401C6 - 0x100000000);

avifil32

.

   ByRef bih As BITMAPINFOHEADER) As Integer

.

                         ByRef lpFormat As BITMAPINFOHEADER,

.

    Public Structure BITMAPINFOHEADER

.

VB BITMAPINFOHEADER Warning

.

    Public Shared Function AVIStreamReadFormat2(ByVal aviStream As IntPtr, ByVal lPos As Int32, ByRef lpFormat As BITMAPINFOHEADER, ByRef cbFormat As Int32) As Integer

.

                         ByRef lpFormat As BITMAPINFOHEADER,

.

    Public Structure BITMAPINFOHEADER

.

VB BITMAPINFOHEADER Warning

.

    Public Shared Function AVIStreamReadFormat2(ByVal aviStream As IntPtr, ByVal lPos As Int32, ByRef lpFormat As BITMAPINFOHEADER, ByRef cbFormat As Int32) As Integer

dnsapi

.

    /// <param name="Options">A value that contains a bitmap of the DNS Query Options to use in the DNS query</param>

.

        public ushort wTypeBitMapsLength;

.

        public IntPtr TypeBitMaps;    // BYTE  TypeBitMaps[1];

.

        /// <param name="Options">A value that contains a bitmap of the DNS Query Options to use in the DNS query</param>

.

        public ushort wTypeBitMapsLength;

.

        public IntPtr TypeBitMaps;    // BYTE  TypeBitMaps[1];

opengl32

.

        GL_BITMAP_TOKEN = 0x0704,

.

        GL_BITMAP = 0x1A00,

.

    public static extern void glBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, byte[] bitmap);

kernel32

.

     FsctlGetVolumeBitmap = (EFileDevice.FileSystem << 16) | (27 << 2) | EMethod.Neither | (0 << 14),

.

    BITMAP = 2,

.

    BITMAP = 2

.

    private const uint RT_BITMAP = 0x00000002;

.

Public Function ConvertRBGTo1bpp(ByVal pSrcImg As Image) As Bitmap

.

  Dim bitmap As Bitmap = New Bitmap(Width, Height, PixelFormat.Format1bppIndexed)

.

  Dim BmpCopy As Bitmap = New Bitmap(Width, Height, PixelFormat.Format32bppArgb)

.

  Dim bitmapData As BitmapData

.

  bitmapData = bitmap.LockBits(rect, ImageLockMode.WriteOnly, PixelFormat.Format1bppIndexed)

.

  Dim pixels As IntPtr = bitmapData.Scan0

.

  If (bitmapData.Stride > 0) Then

.

    pBits = pixels.ToInt32() + bitmapData.Stride * (Height - 1)

.

  Dim stride As Integer = Math.Abs(bitmapData.Stride)

.

  bitmap.UnlockBits(bitmapData)

.

  Return bitmap

coredll

.
Summary
Set Clipboad data(Text, bitmap, etc).
.

        CF_BITMAP = 2

gdiplus

.
Summary
Retrieve the color of the pixel at position (x,y) in a bitmap.
.

static extern int GdipBitmapGetPixel(HandleRef bitmap, int x, int y,

.

Declare Function GdipBitmapGetPixel Lib "gdiplus.dll" (TODO) As TODO

.

From the Bitmap class in the System.Drawing namespace (C# version):

.

    Color color = bitmap.GetPixel(int x, int y);

.
Documentation
[GdipBitmapGetPixel] on MSDN
.

static extern int GdipBitmapLockBits(HandleRef bitmap, ref GPRECT rect,

.

   ImageLockMode flags, PixelFormat format, ref BitmapData lockedBitmapData);

.

Declare Function GdipBitmapLockBits Lib "gdiplus.dll" (TODO) As TODO

.
Documentation
[GdipBitmapLockBits] on MSDN
.
Summary
Set the pixel color at position (x,y) in a bitmap.
.

static extern int GdipBitmapSetPixel(HandleRef bitmap, int x, int y, int argb);

.

Declare Function GdipBitmapSetPixel Lib "gdiplus.dll" (TODO) As Int

.

In the Bitmap class in the System.Drawing namespace (C# version):

.

    bitmap.SetPixel(int x, int y, Color color);

.
Documentation
[GdipBitmapSetPixel] on MSDN
.

static extern int GdipBitmapSetResolution(HandleRef bitmap, float dpix,

.

Declare Function GdipBitmapSetResolution Lib "gdiplus.dll" (TODO) As TODO

.
Documentation
[GdipBitmapSetResolution] on MSDN
.

static extern int GdipBitmapUnlockBits(HandleRef bitmap,

.

   BitmapData lockedBitmapData);

.

Declare Function GdipBitmapUnlockBits Lib "gdiplus.dll" (TODO) As TODO

.
Documentation
[GdipBitmapUnlockBits] on MSDN
.

static extern int GdipCloneBitmapAreaI(int x, int y, int width,

.

   int height, int format, HandleRef srcbitmap, out IntPtr dstbitmap);

.

Declare Function GdipCloneBitmapAreaI Lib "gdiplus.dll" (TODO) As TODO

.
Documentation
[GdipCloneBitmapAreaI] on MSDN
.

static extern int GdipCreateBitmapFromFileICM(string filename,

.

   out IntPtr bitmap);

.

Declare Function GdipCreateBitmapFromFileICM Lib "gdiplus.dll" (TODO) As TODO

.
Documentation
[GdipCreateBitmapFromFileICM] on MSDN
.

static extern int GdipCreateBitmapFromGdiDib(IntPtr bminfo, IntPtr pixdat, ref IntPtr image);

.

Declare Function GdipCreateBitmapFromGdiDib Lib "GdiPlus.dll" (ByRef GdiBitmapInfo As BITMAPINFO, ByVal GdiBitmapData As Long, ByRef bitmap As Long) As Status

.

    int st = GdipCreateBitmapFromGdiDib(bminfo, pixdat, ref img);

.
Documentation
[GdipCreateBitmapFromGdiDib] on MSDN
.

static extern int GdipCreateBitmapFromGraphics(int width, int height,

.

   HandleRef graphics, out IntPtr bitmap);

.

Declare Function GdipCreateBitmapFromGraphics Lib "gdiplus.dll" (TODO) As TODO

.
Documentation
[GdipCreateBitmapFromGraphics] on MSDN
.

static extern int GdipCreateBitmapFromHBITMAP(HandleRef hbitmap,

.

   HandleRef hpalette, out IntPtr bitmap);

.

Declare Function GdipCreateBitmapFromHBITMAP Lib "gdiplus.dll" (TODO) As TODO

.
Documentation
[GdipCreateBitmapFromHBITMAP] on MSDN
.

static extern int GdipCreateBitmapFromHICON(HandleRef hicon, out IntPtr bitmap);

.

Declare Function GdipCreateBitmapFromHICON Lib "gdiplus.dll" (TODO) As TODO

.
Documentation
[GdipCreateBitmapFromHICON] on MSDN

Structures

51: BITMAP
.
Summary
The BITMAP structure defines the type, width, height, color format, and bit values of a bitmap.
.

/// The BITMAP structure defines the type, width, height, color format, and bit values of a bitmap.

.

public struct BITMAP

.

     /// The bitmap type. This member must be zero.

.

     /// The width, in pixels, of the bitmap. The width must be greater than zero.

.

     /// The height, in pixels, of the bitmap. The height must be greater than zero.

.

     /// values of a bitmap form an array that is word aligned.

.

     /// A pointer to the location of the bit values for the bitmap. The bmBits member must be a pointer to an array of

.
Documentation
.
Summary
Introduces a .bmp file, and is followed by a [BITMAPINFOHEADER] structure.
.

public struct BITMAPFILEHEADER

.

Structure BITMAPFILEHEADER

.
Documentation
[BITMAPFILEHEADER] on MSDN
.

struct BITMAPINFO {

.

   /// A BITMAPINFOHEADER structure that contains information about the dimensions of color format.

.

   public BITMAPINFOHEADER bmiHeader;

.

Structure BITMAPINFO

.
Documentation
[BITMAPINFO] on MSDN
.
Summary
BITMAPINFOHEADER
.

The BITMAPINFOHEADER contains information about the color space and dimensions of a DIB.

.

public struct BITMAPINFOHEADER

.

    public BitmapCompressionMode  biCompression;

.

Public Structure BITMAPINFOHEADER

.

     Public biCompression As BitmapCompressionMode

.

    //     The storage medium is a Graphics Device Interface (GDI) component (HBITMAP).

.

    //     the bitmap.

.

    //     the bitmap.

.

    //     the bitmap.

.

    '     The storage medium is a Graphics Device Interface (GDI) component (HBITMAP).

.

    '     the bitmap.

.

    '     the bitmap.

.

    '     the bitmap.

.

    /// The icon bitmask bitmap

.

    /// A handle to the icon color bitmap.

.

   ''' The icon bitmask bitmap.

.

   ''' A handle to the icon color bitmap.

.

        public int xBitmap;

.

        public int yBitmap;

.

        Public xBitmap As Integer

.

        Public yBitmap As Integer

58: MIIM
.

     BITMAP     = 0x00000080,

.

    BITMAP     = &H00000080

.

        public int iBitmap;

.

        Public iBitmap As Integer

cards

.
Summary
Animates the backs of cards by overlaying part of the card back with an alternative bitmap.

Cut off search results after 60. Please refine your search.


 
Access PInvoke.net directly from VS: