About Syed Adeel Rizvi Expertise I can answers questions regarding web based and desktop based programming in VB.Net. Which can include XML, Custom Controls + Computer Hardware and Windows Turboshooting...etc.
More Skills :
1 . PHP - > All Type Of CMS e.g. (Joomla,Drupul,PHPNuke...etc)
2 . ASP
3 . ASP.Net
4 . CMS
5 . MySql
6 . SQl Server 2000 & 2005
7 . Ms Access
8 . Web Designing
9 . Networking Turboshooting
10 . Windows Turboshooting
11 . Hardware Turboshooting
All Type Of Work Related To IT
I also Do Work as a Freelance as Application & Web Developer & Designer
Experience i have 3 years work experience in software house and 4 years work experience for computer hardware and Networking..
Question hi i am trying to print my excel sheet in vb.net 2003 when i click print i get a blank sheet of paper hope you can help here is my code for you to look at
Imports System.Drawing.Printing
Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub AxWebBrowser1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxWebBrowser1.Enter
AxWebBrowser1.Navigate("C:\Sales Invoice.xls")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
PrintPreviewDialog1.Document = PrintDocument1
PageSetupDialog1.PageSettings = PrintDocument1.DefaultPageSettings
PageSetupDialog1.ShowDialog()
PrintDocument1.DefaultPageSettings = PageSetupDialog1.PageSettings
PrintPreviewDialog1.ShowDialog()
Catch exc As Exception
MsgBox("Printing Operation Failed" & vbCrLf & exc.Message)
End Try
End Sub
Answer Hello
Hmm Of Course It Will Print Blank - Becuz There is no Linking Between Browser Control and PrintPreviewDialog1 Or PageSetupDialog1 Got My Point .. dont use this .. if u want to print out the sheet simple you the browser control here is the code for print :