VB.NET Print from listview

Поділитися
Вставка
  • Опубліковано 14 січ 2025

КОМЕНТАРІ • 17

  • @viniciussilveira906
    @viniciussilveira906 7 років тому

    I have no words to describe how you helped me. Thanks a lot!

  • @jakelextercatembung7302
    @jakelextercatembung7302 5 років тому

    thank you thank you so much

  • @xioyusankrer801
    @xioyusankrer801 3 роки тому

    thanks a lot bro

  • @shionemichaelsorne5466
    @shionemichaelsorne5466 5 років тому

    what if i want to print all items in listbox. please help me. it only print 2 columns. how to add another column. Thanks in advance

  • @aegielofalla2621
    @aegielofalla2621 5 років тому +1

    What if i want only to print selected item in list view?

    • @igestudio8795
      @igestudio8795  5 років тому

      ' this code for checkboxes = true if your checkboxes in listview = true
      For Each Itm As ListViewItem In ListView1.Items
      If Itm.Checked = True Then
      e.Graphics.DrawString(Itm.Text, New Drawing.Font("Time New Roman", 10), Brushes.Black, 50, H)
      e.Graphics.DrawString(Itm.SubItems(1).Text, New Drawing.Font("Time New Roman", 10), Brushes.Black, 200, H)
      e.Graphics.DrawString(Itm.SubItems(2).Text, New Drawing.Font("Time New Roman", 10), Brushes.Black, 350, H)
      H += 20
      End If
      Next
      ' this code for selected listview item
      For Each Itm As ListViewItem In ListView1.Items
      If Itm.Selected = True Then
      e.Graphics.DrawString(Itm.Text, New Drawing.Font("Time New Roman", 10), Brushes.Black, 50, H)
      e.Graphics.DrawString(Itm.SubItems(1).Text, New Drawing.Font("Time New Roman", 10), Brushes.Black, 200, H)
      e.Graphics.DrawString(Itm.SubItems(2).Text, New Drawing.Font("Time New Roman", 10), Brushes.Black, 350, H)
      H += 20
      End If
      Next
      sorry late response
      thank for visiting my channel

  • @dota2yolo778
    @dota2yolo778 5 років тому

    thanks a lot :)

  • @leidelagracia6304
    @leidelagracia6304 6 років тому

    it prints because you set items that you want to print but how can i print user inputs using listview without setting the items you want to print?

    • @igestudio8795
      @igestudio8795  6 років тому

      that tutorial is just to print item in Listview ..you can replace the existing item in listview ..you can develop that code again ..

  • @513anthini
    @513anthini 7 років тому

    It prints but doesn't show the print preview like yours does.

    • @igestudio8795
      @igestudio8795  7 років тому

      Maybe u forget printdialog to show print preview ..
      Try again and don't giveup ^^

  • @antonioranielcayaco9234
    @antonioranielcayaco9234 7 років тому

    It prints but it doesn't show the print preview.. please help

    • @igestudio8795
      @igestudio8795  7 років тому

      Checked preview before printing in your printer setting ..

  • @zhenozero4972
    @zhenozero4972 7 років тому

    tmbh lagi tutornya masbro

    • @igestudio8795
      @igestudio8795  7 років тому

      +zHeno Zero ok masbro ..ditunggu aja ..

  • @ohbree3221
    @ohbree3221 7 років тому

    It prints as a .pdf file. I don't have a printer. Please, help me to show the print preview first. Thank you very much!

    • @igestudio8795
      @igestudio8795  7 років тому

      You can add new code ..
      Dim P_Preview as new PrintPreviewDialog
      P_Preview.Document = PrintDocument1
      P_Preview.ShowDialog
      Fighting to modif your code ..