Click here to Skip to main content
15,867,330 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Upgrade VB6 to VB.Net Pin
Vimalsoft(Pty) Ltd5-Feb-08 6:15
professionalVimalsoft(Pty) Ltd5-Feb-08 6:15 
GeneralRe: Upgrade VB6 to VB.Net Pin
Christian Graus5-Feb-08 8:51
protectorChristian Graus5-Feb-08 8:51 
QuestionExploiting Children Form events ... How? Pin
eusta5-Feb-08 0:09
eusta5-Feb-08 0:09 
GeneralRe: Exploiting Children Form events ... How? Pin
Christian Graus5-Feb-08 8:52
protectorChristian Graus5-Feb-08 8:52 
QuestionVPN using OpenSSL. Pin
Warp4-Feb-08 21:51
Warp4-Feb-08 21:51 
GeneralRe: VPN using OpenSSL. Pin
Dave Kreskowiak5-Feb-08 10:16
mveDave Kreskowiak5-Feb-08 10:16 
GeneralPrint several pages Pin
Marc Soleda4-Feb-08 20:31
Marc Soleda4-Feb-08 20:31 
GeneralRe: Print several pages Pin
Ajay.k_Singh4-Feb-08 22:01
Ajay.k_Singh4-Feb-08 22:01 
For starting a new page, you will need to set e.HasMorePages property to True and exit the PrintPage event. If this property is set to true while exiting sub, this event will be called again and its content will be printed on the next page.

Therefore it should be something like –

e.HasMorePages = True

Exit Sub

Please remember that you will need to track manually when this event is being called for the second time and what you need to print on the second page. This can be done using a global variable. Such as –

----------------------Code Start---------------

Dim PageCount As Integer = 1

Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage


If PageCount = 1 Then

''''Code to print on first page

e.HasMorePages = True
PageCount += 1

Exit Sub

ElseIf PageCount = 2 Then

''''Code to print on Second Page

e.HasMorePages = True
PageCount += 1

Exit Sub


End If

End Sub
------------------Code End-------------------

In the similar way you may create any number of new pages.

I hope this helps Smile | :) .

-Dave.

Dave Traister,
ComponentOne LLC.
www.componentone.com

GeneralRe: Print several pages Pin
Marc Soleda5-Feb-08 20:37
Marc Soleda5-Feb-08 20:37 
Questionvb 6.0 crystal report 4.6 with crystalreport excepted below result Pin
perumalLashmi4-Feb-08 17:24
perumalLashmi4-Feb-08 17:24 
GeneralRe: vb 6.0 crystal report 4.6 with crystalreport excepted below result Pin
Steven J Jowett5-Feb-08 5:03
Steven J Jowett5-Feb-08 5:03 
GeneralDataset filter to show all records Pin
coldude4-Feb-08 15:12
coldude4-Feb-08 15:12 
GeneralRe: Dataset filter to show all records Pin
Mycroft Holmes4-Feb-08 20:04
professionalMycroft Holmes4-Feb-08 20:04 
GeneralRe: Dataset filter to show all records Pin
coldude5-Feb-08 15:14
coldude5-Feb-08 15:14 
GeneralRe: Dataset filter to show all records Pin
Mycroft Holmes5-Feb-08 15:30
professionalMycroft Holmes5-Feb-08 15:30 
GeneralRe: Dataset filter to show all records Pin
coldude12-Feb-08 14:56
coldude12-Feb-08 14:56 
GeneralRe: Dataset filter to show all records Pin
Mycroft Holmes12-Feb-08 15:59
professionalMycroft Holmes12-Feb-08 15:59 
Generalstay in same page with error msg else redirect to another page Pin
uglyeyes4-Feb-08 15:10
uglyeyes4-Feb-08 15:10 
GeneralRe: stay in same page with error msg else redirect to another page Pin
Christian Graus4-Feb-08 17:14
protectorChristian Graus4-Feb-08 17:14 
GeneralIO stream error Pin
codingrocks4-Feb-08 14:21
codingrocks4-Feb-08 14:21 
GeneralRe: IO stream error Pin
Christian Graus4-Feb-08 17:18
protectorChristian Graus4-Feb-08 17:18 
GeneralInterfacing vb.net and pseudo-embedded C Pin
supercat94-Feb-08 10:01
supercat94-Feb-08 10:01 
GeneralRe: Interfacing vb.net and pseudo-embedded C Pin
MikeMarq4-Feb-08 18:51
MikeMarq4-Feb-08 18:51 
GeneralRe: Interfacing vb.net and pseudo-embedded C [modified] Pin
supercat95-Feb-08 8:10
supercat95-Feb-08 8:10 
Generalauto update update panel Pin
solarthur014-Feb-08 3:47
solarthur014-Feb-08 3:47 

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.