.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

Im trying to print the content of a listbox1 but the printing is false so all the pages coming out f

Posted By:      Posted Date: September 03, 2010    Points: 0   Category :Windows Application
 
 ManagementObjectSearcher mosPrinter = new ManagementObjectSearcher("SELECT * FROM Win32_Printer");                 foreach (ManagementObject moDiskete in mosPrinter.Get())                 {                     foreach (PropertyData p in moDiskete.Properties)                     {                           // listBox1.Items.Add(p.Value);                         listBox1.Items.Add(String.Format("{0}: {1}", p.Name, p.Value == null ? "NULL" :myprint.DocumentName=p.Value.ToString()));                      //   myprint.DocumentName = p.Value.ToString();                     


View Complete Post


More Related Resource Links

Application Vs. Content Pages in SharePoint

  
SharePoint has two types of ASPX pages. One type is the application page, also known as a _layout page. The other type of ASPX page is a content page, also known as a site page. Each of these page types is stored in a different location in SharePoint. When developers create custom ASPX pages, they must decide on the page type.

Printing: Preview and Print from Your Windows Forms App with the .NET Printing Namespace

  

Printing is an integral part of every complete Windows-based application. Providing robust printing capabilities in these applications has often proved to be a tedious chore. Now, printing from Windows Forms with the .NET Framework means you must adopt a document-centric approach, resulting in cleaner and more manageable code. While the System.Windows.Forms namespace provides seamless integration with all the standard print dialogs (such as Print Preview, Page Setup, and Print), the System.Drawing.Printing namespace offers numerous classes for extensibility and customization. These classes, and how they provide access to printing capabilities, are covered here. Other useful techniques, such as printing in the background to allow the user to continue other tasks, is also explained.

Alex Calvo

MSDN Magazine February 2003


Content deployment: pages not based on a page layout

  
Is it possible to use content deplyoment feature when pages (in page library) are not based on a Page Layout?

SharePoint 2007 - Consolidating everything as feature into WSP [Content Type, Page Layout, Pages, Ma

  

Hello –

 

Overview – We are building a Mobile Web Site using SharePoint 2007. The big screen site has been already built and we need to integrate the mobile site into same site collection of big screen –

 

·         The Mobile site will use the existing content types of existing big screen site

·         We will build a new custom Master page

Infopath 2007 not printing footer in browser print view

  
I have added a footer to the print view of a browser enabled form and it is not printing when printing the form. The footer is relatively sinmple, however when I click on print view on the browser form and use print preview, I cannot see the footer at all. I have set bottom margins to auto, however I am using an image in my header and therefore have a section at the top of each page where my page top margin is set to 0 and the margins lie within the bounds of the section at .25". The footer that is not displaying in print preview in the form is as follows;"Quote Number: &{/my:myFields/my:sqnumber&} &b&pof&P&b &b &{/my:myFields/my:group28/my:sqdate&}Revision: &{xdFormatting:FormatString("/my:myFields/my:sqquoterevision","number","numDigits:0;negativeOrder:1;")&} &b Prepared For: &{/my:myFields/my:sqclientname&}"The page setup in IE listed page number and url info when using print preview and I have set them to none because my footer is in the form. Please help, this is frustrating!

Printing Groupbox Content

  
Hello EveryOne ... I want to Print a Group Box Content in a Window Form ... The Group box Contain PictureBox ,Text Box and Lables Every thing Seems To be working Fine But Still I cant get the print...Following is the code for Printing ...    public partial class Frm_VisitorDisplay : Form     {         private System.IO.Stream streamToPrint;         string streamType;         [System.Runtime.InteropServices.DllImportAttribute("gdi32.dll")]         private static extern bool BitBlt         (             IntPtr hdcDest, // handle to destination DC             int nXDest, // x-coord of destination upper-left corner             int nYDest, // y-coord of destination upper-left corner             int nWidth, // width of destination rectangle             int nHeight, // height of destination rectangle             IntPtr hdcSrc, // handle to source DC             int nXSrc, // x-coordinate of source upper-left corner             int nYSrc, // y-coordinate

Printing Groupbox Content

  
Hello EveryOne ... I want to Print a Group Box Content in a Window Form ... The Group box Contain PictureBox ,Text Box and Lables Every thing Seems To be working Fine But Still I cant get the print...Following is the code for Printing ...  public partial class Frm_VisitorDisplay : Form     {         private System.IO.Stream streamToPrint;         string streamType;         [System.Runtime.InteropServices.DllImportAttribute("gdi32.dll")]         private static extern bool BitBlt         (             IntPtr hdcDest, // handle to destination DC             int nXDest, // x-coord of destination upper-left corner             int nYDest, // y-coord of destination upper-left corner             int nWidth, // width of destination rectangle             int nHeight, // height of destination rectangle             IntPtr hdcSrc, // handle to source DC             int nXSrc, // x-coordinate of source upper-left corner             int nYSrc, // y-coordinate of so

Developing common content pages that can be hosted at the Web application or TLS level and can be sh

  
We are working on a Publishing site and planning to provision each client as a sub-site under the top level site (TLS). All of these sub-sites will almost have the same web pages and based on the client specific requirement they can customize these pages if needed. To meet the above requirement: I want to develop common content pages or application pages with the publishing capabilities and host them at the TLS, making these common pages available for all sub-sites under the TLS with the following requirements. ·        Sub-sites will not have any of these pages on their own and there would be only one central copy of this common page at TLS. ·        The sub-sites should be able to access these common pages in their context that means using the sub-site specific Master page & Themes. ·        When there is a specific customization is required such as adding a different web part, or updating the HTML data on the page, the common page will be edited in the sub-site and eventually making its own copy of the common page and resulting breaking apart from the common page for any future changes. ·        When the user edits the page he should be alerted that customizing this common page will make a local copy an

How to develop Common Content or Application pages in Sharepoint 2010, with respect to the customiz

  
  I have a top level site and subsites (which might be around 10). Where as the top level site represents a common landing page and each sub site represents a client site to which user will be directed upon login. This is a PUBLISHING web site. I need to design to start with common pages across all clients and if there is a need let the client to customize the common page accroding to their need. This is a PUBLISHING site so all these common pages should have Web parts zones with authoring capabilities. What is the best way of achieving this?    

Printing Landscape Report using the Print Control of the ASP.NET Report Viewer

  
I am using the ASP.NET Report Viewer 2010 web control in remote processing mode connected to a SQL Server Reporting Services 2008 R2 report server in Native Mode. I am viewing the report in IE8 and the print control within the report viewer is available. According to "Printing Reports from a Browser Using the Print Control" at http://msdn.microsoft.com/en-us/library/ms159237.aspx  "The Print dialog box and the default printer settings for width, height, and page orientation are determined by the report definition." In SQL Server Business Intelligence Development Studio I am using the “Report Properties” window accessed from the “Report” menu to set the Orientation to “Landscape”, the paper size to “Letter”, the Width to “11in”, and the Height to “8.5in” in the report definition. When viewing the report using the ASP.NET Report Viewer 2010 in IE8 and exportint to PDF, the report renders correctly in landscape orientation and the size both on screen and printed is as defined in the report definition. However, if I print it directly from the ASP.NET Report Viewer using the Print Control the print preview shows the report correctly in landscape orientation and page size, but the resulting printout is in portrait orientation and skewed or cropped.  If I go into the properti

Repeat header rows on all pages when you export to excel sheet and print it

  
Hello , I need to export report into excel sheet. And when people try to print it . The header rows only appear on First page of the print . Other subsequent pages d onot have header rows. I saw another thread saying SQL server 2008 R2 will solve the issue. Can you tell me that is fixed and how to i go about configuring it on SQL server 2008 R2.   Thanks Madhavi

master pages - how to access content page from master page?

  
Hello,I have a master page setup that is used throughout my site that is basically a header with a menu. I recently added a textbox and a button to this master page which is to be a quick search box that is available anywhere in the site. When a user enters text into the search box and hits the button, I need to load the actual content page which is used to search and show search results (which also uses this same master page), and have the text entered available so the search can be triggered automatically. Again, this search text box and button is now in my master page so it could be  triggered from anywhere in the app... it serves as a convenient way to do a basic search from anywhere in my app, without having to first navigate to the actual 'search page' that already exists.  You can also navigate to the actual search page, which uses the same master page, where there is many more search options.I'm thrown off by the master page arrangement, which I have not used until this project. What do I do?

When I do "Print Privew" I can see all pages, but when I print, I only see the first partially.

  
Anybody has an idea where I would need to focus - I have webpage that has an icon and when it is clicked, it would display a report that has 5 plus pages. This app was developed long time ago, and don't have document. the issue is when I do "Print Privew" I can see all pages, but when I print, I only see the first partially. Note: I have done the page setup and all of variation, but did not work.   Thanks

How to Suppress the JavaScript error tht pops up while printing the WebBrowser content??

  
Hi All, In my windows application I'm loading more than 100 urls in my web browser control one by one in a for loop and need to print them programatically after each URL gets loaded . But, I keep getting the Javascript error for so many URLs. I'm not sure why this error keep coming. Can anyone help me on how to suppress the javascript error through code and proceed. Thank you.

Content cutoff in Print preview screen when a print button is clicked from a WPF application in Dell

  
Hello, I am facing a problem in printing.. I have a WPf+windows application running on the Dell Mini Net book(10") with screen resolution 1366 x 768. I am trying to the print the page with heading, image & some measurements on a 81/2 x 11. the print preview seem to be ok on the desktop(screen resolution 1440 x 900). but when i run same application in dell mini the layout is cutoff, the text is started from the footer area,  the page is not shown completely.. Can any one help me in this regard??   Thanks for the help in advance Archana

how to print current page and all pages of listview?

  

hi,

I have a listview.When I click a "Print" button It should be  print only listview items (current page & all pages).


how to do this pls tell me?


many thanks in advance.



Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend