Click here to Skip to main content
16,006,768 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: What does .net stand for? Pin
Kevin McFarlane22-Aug-05 1:46
Kevin McFarlane22-Aug-05 1:46 
Generala beginer Pin
hamidreza_buddy21-Aug-05 20:17
hamidreza_buddy21-Aug-05 20:17 
GeneralRe: a beginer Pin
toxcct21-Aug-05 20:38
toxcct21-Aug-05 20:38 
GeneralRe: a beginer Pin
Kevin McFarlane22-Aug-05 0:32
Kevin McFarlane22-Aug-05 0:32 
GeneralRe: a beginer Pin
Christian Graus22-Aug-05 11:02
protectorChristian Graus22-Aug-05 11:02 
GeneralListView image problem Pin
Nick Z.19-Aug-05 16:20
Nick Z.19-Aug-05 16:20 
GeneralAxHost - asynchronous loading Pin
mankeyrabbit18-Aug-05 23:14
mankeyrabbit18-Aug-05 23:14 
GeneralPage range in PrintDialog not working Pin
BigSassy18-Aug-05 10:47
BigSassy18-Aug-05 10:47 
Hi. In my code I have a PrintDialog that allows the user to select a page range to print. I've been following the API documentation as well as articles/tutorials online but I still can't get it to work. Multiple copies print fine. Print to File works fine. Just the page range doesn't work.

I've tried manually setting the ToPage and FromPage members in the PrintDocument's PrinterSettings and DefaultPrinterSettings members as well as in the PrintDialog's PrinterSettings member. I've also set the MinimumPages and MaximumPages in each one with no success.

Here's my code (...well the latest version anyway). I really don't know what I'm doing wrong. Any help at solving my problem would be very appreciated.

Public PageCount As Integer
WithEvents Doc As New PrintDocument

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    Dim Diag As New PrintDialog

    Diag.Document = Doc

    Diag.AllowSomePages = True
    Diag.PrinterSettings.MinimumPage = 1
    Diag.PrinterSettings.MaximumPage = 3
    Diag.PrinterSettings.FromPage = 1
    Diag.PrinterSettings.ToPage = 3

    If Diag.ShowDialog() = DialogResult.OK Then
        PageCount = 1
        Doc.Print()
    End If
End Sub

Private Sub PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles Doc.PrintPage
    'Dim f As New Font(FontFamily.GenericSerif, 18, FontStyle.Regular)
    'e.Graphics.DrawString("Page #" & PageCount, f, Brushes.Black, 10, 10)

    PageCount += 1
    If PageCount <= 3 Then
        e.HasMorePages = True
    End If

End Sub

GeneralRe: Page range in PrintDialog not working Pin
Big Sassy20-Aug-05 6:16
Big Sassy20-Aug-05 6:16 
GeneralParsing url,filepath Pin
softty18-Aug-05 9:38
softty18-Aug-05 9:38 
GeneralAssembly.CreateInstance Problem Pin
khaasJ18-Aug-05 0:23
khaasJ18-Aug-05 0:23 
GeneralNumericUpDown DataBinding problem Pin
wout de zeeuw17-Aug-05 22:37
wout de zeeuw17-Aug-05 22:37 
QuestionGet list of machines in LAN? Pin
Jimmy Huynh17-Aug-05 16:48
Jimmy Huynh17-Aug-05 16:48 
AnswerRe: Get list of machines in LAN? Pin
dharbinj18-Aug-05 15:38
dharbinj18-Aug-05 15:38 
QuestionDataSet to IEnumerator? Pin
Carl Mercier17-Aug-05 8:21
Carl Mercier17-Aug-05 8:21 
AnswerRe: DataSet to IEnumerator? Pin
Christian Graus17-Aug-05 14:40
protectorChristian Graus17-Aug-05 14:40 
GeneralRe: DataSet to IEnumerator? Pin
Carl Mercier17-Aug-05 16:11
Carl Mercier17-Aug-05 16:11 
GeneralRe: DataSet to IEnumerator? Pin
Christian Graus17-Aug-05 16:37
protectorChristian Graus17-Aug-05 16:37 
GeneralRe: DataSet to IEnumerator? Pin
Carl Mercier18-Aug-05 1:52
Carl Mercier18-Aug-05 1:52 
GeneralRe: DataSet to IEnumerator? Pin
Christian Graus18-Aug-05 14:54
protectorChristian Graus18-Aug-05 14:54 
GeneralRe: DataSet to IEnumerator? Pin
Carl Mercier18-Aug-05 17:21
Carl Mercier18-Aug-05 17:21 
GeneralReleaseComObject() and Dispose pattern association Pin
DeepakSharma17-Aug-05 2:15
DeepakSharma17-Aug-05 2:15 
Generalsending auto response email messages Pin
woleraymond16-Aug-05 0:27
woleraymond16-Aug-05 0:27 
GeneralRe: sending auto response email messages Pin
S. Senthil Kumar16-Aug-05 0:40
S. Senthil Kumar16-Aug-05 0:40 
GeneralGet to desired unicode subrange! Pin
CoolAmir15-Aug-05 3:26
CoolAmir15-Aug-05 3:26 

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.