Click here to Skip to main content
15,901,373 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionCreate Object From Type [modified] Pin
Polymorpher1-May-07 14:18
Polymorpher1-May-07 14:18 
QuestionUpdating Table of Access Database Pin
keninfo1-May-07 11:56
keninfo1-May-07 11:56 
AnswerRe: Updating Table of Access Database Pin
Christian Graus1-May-07 12:56
protectorChristian Graus1-May-07 12:56 
GeneralRe: Updating Table of Access Database Pin
keninfo1-May-07 23:57
keninfo1-May-07 23:57 
GeneralRe: Updating Table of Access Database Pin
Christian Graus2-May-07 0:55
protectorChristian Graus2-May-07 0:55 
GeneralRe: Updating Table of Access Database Pin
keninfo2-May-07 3:33
keninfo2-May-07 3:33 
QuestionGlobalization in VB .Net usig SQL server2000 Pin
joby1001-May-07 10:42
joby1001-May-07 10:42 
QuestionSet Custom PaperSize In VB.NET [modified] Pin
AmirAlilou1-May-07 8:12
AmirAlilou1-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
detective_girl1-May-07 8:12 
AnswerRe: using tab control to show datagrid Pin
Christian Graus1-May-07 10:31
protectorChristian Graus1-May-07 10:31 
GeneralRe: using tab control to show datagrid Pin
detective_girl1-May-07 19:35
detective_girl1-May-07 19:35 
QuestionRe: using tab control to show datagrid Pin
detective_girl1-May-07 20:15
detective_girl1-May-07 20:15 
GeneralRe: using tab control to show datagrid Pin
Christian Graus1-May-07 23:31
protectorChristian Graus1-May-07 23:31 
QuestionRe: using tab control to show datagrid Pin
detective_girl2-May-07 0:32
detective_girl2-May-07 0:32 
AnswerRe: using tab control to show datagrid Pin
Christian Graus2-May-07 10:24
protectorChristian Graus2-May-07 10:24 
QuestionSkin is burning!!! Ahhhhhhhhhhhhhhhhhhhhhhhhhh! Pin
NANCO1-May-07 6:07
NANCO1-May-07 6:07 
AnswerRe: Skin is burning!!! Ahhhhhhhhhhhhhhhhhhhhhhhhhh! Pin
Guffa1-May-07 11:02
Guffa1-May-07 11:02 
QuestionImage Size Pin
Darren lee1-May-07 3:56
Darren 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
Darren 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
Darren 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
Darren lee1-May-07 14:07 
Questioncombox Pin
thanhphuong17031-May-07 3:54
thanhphuong17031-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.