I've found on the internet how to make my program to print my datagridview control during runtime...so i've download file of that print code and i need to include it in my project...how can i do it???
8 replies to this topic
#1
Posted 04 March 2011 - 02:03 PM
|
|
|
#2
Posted 04 March 2011 - 02:41 PM
Need to know a little more. Is the .cs file you downloaded a complete class which performs the above task? Or is it just a snippet of code that shows the technique?
If it's the former, just click on Add Existing Item from the Project menu and select the source file you downloaded. If it's the latter, just copy and paste into one of your source files and edit the variable names to match.
If it's the former, just click on Add Existing Item from the Project menu and select the source file you downloaded. If it's the latter, just copy and paste into one of your source files and edit the variable names to match.
#3
Posted 04 March 2011 - 02:46 PM
it's from this page Another DataGridView Printer - CodeProject
#4
Posted 04 March 2011 - 02:58 PM
Yeah, all you have to do is save the .cs file somewhere in your project directory and use the Add Existing Item option I told you about. Be sure to note the namespace in the downloaded source file so you can reference it from your program.
#5
Posted 04 March 2011 - 03:03 PM
i read about including that file in pdf from that page...i know from source what i have to do...tnx a lot
#6
Posted 06 March 2011 - 07:52 AM
dgvprint.PageSettings.Landscape = True
this is for enabling landscape mode
how can i disable normal view of paper...opposite of landscape
this is for enabling landscape mode
how can i disable normal view of paper...opposite of landscape
#7
Posted 06 March 2011 - 09:26 AM
You mean portrait? I'm not sure how to do it with that specific class library, because I've never used it before. You'll have to consult the API documentation for their code to see if they've provided a method call or something to do that. If they haven't, you'll have to go in and modify the actual code of the class.
#8
Posted 06 March 2011 - 09:30 AM
what's meaning of that error
Error 1 The "GenerateResource" task failed unexpectedly. System.Runtime.InteropServices.COMException (0x80070050): The file exists. (Exception from HRESULT: 0x80070050) at Microsoft.Build.Shared.NativeMethodsShared.InprocTracking.WriteContextTLogs(String intermediateDirectory, String tlogRootName) at Microsoft.Build.Utilities.FileTracker.WriteContextTLogs(String intermediateDirectory, String taskName) at Microsoft.Build.Tasks.GenerateResource.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult) EtsDtb
#9
Posted 06 March 2011 - 09:52 AM
Single step your code to find the line that's producing that error.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









