6 Months Free & No Setup Fees ASP.NET Hosting!
Skip Navigation Links
C# Corner Home
Forum Home
Latest 50
Unanswered
Win Prizes
All Time Leaders
Jump to CategoryExpand Jump to Category
Login 
    Welcome Guest!
 Search Forum For :  
X
 Login
Please login to submit a new post, reply and edit exiting posts, see user profiles, and access more features. If you are not a registered member, Register here.
User Id / Email:
Password:  
Forgot Password | Forgot UserName
   Home » Visual Basic .NET » Display transparent Images in picture box
       
Author Reply
vinod
posted 1 posts
since Sep 25, 2003 
from

Display transparent Images in picture box

  Posted on: 26 Sep 2003       
Has anybody tried displaying transparent (GIF) Images in picture box ? I tried to do but it didn't work. A default background is shown instead. There was an image control in vb6 which does this job perfectly but that too not found in vb.net.
Mahesh Chand
posted  4021 posts
since  Oct 29, 2004 
from  Philadelphia

 Re: Display transparent Images in picture box
  Posted on: 26 Sep 2003        0  
Do you have a transparent image or you want to display an image and make it transparent? If an image is transparent, shouldn't you be looking at the background color of the control?
Admin

erushton
posted  1 posts
since  Mar 07, 2004 
from 

 Re: Graphics Programming with GDI+
  Posted on: 07 Mar 2004        0  
I have a question regarding your book entitled: Graphics Programming with GDI+. In the book, it says that "Complete source code for the examples in this book (in both C# and Visual Basic.NET) is available for download at www.awprofessional.com/titles/0321160770." I have downloaded the sourcecode file "chand_sourcecode.zip" and I found only two vbproj project files. I was expecting a corresponding VB.NET project for each of the C# projects in the book. How do I get the VB.NET files?
rmalli
posted  5 posts
since  Apr 21, 2004 
from 

 Re: Display transparent Images in picture box
  Posted on: 15 Nov 2004        0  
just simply drag a picture box control in form, and pick the URL of ur transparent image. this will be work. if u don't have picture box control then customize ur toolbox and add picture box contol. i have made, this is't showing any error. RAJ
rmalli
posted  5 posts
since  Apr 21, 2004 
from 

 Re: Display transparent Images in picture box
  Posted on: 15 Nov 2004        0  
hey vinod try this code: in this code i have use a "jpg"(image.jpg) image. i have written code in GDI+. Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs) Dim g As Graphics = e.Graphics ' Create an Image from a file Dim curImage As Image = Image.FromFile("image.jpg") ' Draw image g.DrawImage(curImage, 0, 0, curImage.Width, curImage.Height) ' Create pens with different opacity Dim opqPen As New Pen(Color.FromArgb(255, 0, 255, 0), 10) Dim transPen As New Pen(Color.FromArgb(128, 0, 255, 0), 10) Dim totTransPen As New Pen(Color.FromArgb(40, 0, 255, 0), 10) ' Draw graphics object using transparent pens g.DrawLine(opqPen, 10, 10, 200, 10) g.DrawLine(transPen, 10, 30, 200, 30) g.DrawLine(totTransPen, 10, 50, 200, 50) Dim semiTransBrush As New SolidBrush(Color.FromArgb(60, 0, 255, 0)) g.FillRectangle(semiTransBrush, 20, 100, 200, 100) End Sub RAJ
rmalli
posted  5 posts
since  Apr 21, 2004 
from 

 Re: Display transparent Images in picture box
  Posted on: 15 Nov 2004        0  
hey vinod try this code: in this code i have use a "jpg"(image.jpg) image. i have written code in VB.NET, GDI+. Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs) Dim g As Graphics = e.Graphics ' Create an Image from a file Dim curImage As Image = Image.FromFile("image.jpg") ' Draw image g.DrawImage(curImage, 0, 0, curImage.Width, curImage.Height) ' Create pens with different opacity Dim opqPen As New Pen(Color.FromArgb(255, 0, 255, 0), 10) Dim transPen As New Pen(Color.FromArgb(128, 0, 255, 0), 10) Dim totTransPen As New Pen(Color.FromArgb(40, 0, 255, 0), 10) ' Draw graphics object using transparent pens g.DrawLine(opqPen, 10, 10, 200, 10) g.DrawLine(transPen, 10, 30, 200, 30) g.DrawLine(totTransPen, 10, 50, 200, 50) Dim semiTransBrush As New SolidBrush(Color.FromArgb(60, 0, 255, 0)) g.FillRectangle(semiTransBrush, 20, 100, 200, 100) End Sub RAJ
       
Dynamic PDF
ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
Introducing MaxV - one click. infinite control. Hyper-V Hosting from MaximumASP.
Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Nevron Chart for .NET 2010.1 Now Available
The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
ASP.NET 4 Hosting
Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites - Click Here!
6 Months Free & No Setup Fees ASP.NET Hosting!
 Hosted by MaximumASP  |  Found a broken link?  |  Contact Us  |  Terms & conditions  |  Privacy Policy  |  Site Map  |  Advertise with us
Current Version: 5.2011.3.12
 © 1999 - 2012  Mindcracker LLC. All Rights Reserved