Still cannot resize Microsoft's Web Browser Control?

M

montclairguy

I don't know if people are still frazzled by this, but I figured I'd
post this for those who are.

I recently upgraded my primary PC to XP (yes, I know... what took so
long?) and discovered that my Access 97 application suddenly lost the
ability to resize Microsoft's Web Browser Control (ShdocVW.dll), or I
could resize it but it wouldn't use the values I gave it in code...
just some very odd behaviour. After an exhaustive search, I discovered
that a lot of people have been experiencing this issue for several
years, and there's no real fix. There's a hack to insert the control,
resize it, cut it, and paste it and it will stay that size (and if
you've stumbled upon this post, you've probably already read all about
that... if not see Microsoft's Knowledge Base Article at
http://support.microsoft.com/default.aspx?scid=kb;en-us;161397

Anyway, that isn't a solution. So, I took it upon myself to write an
ActiveX control (.OCX) in VB6 that does nothing more than wrap itself
around Microsoft's web browser control. This OCX will allow you to
resize the web browser control via code or in design time. It passes
and retrieves all the properties, methods, and events to and from the
web browser control transparently, and in your Access 97 (probably
other versions too) app, it is identical (as best I could make it) to
the web browser control.

I'm not going to sit here and write a complete instruction set on how
to use it, because that's all documented on Microsoft's site. Anything
that applies to the web browser control (as of this writing) applies to
this... with a few exceptions. The .Stop command is .SStop and the
..Type property is .TType. I'm not a guru on writing ActiveX controls,
by any means, so if you think I've wasted my time, or programmed this
in a really stupid manner, please just keep that to yourself ;-). It
works, and works well for me -- but if you don't like it, you can
reprogram it yourself as I'm giving you the source code too!

To use the control, copy IEWebBrowser.ocx to your windows\system (or
windows\system32 if XP, NT, 2000, etc) directory. Go to a command
prompt, change to the directory, and type "regsvr32 IEWebBrowser.ocx".
You'll then be able to insert the control into your Access 97
application and resize it at your whim.

Sorry, but I'm not offering any support or answers to any questions
about it... the code is there so you can do with it what you like. If
something like this already exists, I haven't found it (well I just
read a post that someone is selling something like this, but this one
is free.)

Here you go, and good luck!
http://www.montclairguy.com/files/webbrowserocx.zip
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top