Click here to Skip to main content
15,915,600 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionhello i have a question about incompatible pointer type [modified] Pin
lxlenovostar6-Dec-10 18:22
lxlenovostar6-Dec-10 18:22 
AnswerRe: hello i have a question about incompatible pointer type Pin
Luc Pattyn6-Dec-10 20:24
sitebuilderLuc Pattyn6-Dec-10 20:24 
AnswerRe: hello i have a question about incompatible pointer type Pin
_Erik_7-Dec-10 1:08
_Erik_7-Dec-10 1:08 
GeneralRe: hello i have a question about incompatible pointer type Pin
lxlenovostar7-Dec-10 4:37
lxlenovostar7-Dec-10 4:37 
QuestionFinding Field Length from DataGridView - SOLVED Pin
chrispowell123456-Dec-10 0:20
chrispowell123456-Dec-10 0:20 
AnswerRe: Finding Field Length from DataGridView Pin
Andy_L_J6-Dec-10 21:08
Andy_L_J6-Dec-10 21:08 
GeneralRe: Finding Field Length from DataGridView Pin
chrispowell123457-Dec-10 1:22
chrispowell123457-Dec-10 1:22 
QuestionProblem solved...see code Pin
pbsjr5-Dec-10 5:09
pbsjr5-Dec-10 5:09 
The file saved by this sub contains only a black rectange of the correct size. I have also tried bmp and jpg with same results.

I am using Vista 64 bit operating system and Visual Studio 2010, Traget CPU: x64, Traget FRamework: .NET Framework 4.

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 Bitmap As New System.Drawing.Bitmap(tWidth, tHeights)

Using gr As Graphics = Graphics.FromImage(Bitmap)


Dim objBrushBackColor As New SolidBrush(Color.White)

'writes to bitmap and hence the file saved

gr.DrawString(txt, the_Font, Brushes.Black, 0, 0)

' writes to screen only

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

modified on Sunday, December 5, 2010 7:03 PM

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 
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 

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.