Jamesanthony
06-29-2006, 03:56 PM
I don't seem to have an image control only picturebox
Is there one in .NET ???
Is there one in .NET ???
Simple when you knowJamesanthony 06-29-2006, 03:56 PM I don't seem to have an image control only picturebox Is there one in .NET ??? MikeJ 06-29-2006, 04:03 PM Image controls were made obsolete with .NET and GDI+. Use the Picturebox. (Actually, you really don't even need that if you create your images in memory!) Jamesanthony 06-29-2006, 04:14 PM how do i do that I have an image which in vb i dont see the back white in vb.net like this eee is VB image ddd is VB.NET.picturebox MikeJ 06-29-2006, 04:16 PM Set the TransparencyKey to Color.White (assuming that the transparent background is exactly white - &HFFFFFF) Jamesanthony 06-29-2006, 04:38 PM its not a property, is it possible at runtime ??? MikeJ 06-29-2006, 04:48 PM My mistake, I was assuming you were drawing directly to a form. Instead, you will need to create a graphics object and use MakeTransparent: Dim g As Graphics = PictureBox1.CreateGraphics() Dim b As Bitmap = New Bitmap("YourFileName") b.MakeTransparent(Color.White) ' PictureBox.Image = b Jamesanthony 06-30-2006, 09:56 AM Thanks Jamesanthony 07-01-2006, 06:53 AM C:\AMPS\DotNET\Solitaire\frmSolitare.vb(364): 'MakeTransparent' is not a member of 'System.Drawing.Bitmap'. got this error any ideas ? MikeJ 07-01-2006, 08:27 AM What version of .NET are you using? Works fine for me with .NET Framework 1.0 |
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum