@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: The CreatePatternBrush API !!!!C# Signature: [DllImport("gdi32.dll")] static extern IntPtr CreatePatternBrush(IntPtr hbmp); !!!!User-Defined Types: None. !!!!Notes: hbmp simply is a handle to a bitmap image. !!!!Tips & Tricks: Using the System.Drawing.Bitmap class, you can create whatever pattern you desire. !!!!Sample Code (in VB): <System.Runtime.InteropServices.DllImport("gdi32.dll")> _ Public Function CreatePatternBrush(ByVal hbmp As IntPtr) As IntPtr End Function Dim gBrush As IntPtr Dim bB As New Bitmap(Width, Height) Dim drawingArea As Graphics = Graphics.FromImage(bB) Dim lGB As New Drawing2D.LinearGradientBrush(drawingArea.VisibleClipBounds, Color.Yellow, _ Color.Orange, Drawing2D.LinearGradientMode.Vertical) drawingArea.FillRectangle(lGB, drawingArea.VisibleClipBounds) gBrush = CreatePatternBrush(bB.GetHbitmap) !!!!Alternative Managed API: Do you know one? Please contribute it! Documentation: CreatePatternBrush@msdn on MSDN
Edit gdi32.CreatePatte...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.