Windows Develop Bookmark and Share   
 index > Windows Forms General > Webbrowser Zooming
 

Webbrowser Zooming

Hi folks,

I am using the webbrowser control in my form to preview a website. This works fine but only in 1:1 width and height. Now i want to scale the output of the webbrowser control, so that i can see the whole website in a rect of 100 x 200 pixels for instance.

Could you tell me the right property or method?

First I tried to work with the Scale function but it seems to be deprecated, isn't it?

Thank you and best wishes from Germany!

Tomas Jakobs  Monday, July 17, 2006 1:34 PM
Tomas Jakobs wrote:

This is the output of my debugger:

warning BC40000: Public Sub Scale(ratio As Single) ist veraltet: This method has been deprecated. Use the Scale(SizeF ratio) method instead. http://go.microsoft.com/fwlink/?linkid=14202.

could you give me a hint how do you implement the scaling of websites in the webbrowser control?

You were never supposed to be using Control.Scale(Single), or Control.Scale(Single, Single) in an application. If you're using .NET 2.0 you can use Control.Scale(SizeF) instead. If you called Control.Scale with a ratio variable named "ratio" like this: myObject.Scale(ratio);, then you can use Control.Scale(SizeF) like this: myObject.Scale(new SizeF(ratio, ratio));
Peter Ritchie  Monday, July 17, 2006 2:09 PM

Scale shows fine over here in .NET 2.0! :-) (does not give me any sign of it being depreciated)

ahmedilyas  Monday, July 17, 2006 1:38 PM

This is the output of my debugger:

warning BC40000: Public Sub Scale(ratio As Single) ist veraltet: This method has been deprecated. Use the Scale(SizeF ratio) method instead. http://go.microsoft.com/fwlink/?linkid=14202.

could you give me a hint how do you implement the scaling of websites in the webbrowser control?

Tomas Jakobs  Monday, July 17, 2006 1:42 PM
Tomas Jakobs wrote:

This is the output of my debugger:

warning BC40000: Public Sub Scale(ratio As Single) ist veraltet: This method has been deprecated. Use the Scale(SizeF ratio) method instead. http://go.microsoft.com/fwlink/?linkid=14202.

could you give me a hint how do you implement the scaling of websites in the webbrowser control?

You were never supposed to be using Control.Scale(Single), or Control.Scale(Single, Single) in an application. If you're using .NET 2.0 you can use Control.Scale(SizeF) instead. If you called Control.Scale with a ratio variable named "ratio" like this: myObject.Scale(ratio);, then you can use Control.Scale(SizeF) like this: myObject.Scale(new SizeF(ratio, ratio));
Peter Ritchie  Monday, July 17, 2006 2:09 PM
thank you very much...
Tomas Jakobs  Monday, July 17, 2006 2:19 PM

You can use google to search for other answers

Custom Search

More Threads

• Photo gallery with filmstrip view
• What's the MSN SMTP server when using SSIS?
• Form1_MouseMove Does Not Seem to Work
• Errors manipulating colletions with a Propertygrid
• VC++ Get some things from My_Sql
• where to declare global variables?
• Try to fix dis
• I'm going nuts here...
• FTP approach advise needed?
• Webbrowser Control and New Windows