Click here to Skip to main content
15,911,891 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: what is the differance between empty and null Pin
Guffa3-Jun-06 4:25
Guffa3-Jun-06 4:25 
QuestionOffice2003 - Set Plot Area's fill image Pin
john john mackey2-Jun-06 12:02
john john mackey2-Jun-06 12:02 
AnswerRe: Office2003 - Set Plot Area's fill image Pin
quacks_a_lot3-Jun-06 7:40
quacks_a_lot3-Jun-06 7:40 
GeneralRe: Office2003 - Set Plot Area's fill image Pin
john john mackey3-Jun-06 13:04
john john mackey3-Jun-06 13:04 
GeneralRe: Office2003 - Set Plot Area's fill image Pin
john john mackey3-Jun-06 14:05
john john mackey3-Jun-06 14:05 
QuestionVB.NET Windows CE Screen Capture Pin
matt_newboy2-Jun-06 5:41
matt_newboy2-Jun-06 5:41 
QuestionHow to create an Email program in VB that can read a log file Pin
Tram882-Jun-06 4:42
Tram882-Jun-06 4:42 
Questionprint graphic [modified] Pin
codeadair2-Jun-06 3:15
codeadair2-Jun-06 3:15 
I write a program to print an undee chart.The main code as follows:

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
AddHandler PrintDocument1.PrintPage, AddressOf drawpictoprinter
PrintDocument1.Print()
End Sub
Private Sub drawpictoprinter(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs)
Dim pg As Graphics
pg = e.Graphics
pg.TranslateTransform(xtran, ytran) 'xtran,ytran >0
pg.ScaleTransform(xscaletran, yscaletran)


Dim j As Integer
Try
For j = 0 To rwrecord - 1 'rwrecord is the unbound of
'array redraw or ydraw
pg.DrawLine(redrawpen, xredraw(j), -yredraw(j), xredraw(j + 1), -yredraw(j + 1))
Next
Catch ex As Exception
Throw ex
Finally
pg = Nothing
GC.Collect()
End Try
End Sub


when i press button5 the first time.what do you think the output chart of printer?And the second time?The third time?....
When i do it the first time.Output chart is an undee chart that i want to be.But the second time when i do it.Two undee chart appear.and One is upper,the other is under it.The horizontal distance is xtran,The vertical distance is ytran.

I do think the focus is pg.TranslateTransform(xtran, ytran) and
pg.ScaleTransform(xscaletran, yscaletran)

I run the program step by step.what i found are:

1>when i press button5 the first time.drawpictoprinter method execute one
time
2>When i do it the second time.drawpictoprinter method execute two times
3> And so on

WHY?

Any care will be appreciated much

Best regards


ICQ:258-235-734
MSN:msnadair@hotmail.com

-- modified at 9:19 Friday 2nd June, 2006
AnswerRe: print graphic [modified] Pin
Robert Rohde4-Jun-06 12:09
Robert Rohde4-Jun-06 12:09 
QuestionRetrieve value in HTML tags Pin
J Liang2-Jun-06 3:14
J Liang2-Jun-06 3:14 
AnswerRe: Retrieve value in HTML tags Pin
Ed.Poore2-Jun-06 14:11
Ed.Poore2-Jun-06 14:11 
GeneralRe: Retrieve value in HTML tags Pin
J Liang2-Jun-06 16:44
J Liang2-Jun-06 16:44 
GeneralRe: Retrieve value in HTML tags [modified] Pin
Ed.Poore3-Jun-06 0:13
Ed.Poore3-Jun-06 0:13 
GeneralRe: Retrieve value in HTML tags [modified] Pin
J Liang3-Jun-06 3:09
J Liang3-Jun-06 3:09 
QuestionHelpcursor on a ToolStripMenuItem Pin
Sugan V2-Jun-06 2:02
Sugan V2-Jun-06 2:02 
AnswerRe: Helpcursor on a ToolStripMenuItem Pin
Robert Rohde4-Jun-06 12:11
Robert Rohde4-Jun-06 12:11 
QuestionRe: Helpcursor on a ToolStripMenuItem Pin
Sugan V4-Jun-06 19:00
Sugan V4-Jun-06 19:00 
AnswerRe: Helpcursor on a ToolStripMenuItem Pin
Robert Rohde4-Jun-06 22:21
Robert Rohde4-Jun-06 22:21 
QuestionRe: Helpcursor on a ToolStripMenuItem Pin
Sugan V4-Jun-06 22:34
Sugan V4-Jun-06 22:34 
QuestionRe: Helpcursor on a ToolStripMenuItem Pin
Sugan V7-Jun-06 1:29
Sugan V7-Jun-06 1:29 
Questionvolume shadow copy service Pin
borat2-Jun-06 1:18
borat2-Jun-06 1:18 
QuestionWhat is this Code snippet meaning? Pin
Krishnaraj Barvathaya B2-Jun-06 1:12
Krishnaraj Barvathaya B2-Jun-06 1:12 
AnswerRe: What is this Code snippet meaning? Pin
Krishnaraj Barvathaya B2-Jun-06 1:12
Krishnaraj Barvathaya B2-Jun-06 1:12 
GeneralRe: What is this Code snippet meaning? Pin
J4amieC2-Jun-06 1:45
J4amieC2-Jun-06 1:45 
GeneralRe: What is this Code snippet meaning? Pin
FrankyT2-Jun-06 16:28
FrankyT2-Jun-06 16:28 

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.