Click here to Skip to main content
15,887,683 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: tif img print preview Pin
Eddy Vluggen29-Sep-14 5:35
professionalEddy Vluggen29-Sep-14 5:35 
GeneralRe: tif img print preview Pin
James.Cook201-Oct-14 3:54
James.Cook201-Oct-14 3:54 
QuestionCreate Image from Panel Control Pin
gwittlock27-Sep-14 9:02
gwittlock27-Sep-14 9:02 
AnswerRe: Create Image from Panel Control Pin
Eddy Vluggen27-Sep-14 13:40
professionalEddy Vluggen27-Sep-14 13:40 
GeneralRe: Create Image from Panel Control Pin
gwittlock27-Sep-14 15:23
gwittlock27-Sep-14 15:23 
GeneralRe: Create Image from Panel Control Pin
gwittlock27-Sep-14 21:27
gwittlock27-Sep-14 21:27 
GeneralRe: Create Image from Panel Control Pin
Eddy Vluggen28-Sep-14 1:53
professionalEddy Vluggen28-Sep-14 1:53 
GeneralRe: Create Image from Panel Control Pin
gwittlock28-Sep-14 4:05
gwittlock28-Sep-14 4:05 
I changed my code to this:
But it had no effect. I still get the image with a black background.

I am not sure how to include images with the reply otherwise I would show you before and after images

VB
Dim bounds As Rectangle = ctrl.Bounds
        Dim pt As Point = ctrl.PointToScreen(bounds.Location)
        Dim myBitmap As New Bitmap(bounds.Width, bounds.Height)

        myBitmap.MakeTransparent(ctrl.BackColor)

        Using m_g As Graphics = Graphics.FromImage(myBitmap)
            m_g.CopyFromScreen(New Point(pt.X - ctrl.Location.X, pt.Y - ctrl.Location.Y), Point.Empty, bounds.Size)
            m_g.Dispose()
        End Using

        myBitmap.Save(fileName, ImageFormat.Png)
        myBitmap.Dispose()

GeneralRe: Create Image from Panel Control Pin
drago1128-Sep-14 21:13
drago1128-Sep-14 21:13 
GeneralRe: Create Image from Panel Control Pin
gwittlock29-Sep-14 3:21
gwittlock29-Sep-14 3:21 
GeneralRe: Create Image from Panel Control Pin
Eddy Vluggen29-Sep-14 5:33
professionalEddy Vluggen29-Sep-14 5:33 
GeneralRe: Create Image from Panel Control Pin
Eddy Vluggen28-Sep-14 22:12
professionalEddy Vluggen28-Sep-14 22:12 
GeneralRe: Create Image from Panel Control Pin
gwittlock29-Sep-14 3:19
gwittlock29-Sep-14 3:19 
GeneralRe: Create Image from Panel Control Pin
Eddy Vluggen29-Sep-14 5:32
professionalEddy Vluggen29-Sep-14 5:32 
GeneralRe: Create Image from Panel Control Pin
gwittlock29-Sep-14 6:15
gwittlock29-Sep-14 6:15 
GeneralRe: Create Image from Panel Control Pin
gwittlock30-Sep-14 20:17
gwittlock30-Sep-14 20:17 
GeneralRe: Create Image from Panel Control Pin
Eddy Vluggen5-Oct-14 2:13
professionalEddy Vluggen5-Oct-14 2:13 
GeneralRe: Create Image from Panel Control Pin
gwittlock5-Oct-14 3:16
gwittlock5-Oct-14 3:16 
Questionvb Pin
Nishat Anwar27-Sep-14 6:41
Nishat Anwar27-Sep-14 6:41 
AnswerRe: vb Pin
Dave Kreskowiak27-Sep-14 6:47
mveDave Kreskowiak27-Sep-14 6:47 
QuestionRecommendations on VB.Net to C# code conversion tool Pin
Vipul Mehta26-Sep-14 10:28
Vipul Mehta26-Sep-14 10:28 
AnswerRe: Recommendations on VB.Net to C# code conversion tool Pin
Tim Carmichael26-Sep-14 11:24
Tim Carmichael26-Sep-14 11:24 
GeneralRe: Recommendations on VB.Net to C# code conversion tool Pin
Vipul Mehta27-Sep-14 3:21
Vipul Mehta27-Sep-14 3:21 
QuestionFormatting Excel from Access: How do I apply conditional formatting with a loop? Pin
Member 1111259726-Sep-14 7:29
Member 1111259726-Sep-14 7:29 
AnswerRe: Formatting Excel from Access: How do I apply conditional formatting with a loop? Pin
Chris Quinn28-Sep-14 21:15
Chris Quinn28-Sep-14 21:15 

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.