Search the web
Sign In
New User? Sign Up
vbra · Visual Basic - Reliable Answers
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
webbrowser control   Message List  
Reply | Forward Message #14 of 42 |
RE: [VBra] webbrowser control

Hi Vaclav,

> I am attempting slightly customise Microsoft WebBrowser
> control. I got the easy stuff working (handles of its
> windows etc.) but most problems resist. Specifically:
>
> 1. When the control navigates to a web page with a big
> picture, it shows scrollbars. I need to resize the
> control so its right margin will match the right margin
> of the picture and the scrollbar disappear. In fact I
> need to know the scollbars maximum. It is somehow
> strange, since the GetScrollInfo fails with either of
> the three WebBrowser sub-windows I was able to find.
> This suggests that it has non-standart scrollbars. But
> the control responds to WM_HScroll SendMessage. So I
> am rather confused.

You can wrap the image in an HTML document and have it display that
way. Set the border of the body to zero. Here's a html wrapper you
might use:

<html>
<body
scroll="no"
border="0"
margin="0"
style="border:0;margin:0;cursor:default;"
onload="focus();"
ondragstart="event.returnValue=false;"
onselectstart="event.returnValue=false;"
ncontextmenu="event.returnValue=false;"

onkeydown="if(event.keyCode==27){try{window.opener.focus();}catch(x)
{};setTimeout('window.close();',10);}event.returnValue=false;" >
<img src="yourpicture.jpg" border="0" />
</body>
</html>

> 2. I need the browser to find and highlight a specific
> word in a html page without prompting user. I guess it
> can be done by using Web1.ExecWB OLECMDID_FIND,
> OLECMDEXECOPT_DONTPROMPTUSER, in, out but i do not
> know how to pass correct in and out values to find
> certain string.

I think for the search to function correctly you've got to let the
user supply the keyword first. I wouldn't bother with that though.
There's a demo of manipulating the content of a webbrowser control
located on Edanmo's VB Page. I believe it's in the tips area.
http://www.domaindlx.com/e_morcillo/default.asp

Regards,

Shawn K. Hall
http://ReliableAnswers.com





Thu Jul 26, 2001 7:39 pm

vb@...
Send Email Send Email

Forward
Message #14 of 42 |
Expand Messages Author Sort by Date

Hi there. I am attempting slightly customise Microsoft WebBrowser control. I got the easy stuff working (handles of its windows etc.) but most problems resist....
vaclav_mach@...
Send Email
Jul 26, 2001
8:58 am

Hi Vaclav, ... You can wrap the image in an HTML document and have it display that way. Set the border of the body to zero. Here's a html wrapper you might...
Shawn K. Hall
vb@...
Send Email
Jul 26, 2001
7:37 pm

... Hi Shawn. What you suggest for the first problem is a possible way arround. Actually a clever idea, although I must first test if it is usefull for the...
vaclav_mach@...
Send Email
Jul 27, 2001
8:41 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help