Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Re: webbrowser and object doesn't support this property......


Message #1 by "ram" <ramprasadnair@h...> on Sat, 22 Jun 2002 02:36:29
Hi Robert,
  
  I don't think that you could be able to use a Webbrowser control as an 
object inside IE; because, Webbrowser control uses an instance of IE. 
  Hence IE cannot create its own container in itself.

  However even I am looking to find an answer for 'Defaulting printer 
orientation to landscape'. Please let me know if you have found the answer 
for this.

Thanks
Ram Nair

> I have tried several routines, on different browsers and different 
> machines but when I try using the webbrowser control all I get is a 
script 
> error of 'object doesn't support this propert or method'.
> 
> For example this is a piece of code from a MSDN page:
> 
> [HTML]
> [HEAD]
> [OBJECT ID="wbp"
> CLASSID="CLSID:778C58A9-81B6-11D3-BB8F-00C04FA3471C"]
> [/OBJECT]
> [SCRIPT LANGUAGE="VBScript"]
>    Sub Print()
>        If Len(wbp.DefaultPrinterName) = 0 Then
>            MsgBox "No default printer!"
>            Exit Sub
>        End If
>        wbp.Header = "My Header"
>        wbp.Orientation = 2 ' Landscape
>        wbp.Print
>    End Sub
> [/SCRIPT]
> [/HEAD]
> [BODY]
> [INPUT TYPE="BUTTON" VALUE="Print" ONCLICK="Print()"]
> [/BODY]
> [/HTML]
> 
> this comes up with 'object doesn't support this propert or 
> method 'wbp.DefaultPrinterName''
> 
> Has anybody any ideas, it is driving me crazy and it is probably 
something 
> silly!
> 
> Robert

  Return to Index