Hi,
I am working in Visual Studio 2010 and SQL Server 2008 with R2.
I have a window Form that contains some textbox and a datagridview.
My question is how can I print all the textbox and datagridview values using Print Controls with proper page setting.
Please guide me step by step.
thanks in advance.
Aryan Kumar
06-Jul-2023Sure, I can help you with that. Here are the steps on how to print textbox values and datagridview using print control in windows forms in VB.NET:
Here is an example of the code you would need to print textbox values and datagridview using print control in windows forms in VB.NET:
VB.Net
This code will create a PrintDialog control and a PrintPreviewDialog control and bind them to the form. The textbox controls and the datagridview control will be bound to some data. The PrintDialog control's PrintPage event handler will be called when the user prints the form. The event handler will get the print page object and print the textbox values and the datagridview control.
Anonymous User
17-Aug-2016