Hi, i am trying to find a way to use transparency under visual studio 2005 or 2008 using png for my background and buttons, but it seem that without gdiplus.dll its no possible and i am stuck i just cant find a way to do it any help would be appreciated thanks in advance
Transparency in visual studio
Same problem here. After some googling it's clear that it won't work in vb2005. However they say that it should work in vb2008 with .net compactframework 3.5. Did not test it yet :-(
Not possible in both 2005/2008. Following code does some basic trasparency Sorry for pasting code like this, was not able to upload attachment. Imports System Imports System.Drawing Imports System.Drawing.Imaging Imports System.Windows.Forms Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click MsgBox("Hi Raj") End Sub ' The .NET Compact Framework supports transparency, ' but with only one transparency color. ' The SetColorKey method must have the same color ' specified for the low color and high color range. ' Note that you must uncomment lines of code ' as indicated for the desired transparency effect. Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs) ' Create a red and black bitmap to demonstrate transparency. Dim bmp As New Bitmap(75, 75) Dim g As Graphics = Graphics.FromImage(bmp) g.FillEllipse(New SolidBrush(Color.Red), 0, 0, bmp.Width, bmp.Width) g.DrawLine(New Pen(Color.Black), 0, 0, bmp.Width, bmp.Width) g.DrawLine(New Pen(Color.Black), bmp.Width, 0, 0, bmp.Width) g.Dispose() Dim attr As New ImageAttributes ' Set the transparency color key based on the upper-left pixel ' of the image. ' Uncomment the following line to make all black pixels transparent: attr.SetColorKey(bmp.GetPixel(0, 0), bmp.GetPixel(0, 0)) ' Set the transparency color key based on a specified value. ' Uncomment the following line to make all red pixels transparent: ' attr.SetColorKey(Color.Red, Color.Red) ' Draw the image using the image attributes. Dim dstRect As New Rectangle(0, 0, bmp.Width, bmp.Height) e.Graphics.DrawImage(bmp, dstRect, 0, 0, bmp.Width, bmp.Height, _ GraphicsUnit.Pixel, attr) End Sub End Class