Click here to Skip to main content
15,913,685 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: how to run the progresbar.......?? Pin
Xandip5-May-07 1:29
Xandip5-May-07 1:29 
GeneralRe: how to run the progresbar.......?? Pin
kubben5-May-07 2:02
kubben5-May-07 2:02 
AnswerRe: how to run the progresbar.......?? Pin
Crook_EVB5-May-07 1:07
Crook_EVB5-May-07 1:07 
AnswerRe: how to run the progresbar.......?? Pin
Dileep_Vickey5-May-07 1:43
Dileep_Vickey5-May-07 1:43 
GeneralRe: how to run the progresbar.......?? Pin
Paul Conrad5-May-07 5:15
professionalPaul Conrad5-May-07 5:15 
QuestionRe: how to run the progresbar.......?? Pin
P P Vilsad6-May-07 5:30
P P Vilsad6-May-07 5:30 
AnswerRe: how to run the progresbar.......?? Pin
Dave Kreskowiak5-May-07 5:27
mveDave Kreskowiak5-May-07 5:27 
QuestionTransparency by image in GDI Pin
Crook_EVB5-May-07 0:42
Crook_EVB5-May-07 0:42 
Hi,

I'm trying to use GDI to make a bitmap from a variety of other bitmaps. I'm new to vb2005 from vb6, and I've figured out how to bitblt from one hDC to another, and get the resulting graphics to appear.

What I want to know is how to display a transparent bitmap, based on an alpha channel. I can use an alpha mask, but this doesn't seem to work for shades of grey. I keep seeing code snippets that set a global transparency for your image to be used, but I need transparency per pixel, and at least 255 shades so that it blends or completely covers the bitmap underneath. I'm going to be using multiple images that overlay to make a final image. I'm fine with the graphics side of it, I know how to make alpha layers for PNG's etc and how they work. I just can't code it in.

This code is not complete - it's been cut out to show the basic method I'm using. I'm copying a variety of graphics into a 'master graphic', then stretching that result into the size I require on my form (so it will cope at any resized form)

HDC4 is a small graphic to paste into HDC3 (my 'master image') - HDC4 is what I want to have transparency with
HDC5 is the stretched target

  Dim PictSrc As New Bitmap(texture(1)) 'Picture that goes from file to memory<br />
        Dim PictMem As Graphics = Graphics.FromImage(PictSrc)<br />
        Dim HDC4 As IntPtr = PictMem.GetHdc<br />
<br />
        BitBlt(HDC3, xpos, ypos, 100, 75, HDC4, 0, 0, &HEE0086)<br />
<br />
        StretchBlt(HDC5, 0, 0, Ship_Systems_Graphic.Width, Ship_Systems_Graphic.Height, HDC3, 0, 0, 453, 192, &HCC0020)<br />
<br />




Any help is appreciated.

www.c-digital-art.co.uk
QuestionTimer for Test Timeout + General Code Structure Pin
RichardBerry4-May-07 22:51
RichardBerry4-May-07 22:51 
AnswerRe: Timer for Test Timeout + General Code Structure Pin
kubben5-May-07 1:11
kubben5-May-07 1:11 
QuestionCustom PaperSize Problem Pin
AmirAlilou4-May-07 21:54
AmirAlilou4-May-07 21:54 
AnswerRe: Custom PaperSize Problem Pin
Duncan Edwards Jones4-May-07 23:48
professionalDuncan Edwards Jones4-May-07 23:48 
GeneralRe: Custom PaperSize Problem Pin
AmirAlilou5-May-07 1:05
AmirAlilou5-May-07 1:05 
AnswerRe: Custom PaperSize Problem Pin
P P Vilsad6-May-07 5:34
P P Vilsad6-May-07 5:34 
GeneralRe: Custom PaperSize Problem Pin
AmirAlilou6-May-07 21:15
AmirAlilou6-May-07 21:15 
GeneralRe: Custom PaperSize Problem Pin
P P Vilsad7-May-07 3:03
P P Vilsad7-May-07 3:03 
QuestionIs Multiple Exit points in a method wrong [modified] Pin
RichardBerry4-May-07 21:46
RichardBerry4-May-07 21:46 
AnswerRe: Is Multiple Exit points in a meethod wrong Pin
Xandip4-May-07 22:59
Xandip4-May-07 22:59 
GeneralRe: Is Multiple Exit points in a meethod wrong Pin
RichardBerry4-May-07 23:16
RichardBerry4-May-07 23:16 
AnswerRe: Is Multiple Exit points in a method wrong Pin
Kevin McFarlane5-May-07 3:52
Kevin McFarlane5-May-07 3:52 
AnswerRe: Is Multiple Exit points in a method wrong Pin
Dave Kreskowiak5-May-07 3:57
mveDave Kreskowiak5-May-07 3:57 
GeneralRe: Is Multiple Exit points in a method wrong Pin
Paul Conrad5-May-07 5:18
professionalPaul Conrad5-May-07 5:18 
GeneralRe: Is Multiple Exit points in a method wrong Pin
Kevin McFarlane5-May-07 12:18
Kevin McFarlane5-May-07 12:18 
GeneralRe: Is Multiple Exit points in a method wrong Pin
Paul Conrad5-May-07 12:29
professionalPaul Conrad5-May-07 12:29 
GeneralRe: Is Multiple Exit points in a method wrong Pin
RichardBerry6-May-07 23:56
RichardBerry6-May-07 23:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.