Click here to Skip to main content
14,634,219 members
Home » Discussions » Visual Basic
   

Visual Basic

 
QuestionCreate Object From Type [modified] Pin
Polymorpher1-May-07 14:18
MemberPolymorpher1-May-07 14:18 
QuestionUpdating Table of Access Database Pin
keninfo1-May-07 11:56
Memberkeninfo1-May-07 11:56 
AnswerRe: Updating Table of Access Database Pin
Christian Graus1-May-07 12:56
mveChristian Graus1-May-07 12:56 
GeneralRe: Updating Table of Access Database Pin
keninfo1-May-07 23:57
Memberkeninfo1-May-07 23:57 
GeneralRe: Updating Table of Access Database Pin
Christian Graus2-May-07 0:55
mveChristian Graus2-May-07 0:55 
GeneralRe: Updating Table of Access Database Pin
keninfo2-May-07 3:33
Memberkeninfo2-May-07 3:33 
QuestionGlobalization in VB .Net usig SQL server2000 Pin
joby1001-May-07 10:42
Memberjoby1001-May-07 10:42 
QuestionSet Custom PaperSize In VB.NET [modified] Pin
AmirAlilou1-May-07 8:12
MemberAmirAlilou1-May-07 8:12 
HI I write code to change paper size of printr to custom size and then i define my page heght and width .

Public Sub Print_It()<br />
        Try<br />
           Try<br />
                'PrintFont = New Font("Arial", 10)<br />
                Dim pd As PrintDocument = New PrintDocument<br />
                'Assign my overloaded version of the standard print controller<br />
                Dim dt As DataTable = MyDB.GetTableDaftar()<br />
                Dim dv As New DataView(dt)<br />
                dv.RowFilter = "id=" + CType(iddaftar, String)<br />
<br />
                'Install event handlers<br />
                AddHandler pd.BeginPrint, _<br />
                            New PrintEventHandler(AddressOf Me.pd_StartPrint)<br />
                AddHandler pd.PrintPage, _<br />
                            New PrintPageEventHandler(AddressOf Me.pd_PrintPage)<br />
                AddHandler pd.EndPrint, _<br />
                            New PrintEventHandler(AddressOf Me.pd_EndPrint)<br />
                'pd.PrinterSettings.DefaultPageSettings.PaperSize.Width = pd.PrinterSettings.PaperSizes.Item(38).Width<br />
                Dim pkCustomSize1 As New PaperSize("Custom", dv(0)(7), dv(0)(8))<br />
                <br />
                pd.DefaultPageSettings.PaperSize = pkCustomSize1                'Print the document.<br />
                If pd.PrinterSettings.IsValid Then<br />
                    pd.Print()<br />
                End If<br />
            Finally<br />
                'PrintStream.Close()<br />
            End Try<br />
        Catch ex As Exception<br />
            MessageBox.Show(ex.Message)<br />
        End Try


but this code does not change the printer paper size
Please help me
if possible with sample
Thanks


-- modified at 4:39 Wednesday 2nd May, 2007
Questionusing tab control to show datagrid Pin
detective_girl1-May-07 8:12
Memberdetective_girl1-May-07 8:12 
AnswerRe: using tab control to show datagrid Pin
Christian Graus1-May-07 10:31
mveChristian Graus1-May-07 10:31 
GeneralRe: using tab control to show datagrid Pin
detective_girl1-May-07 19:35
Memberdetective_girl1-May-07 19:35 
QuestionRe: using tab control to show datagrid Pin
detective_girl1-May-07 20:15
Memberdetective_girl1-May-07 20:15 
GeneralRe: using tab control to show datagrid Pin
Christian Graus1-May-07 23:31
mveChristian Graus1-May-07 23:31 
QuestionRe: using tab control to show datagrid Pin
detective_girl2-May-07 0:32
Memberdetective_girl2-May-07 0:32 
AnswerRe: using tab control to show datagrid Pin
Christian Graus2-May-07 10:24
mveChristian Graus2-May-07 10:24 
QuestionSkin is burning!!! Ahhhhhhhhhhhhhhhhhhhhhhhhhh! Pin
NANCO1-May-07 6:07
MemberNANCO1-May-07 6:07 
AnswerRe: Skin is burning!!! Ahhhhhhhhhhhhhhhhhhhhhhhhhh! Pin
Guffa1-May-07 11:02
MemberGuffa1-May-07 11:02 
QuestionImage Size Pin
Darren lee1-May-07 3:56
MemberDarren lee1-May-07 3:56 
AnswerRe: Image Size Pin
Dave Kreskowiak1-May-07 4:19
mveDave Kreskowiak1-May-07 4:19 
GeneralRe: Image Size Pin
Darren lee1-May-07 5:02
MemberDarren lee1-May-07 5:02 
GeneralRe: Image Size Pin
Dave Kreskowiak1-May-07 5:16
mveDave Kreskowiak1-May-07 5:16 
GeneralRe: Image Size Pin
Darren lee1-May-07 5:30
MemberDarren lee1-May-07 5:30 
GeneralRe: Image Size Pin
Dave Kreskowiak1-May-07 6:10
mveDave Kreskowiak1-May-07 6:10 
GeneralRe: Image Size Pin
Darren lee1-May-07 14:07
MemberDarren lee1-May-07 14:07 
Questioncombox Pin
thanhphuong17031-May-07 3:54
Memberthanhphuong17031-May-07 3:54 

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.