473,378 Members | 1,110 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,378 software developers and data experts.

Problem using the PrintDialog Control

Hi !

I am trying to print some results to a printer.
I used the printDocument and printDialog1controls. I can open the print dialog buta my problem is that i can insert my results to be printed.
Dim dlgresult As DialogResult = Me.PrintDialog1.ShowDialog()
If dlgresult = Windows.Forms.DialogResult.OK Then
Me.PrintDialog1.Document1.Print()
End if

The bold phrase is not working. My question is how to insert the results into the document1 in order to be printed. My results is an arrays of strings which contains passes and fails. The results are printed in a flex grid.

Can anyone help

thanks
Apr 2 '07 #1
3 1361
vijaydiwakar
579 512MB
Hi !

I am trying to print some results to a printer.
I used the printDocument and printDialog1controls. I can open the print dialog buta my problem is that i can insert my results to be printed.
Dim dlgresult As DialogResult = Me.PrintDialog1.ShowDialog()
If dlgresult = Windows.Forms.DialogResult.OK Then
Me.PrintDialog1.Document1.Print()
End if

The bold phrase is not working. My question is how to insert the results into the document1 in order to be printed. My results is an arrays of strings which contains passes and fails. The results are printed in a flex grid.

Can anyone help

thanks
what's d error so far
Apr 2 '07 #2
Killer42
8,435 Expert 8TB
what's d error so far
And what version of VB are you using?
Apr 2 '07 #3
And what version of VB are you using?
problem solved.case close.thanks
Apr 3 '07 #4

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

Similar topics

2
by: Mark Waser | last post by:
Summary: dlgPrint.PrinterSettings.Copies always returns 1 regardless of what the user entered Details: When trying to print a document, I am first presenting the user with the standard...
2
by: David | last post by:
Does anybody know how to check the AllowSelection radio button in the PrintDialog Dialog? I want to set this to checked if the user has selected a subset of text.
1
by: mphanke | last post by:
Hi, I wrote a userControl w/ a toolbar. One button is supposed to open the PrintDialog. When I use the control in a different project and click that button - the form simply closes and the...
4
by: Steph. | last post by:
Hi, Is there a BUG in the printdialog ? When I create a PrintDialog ans set the "DefaultPageSettings.Landscape" property to "false" and then display the dialog, select "Landscape" and click OK,...
0
by: Babz | last post by:
Hi, I want to get the print data from the PrintDialog box and pass it to the crystal reports. But using the following code I am not able to get data. Private dgPrintDialog As New PrintDialog()...
0
by: Babz | last post by:
Hi, I want to get the print data from the PrintDialog box and pass it to the crystal reports. But using the following code I am not able to get data. Private dgPrintDialog As New PrintDialog()...
0
by: Pete | last post by:
Print Problem Hey all, I’m new to Visual Basic dot net. I’m trying to understand printing a little better. Here’s the problem. If I create a PrintDocument and use a PrintDialog, then My...
10
by: choupi | last post by:
Hello, Is there a way to call a printDialog from a printPreviewDialog (from print icon for example)? Indeed, the print icon in the printpreviewdialog prints directly the document without...
3
Spitaki
by: Spitaki | last post by:
Hi, When I call the sub Print the PrintDialog opens twice. What do I have to change so this won't happen again? When I call the sub PrintPreview it works just fine. Has anyone an idea what I do...
0
by: thiago777 | last post by:
Hello all, I need to show the PrintDialog screen so that client can choose/select a specif printer to use after viewing the print preview. In other words, after the printPreview is completely...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.