|
-
Jan 13th, 2003, 09:48 PM
#1
Thread Starter
Member
-
Jan 13th, 2003, 11:50 PM
#2
PowerPoster
But printDocument seems cant working well
Can you explain that further? Posting your code would also help.
-
Jan 14th, 2003, 12:02 AM
#3
Thread Starter
Member
Thanks hellswraith 
I know there is some error, but I can't find it 
My source code:
------------------------------------------------------------------------
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
WebBrowser1.Navigate("http://www.kcg.com/doc/c_doc11.xsl")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
On Error Resume Next
Dim eQuery As OLECMDF
eQuery = Me.WebBrowser1.QueryStatusWB(OLECMDID_PRINT)
If Err.Number = 0 Then
If eQuery And OLECMDF_ENABLED Then
Me.WebBrowser1.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, "", "")
Else
MsgBox("Printer Not Found or No Contents in Webbrowser")
End If
End If
End Sub
End Class
-
Jan 14th, 2003, 02:32 AM
#4
yay gay
NEVER use on error resume next in VB.NET ...instead use try, catch and finally blocks..and of course that if some error happens u'd never know which and why because u have that crappy on error resume next..!
\m/  \m/
-
Jan 14th, 2003, 03:08 AM
#5
Thread Starter
Member
Thanks PT Exorcist.
Type "OLECMDF" is not defined.
It means no this function in vb.net
-
Jan 14th, 2003, 01:45 PM
#6
PowerPoster
Your going to need to locate that com object and add a reference to it in order to use it. I have no idea where to look for it though. I have had problems like this before when trying to get functionality from older com components and such.
-
Jan 14th, 2003, 08:08 PM
#7
Thread Starter
Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|