Sivish Web Solutions

Navigation Menu

Printing without Status Dialogues in C# (Silent printing)

Posted by on Apr 24, 2012 in Blog, c#, Printing, VS2010 | 3 comments

In developer’s life, it is so common we used to encounter lot of issues. I am working in a small proof concept. Automatically printing documents to file or printer in C# (.Net Framework 4.0).         private void Print()         {             if (m_streams == null || m_streams.Count == 0)                 throw new Exception(“Error: no stream to print.”);             PrintDocument printDoc = new PrintDocument();             if (!printDoc.PrinterSettings.IsValid)             {                 throw new Exception(“Error: cannot find the default printer.”);             }             else             {                 printDoc.PrintPage += new PrintPageEventHandler(PrintPage);                 m_currentPageIndex = 0;                 if (printDoc.PrinterSettings.PrinterName == “Microsoft XPS Document Writer”)                 {                     printDoc.PrinterSettings.PrintToFile = true;                     if (filename == “”)                         printDoc.PrinterSettings.PrintFileName = DateTime.Now.Ticks.ToString() + “.xps”;                     else                         printDoc.PrinterSettings.PrintFileName = filename;                 }                 printDoc.Print();             }         } But while printing the documents to file, I was annoyed by a pop up which showed me Printing page 1 of 5. I wanted to get rid of that.   After a bit google and MSDN, I have found that Print controller PrintController class Controls how a document is printed, when printing from a Windows Forms application. If you look at the PrintDocument class Meta data view, you will notice the following statement.      ...

Read More

Introduction to Complex UIs Using jQuery UI

Posted by on Jul 5, 2011 in ASP.NET, Blog, JQuery, VS2010 | 0 comments

Guys, I have come across this and found it is very useful..   Building a web application with jQuery makes the task easier. Similarly, building a web application with a complex UI is made easier with jQuery’s sister project jQuery UI. With jQuery UI we have a collection of interactions, widgets and a theme builder at our fingertips that allows us to make a cohesive UI.   To continue reading click...

Read More

Are you going to install VS2010 in your new Laptop

Posted by on Jul 3, 2011 in ASP.NET, IIS, Sql Server 2008, Uncategorized, VS2010, Windows 7 | 0 comments

Hi Guys, Did you buy new laptop? Are you going to install VS2010? Please stop and read this blog. Please install them in the following order.Otherwise you are at risk to format your OS and reinstall everything once again 🙁   1. Install IIS  with the following features: ( Control Panel –> Programs –> Turn Windows Features on / Off) i)  Internet Information Services with the following options selected.   iii) Your system will be restarted once.   iv) Install Visual Studio 2010   v) Install Sql Server 2008   You will be good to...

Read More