Reply LinkBack Thread Tools Search this Thread
Old 28-10-2004, 15:55   #1 (permalink)
Kikketer
Webmaster, Student
 
Join Date: Apr 2004
Location: Wisconsin
Posts: 25
Visual Basic Transparency Question

I know this really doesn't have much to do with the web but you all are so great at answering my questions I felt this was definatly the place to ask.

I have a VB form where I have a image box that pulls pictures from a database and displays them depending on what selection the user is on. The thing is I want to put a title that overlaps this image and have the area around the words be transparent.

The title is an image as well (It just shows up about 50% of the time depending on the selection). I have looked around and found you can't have this type of transparency with another imagebox. So I went on to look at this GDI thing. Well after some time of figureing that out (making the image with a black background and using the transparency black) I found that the object is below everything. So now instead of my Title image floating on top of the imagebox it sits underneith and can't be seen (no good).

I know it sounds confusing but here is the paint part of the code:
Code:
Private Sub frmMyForm_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint Dim imgBmp As New Bitmap(imgLoc) imgBmp.MakeTransparent(Color.White) e.Graphics.DrawImage(New Bitmap(imgBmp), 20, 20) End Sub
imgLoc is the name of the image "simultaneous.bmp"

Thanks for any help
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8