473,405 Members | 2,160 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

How can i print the data in VB

hi
I want the codings to take print out by clicking the command button.
So kindly reply me.
Jan 6 '07 #1
9 8411
hariharanmca
1,977 1GB
hi
I want the codings to take print out by clicking the command button.
So kindly reply me.

You want to print in Notepad or printer and VB or VB.net specify
Jan 6 '07 #2
I want to print via printer


You want to print in Notepad or printer and VB or VB.net specify
Jan 6 '07 #3
hariharanmca
1,977 1GB
hi
I want the codings to take print out by clicking the command button.
So kindly reply me.
Code VB6.


'To print in Notepad
Open App.path & "\NotepadFile.Txt" For Output As #1 ' Open file for output.

'To print in Printer
Open "LPT1" For Output As #1 ' Open printer for output.


Print #1, "PrintLine String1"
Print #1, "PrintLine String2"
Print #1, "PrintLine String3"
.
.
.
..
Print #1, "PrintLine String _ n"
Close #1
Jan 6 '07 #4
LPT1 specifies what?
Code VB6.


'To print in Notepad
Open App.path & "\NotepadFile.Txt" For Output As #1 ' Open file for output.

'To print in Printer
Open "LPT1" For Output As #1 ' Open printer for output.


Print #1, "PrintLine String1"
Print #1, "PrintLine String2"
Print #1, "PrintLine String3"
.
.
.
..
Print #1, "PrintLine String _ n"
Close #1
Jan 6 '07 #5
hariharanmca
1,977 1GB
LPT1 specifies what?

Printer Port 1
Jan 6 '07 #6
ok. i want to take the whole form by clicking the command box.

Printer Port 1
Jan 6 '07 #7
hariharanmca
1,977 1GB
ok. i want to take the whole form by clicking the command box.

for what you want to take the whole form by clicking the command box.
explain the problem properly
Jan 6 '07 #8
i want to take the print out as a report in the ListView

for what you want to take the whole form by clicking the command box.
explain the problem properly
Jan 6 '07 #9
hariharanmca
1,977 1GB
i want to take the print out as a report in the ListView
let
lstName will be list items
'To print in Printer
Open "LPT1" For Output As #1 ' Open printer for output.

for i=1 to lstname.listitems.count

Print #1, lstname.listitems(i).text & " " & lstname.listitems(i).subitems(1) & " " & lstname.listitems(i).subitems(2)
Print #1, lstname.listitems(i).subitems(1)
Print #1, lstname.listitems(i).subitems(2)
.
.
..
Print #1, lstname.listitems(i).subitems(n)
next i
Close #1
Jan 6 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Marcel Seiler | last post by:
Hi NG I would like to print my productlist, stored in a access-database. therefore I fill a dataset with the data and with a loop I place the datarecords on the printdocument. On each page I...
0
by: Mary | last post by:
Hello all, I am having an issue; I have a web page that displays information from a database in a datagrid for printing purposes. The datagrid is too large to print in one page, the right...
0
by: RDI | last post by:
I need to watch a certain print spooler and if a print job appears, extract the print data to a PRN file on the hard disk and delete it from the spooler. Can VB.Net do this? If so, can someone...
2
by: Mitul | last post by:
Hello friends, I am getting stuck at a point in my project. I would like to give functionality of print data from site. but there is a problem is that if there are lots of data which takes...
1
hariharanmca
by: hariharanmca | last post by:
any know how to Print data through Store Procedure to the printer Directly
2
by: 183nbt | last post by:
At Access report, data printed vertically like below. 1 2 3 4 5 How can I setup printing these data display and print horizontally at report like below.
1
by: vanand | last post by:
hai, I have wanted to print the data in word document from vb. Now i can able to print the data from database to word without format layout. I need to format the data in word. Kindly send your...
1
by: mehdi1727 | last post by:
How Print Data Grid View in C#.Net??????????
3
by: ghjk | last post by:
I'm using php. In my application there are 2 pages. data.php and print.php. User select some data range to get a report in data.php and i want to open a print.php with the data according to user...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.