Click here to Skip to main content
15,442,081 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: What is the problem here? Pin
Richard MacCutchan31-Aug-21 21:57
mveRichard MacCutchan31-Aug-21 21:57 
GeneralRe: What is the problem here? Pin
Richard Deeming31-Aug-21 22:50
mveRichard Deeming31-Aug-21 22:50 
QuestionHow to faster process export to excel row by row with excel formating Pin
Anton Setiawan 202124-Aug-21 18:33
MemberAnton Setiawan 202124-Aug-21 18:33 
AnswerRe: How to faster process export to excel row by row with excel formating Pin
Richard Deeming24-Aug-21 21:37
mveRichard Deeming24-Aug-21 21:37 
QuestionBlank/Black webcam on newer model laptop running webcam program in VB.net Pin
nethelp1116-Aug-21 16:47
professionalnethelp1116-Aug-21 16:47 
AnswerRe: Blank/Black webcam on newer model laptop running webcam program in VB.net Pin
Richard MacCutchan16-Aug-21 21:46
mveRichard MacCutchan16-Aug-21 21:46 
AnswerRe: Blank/Black webcam on newer model laptop running webcam program in VB.net Pin
Eddy Vluggen17-Aug-21 1:38
professionalEddy Vluggen17-Aug-21 1:38 
QuestionOdd Transparency behavior in VB.Net Panel Pin
Peter R. Fletcher6-Aug-21 4:02
MemberPeter R. Fletcher6-Aug-21 4:02 
I have a small clock/calendar Applet that lives on my desktop, since (for at least some purposes) I like to have an analog clock. I recently decided to clean up the Panel that displays the clock to make the square background to the round clockface transparent, so that the clock face would just 'float' over the desktop. I discovered that this was not simply a matter of making the relevant area in the source image transparent, since the transparency 'disappears' when the image is loaded into the Panel. However, the following load code almost works when the panel is displayed:
VB
Private Function ConvertImageToRGBFormat(img As Image) As Image
        Dim temp As New Bitmap(img.Width, img.Height, System.Drawing.Imaging.PixelFormat.Format32bppRgb)
        Dim g As Graphics = Graphics.FromImage(temp)
        g.DrawImage(img, New Rectangle(0, 0, img.Width, img.Height), 0, 0, img.Width, img.Height, GraphicsUnit.Pixel)
        g.Dispose()
        temp.MakeTransparent(temp.GetPixel(1, 1)) ' pixel(1,1) is part of the transparent area
        Return temp
End Function

I say that it 'almost' works because the square background of the displayed image is, indeed, transparent, except for a very thin green 'halo' round the clock. I typically use bright green as the guide color for image areas that I am going to make transparent, so I initially thought that the feathering at the edges of the clock had caused this, and changed the color for the transparent area to a dark gray (similar to the background color on my desktop), so that there was no green anywhere in the image (or in its color palette). Notwithstanding this change, the green halo persists. This is how the Panel appears on the desktop, and this is the source image.
Does anyone have any idea what is going on?
AnswerRe: Odd Transparency behavior in VB.Net Panel Pin
Dave Kreskowiak6-Aug-21 5:02
mveDave Kreskowiak6-Aug-21 5:02 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Peter R. Fletcher6-Aug-21 5:49
MemberPeter R. Fletcher6-Aug-21 5:49 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Dave Kreskowiak6-Aug-21 6:16
mveDave Kreskowiak6-Aug-21 6:16 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Peter R. Fletcher6-Aug-21 6:31
MemberPeter R. Fletcher6-Aug-21 6:31 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Peter R. Fletcher6-Aug-21 8:27
MemberPeter R. Fletcher6-Aug-21 8:27 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Dave Kreskowiak6-Aug-21 13:25
mveDave Kreskowiak6-Aug-21 13:25 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Peter R. Fletcher7-Aug-21 3:45
MemberPeter R. Fletcher7-Aug-21 3:45 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Dave Kreskowiak7-Aug-21 5:14
mveDave Kreskowiak7-Aug-21 5:14 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Peter R. Fletcher7-Aug-21 9:10
MemberPeter R. Fletcher7-Aug-21 9:10 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Dave Kreskowiak7-Aug-21 9:40
mveDave Kreskowiak7-Aug-21 9:40 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Peter R. Fletcher7-Aug-21 9:59
MemberPeter R. Fletcher7-Aug-21 9:59 
AnswerRe: Odd Transparency behavior in VB.Net Panel Pin
Gerry Schmitz6-Aug-21 6:52
mveGerry Schmitz6-Aug-21 6:52 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Peter R. Fletcher6-Aug-21 8:14
MemberPeter R. Fletcher6-Aug-21 8:14 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Gerry Schmitz6-Aug-21 8:46
mveGerry Schmitz6-Aug-21 8:46 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Peter R. Fletcher6-Aug-21 10:01
MemberPeter R. Fletcher6-Aug-21 10:01 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Gerry Schmitz7-Aug-21 5:38
mveGerry Schmitz7-Aug-21 5:38 
QuestionPassing PointF as Optional Parameter Pin
SanganakSakha28-Jul-21 21:06
MemberSanganakSakha28-Jul-21 21:06 

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.