Click here to Skip to main content
15,903,523 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: System.Drawing.Bitmap.save does not save image Pin
Dave Kreskowiak5-Dec-10 7:44
mveDave Kreskowiak5-Dec-10 7:44 
GeneralRe: System.Drawing.Bitmap.save does not save image Pin
pbsjr5-Dec-10 9:43
pbsjr5-Dec-10 9:43 
GeneralRe: System.Drawing.Bitmap.save does not save image Pin
DaveAuld5-Dec-10 9:48
professionalDaveAuld5-Dec-10 9:48 
GeneralRe: System.Drawing.Bitmap.save does not save image Pin
pbsjr5-Dec-10 9:51
pbsjr5-Dec-10 9:51 
AnswerRe: System.Drawing.Bitmap.save does not save image Pin
Luc Pattyn5-Dec-10 7:56
sitebuilderLuc Pattyn5-Dec-10 7:56 
GeneralRe: System.Drawing.Bitmap.save does not save image Pin
pbsjr5-Dec-10 9:44
pbsjr5-Dec-10 9:44 
AnswerRe: System.Drawing.Bitmap.save does not save image Pin
Luc Pattyn5-Dec-10 10:08
sitebuilderLuc Pattyn5-Dec-10 10:08 
GeneralRe: System.Drawing.Bitmap.save does not save image Pin
pbsjr5-Dec-10 10:59
pbsjr5-Dec-10 10:59 
Thank you for your assistance. I made the change you suggested and got a white rectangle but no text. Any suggestions?

Private Sub MAIN_paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint

Dim tHeights, tWidth As Integer
'Define the text and layout
Dim txt As String = "Verdicrete Countertops"

Dim the_Font As New Drawing.Font("Helvetica", 28.5, FontStyle.Regular, GraphicsUnit.Pixel)


Dim string_size As SizeF = e.Graphics.MeasureString(txt, the_Font)

tHeights = CInt(string_size.Height)
tWidth = CInt(string_size.Width)

Dim rect As New System.Drawing.Rectangle
rect.Width = tWidth
rect.Height = tHeights


Dim Bitmap As New System.Drawing.Bitmap(tWidth, tHeights)

Using gr As Graphics = Graphics.FromImage(Bitmap)


Dim objBrushBackColor As New SolidBrush(Color.White)
gr.FillRectangle(Brushes.White, rect)

e.Graphics.DrawString(txt, the_Font, Brushes.Black, 0, 0)

Bitmap.Save("c:\windows\temp\Verdicrete.gif", System.Drawing.Imaging.ImageFormat.Gif)
End Using


Bitmap.Dispose()



End Sub
GeneralRe: System.Drawing.Bitmap.save does not save image Pin
Luc Pattyn5-Dec-10 11:08
sitebuilderLuc Pattyn5-Dec-10 11:08 
Question"Cannot open any more tables" happens when I optimize my code [modified] Pin
i_kant_spel4-Dec-10 19:04
i_kant_spel4-Dec-10 19:04 
AnswerRe: "Cannot open any more tables" happens when I optimize my code [modified] Pin
Luc Pattyn4-Dec-10 23:27
sitebuilderLuc Pattyn4-Dec-10 23:27 
GeneralRe: "Cannot open any more tables" happens when I optimize my code Pin
i_kant_spel5-Dec-10 7:58
i_kant_spel5-Dec-10 7:58 
AnswerRe: "Cannot open any more tables" happens when I optimize my code Pin
Luc Pattyn5-Dec-10 8:16
sitebuilderLuc Pattyn5-Dec-10 8:16 
GeneralRe: "Cannot open any more tables" happens when I optimize my code Pin
i_kant_spel5-Dec-10 9:06
i_kant_spel5-Dec-10 9:06 
AnswerRe: "Cannot open any more tables" happens when I optimize my code Pin
Luc Pattyn5-Dec-10 9:52
sitebuilderLuc Pattyn5-Dec-10 9:52 
GeneralRe: "Cannot open any more tables" happens when I optimize my code Pin
i_kant_spel5-Dec-10 10:59
i_kant_spel5-Dec-10 10:59 
GeneralRe: "Cannot open any more tables" happens when I optimize my code Pin
Luc Pattyn5-Dec-10 11:04
sitebuilderLuc Pattyn5-Dec-10 11:04 
QuestionHow to use Insert Command for Varchar(Max) Pin
Paramu19734-Dec-10 3:34
Paramu19734-Dec-10 3:34 
AnswerRe: How to use Insert Command for Varchar(Max) Pin
Luc Pattyn4-Dec-10 3:45
sitebuilderLuc Pattyn4-Dec-10 3:45 
QuestionVB6 ActiveX program get invoked from Source folder not program files. Pin
QuickBooksDev4-Dec-10 3:29
QuickBooksDev4-Dec-10 3:29 
QuestionType conversion? Pin
waner michaud1-Dec-10 8:10
waner michaud1-Dec-10 8:10 
AnswerRe: Type conversion? Pin
Dave Kreskowiak1-Dec-10 8:54
mveDave Kreskowiak1-Dec-10 8:54 
GeneralRe: Type conversion? Pin
waner michaud1-Dec-10 9:36
waner michaud1-Dec-10 9:36 
GeneralRe: Type conversion? Pin
Dave Kreskowiak1-Dec-10 14:08
mveDave Kreskowiak1-Dec-10 14:08 
GeneralRe: Type conversion? Pin
phil.o2-Dec-10 22:46
professionalphil.o2-Dec-10 22:46 

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.