Click here to Skip to main content
15,920,956 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: DataGridViewComboBoxColumn doesn't show data until clicked in a datagridview control Pin
javedk096-May-08 19:56
javedk096-May-08 19:56 
QuestionOPEN A NON ACTIVE FORM Pin
robby19776-May-08 4:03
robby19776-May-08 4:03 
AnswerRe: OPEN A NON ACTIVE FORM Pin
Dave Kreskowiak6-May-08 4:54
mveDave Kreskowiak6-May-08 4:54 
GeneralRe: OPEN A NON ACTIVE FORM Pin
robby19777-May-08 11:39
robby19777-May-08 11:39 
Question[Message Deleted] Pin
nishkarsh_k6-May-08 3:30
nishkarsh_k6-May-08 3:30 
AnswerRe: Error while saving image to file "A generic error occurred in GDI+." Pin
Dave Kreskowiak6-May-08 3:48
mveDave Kreskowiak6-May-08 3:48 
GeneralRe: Error while saving image to file "A generic error occurred in GDI+." Pin
nishkarsh_k6-May-08 4:02
nishkarsh_k6-May-08 4:02 
GeneralRe: Error while saving image to file "A generic error occurred in GDI+." Pin
Dave Kreskowiak6-May-08 4:33
mveDave Kreskowiak6-May-08 4:33 
OK, you didn't specify that in your original post.

There's a work around for this too. Basically, create your Image object from the data comming from the database, then create a NEW Image object using the first image as a source. Then you can use this copy anyway you like in your application and retain the ability to save to file.
Dim origBitmap As Bitmap ' This is the original image you created from the database
Dim copyBitmap As New Bitmap(origBitmap.Width, origBitmap.Height)
Dim g As Graphics = Graphics.FromImage(copyBitmap)
g.DrawImage(origBitmap, New Rectangle(0, 0, copyBitmap.Width, copyBitmap.Height), _
    0, 0, origBitmap.Width, origBitmap.Height, GraphicsUnit.Pixel)
origBitmap.Dispose()
g.Dispose()
' The copy of the bitmap is in copyBitmap.  This is the one you use in the rest of your code.



A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008




GeneralRe: Error while saving image to file "A generic error occurred in GDI+." Pin
nishkarsh_k6-May-08 9:36
nishkarsh_k6-May-08 9:36 
GeneralRe: Error while saving image to file "A generic error occurred in GDI+." Pin
Dave Kreskowiak6-May-08 10:03
mveDave Kreskowiak6-May-08 10:03 
GeneralRe: Error while saving image to file "A generic error occurred in GDI+." Pin
nishkarsh_k6-May-08 10:38
nishkarsh_k6-May-08 10:38 
QuestionByRef vs Return Pin
Kevin Brydon6-May-08 3:12
Kevin Brydon6-May-08 3:12 
AnswerRe: ByRef vs Return Pin
Dave Kreskowiak6-May-08 3:45
mveDave Kreskowiak6-May-08 3:45 
GeneralRe: ByRef vs Return Pin
Kevin Brydon6-May-08 4:43
Kevin Brydon6-May-08 4:43 
GeneralRe: ByRef vs Return Pin
Dave Kreskowiak6-May-08 4:55
mveDave Kreskowiak6-May-08 4:55 
GeneralRe: ByRef vs Return Pin
Kevin Brydon6-May-08 5:54
Kevin Brydon6-May-08 5:54 
GeneralRe: ByRef vs Return Pin
Dave Kreskowiak6-May-08 6:17
mveDave Kreskowiak6-May-08 6:17 
AnswerRe: ByRef vs Return Pin
Guffa6-May-08 6:41
Guffa6-May-08 6:41 
GeneralRe: ByRef vs Return Pin
supercat96-May-08 6:50
supercat96-May-08 6:50 
GeneralRe: ByRef vs Return Pin
Guffa6-May-08 9:35
Guffa6-May-08 9:35 
GeneralRe: ByRef vs Return Pin
Kevin Brydon7-May-08 6:26
Kevin Brydon7-May-08 6:26 
Questionsearching in listview Pin
idi6-May-08 2:45
idi6-May-08 2:45 
AnswerRe: searching in listview Pin
Dave Kreskowiak6-May-08 3:38
mveDave Kreskowiak6-May-08 3:38 
GeneralRe: searching in listview Pin
idi7-May-08 1:21
idi7-May-08 1:21 
GeneralRe: searching in listview Pin
Dave Kreskowiak7-May-08 2:01
mveDave Kreskowiak7-May-08 2:01 

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.