none
ouvrir et print RRS feed

  • Question


  • private mytext as string
    private myfont as new font ("ARIAL,"20)

    ------------------------------------------

    Private sub button_click (byval sender as system.object,byval e as system.Event Args) handles button.click
     
    Dim fp as string
    OpenFileDialog.filter="testfiles(*.txt)/*.txt"

    OpenFileDialog1.showdialog()
    fp=OpenFileDialog1.fileName
    textBox1.text=system.io.file.readalltext(FP)Mytext=textbox1.text

    en sub
    ----------------------------------------------
        Print 

    private sub button2_click(Byval sender AS system.object,Byval e AS system.Event Args)handles Button2.click

    PrintDialog1.Dument=Print Document1
    if PrintDialog1.showDialog()=windows.forms.DialogResult.ok then
    PrintDocument1.Print()

    end if
    end ub
    -------------------------------------------------------

    Private sub   PrintDocument1_PrintPage(Byval sender AS system.object,Byval e AS system.Drawing.Printing.PrintPage Event Args)handles button.click

    Dim strform AS New stringform()
    strformat.trimming=string trimming.word e.graphics.Drawstring(mytext,myfont,brushes.0,0,strformat)

    End sub
    jeudi 2 juin 2016 12:09

Réponses