Click here to Skip to main content
15,926,596 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionoperation system users Pin
amaneet8-Apr-07 19:57
amaneet8-Apr-07 19:57 
Questiondates in vb.net... Pin
Member 38798818-Apr-07 19:26
Member 38798818-Apr-07 19:26 
AnswerRe: dates in vb.net... Pin
<b<font color="#6EA3C4">MILAN@Cybage9-Apr-07 3:57
<b<font color="#6EA3C4">MILAN@Cybage9-Apr-07 3:57 
GeneralRe: dates in vb.net... Pin
Member 38798819-Apr-07 4:56
Member 38798819-Apr-07 4:56 
GeneralRe: dates in vb.net... Pin
<b<font color="#6EA3C4">MILAN@Cybage9-Apr-07 18:50
<b<font color="#6EA3C4">MILAN@Cybage9-Apr-07 18:50 
GeneralRe: dates in vb.net... Pin
Member 387988110-Apr-07 0:03
Member 387988110-Apr-07 0:03 
QuestionSocket Programming Pin
Venkatesh Mookkan8-Apr-07 18:53
Venkatesh Mookkan8-Apr-07 18:53 
QuestionChanging the papersize for a Print Document Pin
Andrew Thorpe8-Apr-07 18:44
Andrew Thorpe8-Apr-07 18:44 
Hi All,

I have a bit of a newbie question I cant seem to figure out. I am using VB 2005 Express.

I want to change the size of paper to A5 during, but the kind property is read only

If there is a log then print A4 if not print A5.

I use VBMySQLiect to get data from a MySQL database.

My Code:

<br />
Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click<br />
    SQL = "select * from clients where id = '" & lvwList.SelectedItems.Item(0).Text & "'"<br />
    For i = 2 To lvwList.SelectedItems.Count<br />
       SQL = SQL & " or id = '" & lvwList.SelectedItems.Item(i - 1).Text & "'"<br />
    Next<br />
    rs = gCnn.Execute(SQL)<br />
    With prnPreview<br />
       .Document = prnDocument<br />
       If bLog Then<br />
          .Document.DefaultPageSettings.PaperSize.Kind = Printing.PaperKind.A5<br />
       Else<br />
          .Document.DefaultPageSettings.PaperSize.Kind = Printing.PaperKind.A4<br />
       End If<br />
       .ShowDialog()<br />
    End With<br />
End Sub<br />


What do I need to do?

Thank you
Andrew
Questionunmovable running form in vs2005 Pin
kripa218-Apr-07 17:44
kripa218-Apr-07 17:44 
AnswerRe: unmovable running form in vs2005 Pin
<b<font color="#6EA3C4">MILAN@Cybage9-Apr-07 2:28
<b<font color="#6EA3C4">MILAN@Cybage9-Apr-07 2:28 
GeneralRe: unmovable running form in vs2005 Pin
kripa219-Apr-07 5:08
kripa219-Apr-07 5:08 
GeneralRe: unmovable running form in vs2005 Pin
Dave Kreskowiak9-Apr-07 5:11
mveDave Kreskowiak9-Apr-07 5:11 
GeneralRe: unmovable running form in vs2005 Pin
kripa219-Apr-07 5:20
kripa219-Apr-07 5:20 
GeneralRe: unmovable running form in vs2005 Pin
<b<font color="#6EA3C4">MILAN@Cybage9-Apr-07 18:14
<b<font color="#6EA3C4">MILAN@Cybage9-Apr-07 18:14 
GeneralRe: unmovable running form in vs2005 Pin
kripa219-Apr-07 18:48
kripa219-Apr-07 18:48 
GeneralRe: unmovable running form in vs2005 Pin
<b<font color="#6EA3C4">MILAN@Cybage9-Apr-07 18:51
<b<font color="#6EA3C4">MILAN@Cybage9-Apr-07 18:51 
QuestionConvert coding VB 5.0 to VB.Net 2003 Pin
Kusal8-Apr-07 17:13
Kusal8-Apr-07 17:13 
AnswerRe: Convert coding VB 5.0 to VB.Net 2003 Pin
Kevin McFarlane9-Apr-07 4:58
Kevin McFarlane9-Apr-07 4:58 
GeneralRe: Convert coding VB 5.0 to VB.Net 2003 Pin
Kusal9-Apr-07 16:46
Kusal9-Apr-07 16:46 
GeneralRe: Convert coding VB 5.0 to VB.Net 2003 Pin
Kusal10-Apr-07 17:14
Kusal10-Apr-07 17:14 
Question.net applications in a non .net framework Pin
benbminnich@yahoo.com8-Apr-07 9:56
benbminnich@yahoo.com8-Apr-07 9:56 
AnswerRe: .net applications in a non .net framework Pin
Kevin McFarlane8-Apr-07 10:36
Kevin McFarlane8-Apr-07 10:36 
GeneralRe: .net applications in a non .net framework Pin
benbminnich@yahoo.com8-Apr-07 14:04
benbminnich@yahoo.com8-Apr-07 14:04 
AnswerRe: .net applications in a non .net framework Pin
Paul Conrad8-Apr-07 14:32
professionalPaul Conrad8-Apr-07 14:32 
QuestionGet Domain User ID list in Dropdownlist vb.net Pin
rasheed.rahman8-Apr-07 3:45
rasheed.rahman8-Apr-07 3:45 

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.