'set the default program dir: strDefDir = My.Computer.FileSystem.CurrentDirectory & "\" 'load texture: bmpTexture = Image.FromFile(strDefDir & "tex.bmp") 'convert texture to32bppPArgb: Dim bmpTemp As New Bitmap(256, 256, Imaging.PixelFormat.Format32bppPArgb) Dim gTemp As Graphics = Graphics.FromImage(bmpTemp) gTemp.DrawImageUnscaled(bmpTexture, 0, 0) bmpTexture = bmpTemp gTemp.Dispose()
Private Sub frmGraphicsDevice_Paint(sender As Object, e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint e.Graphics.CompositingQuality = Drawing2D.CompositingQuality.HighSpeed e.Graphics.DrawImage(bmpTexture, ptrDrawPoint) End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)