Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - Browser Control: Set Document
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Browser Control: Set Document

 Post Reply Post Reply
Author
Message
fuxi View Drop Down
Groupie
Groupie


Joined: 15 December 2008
Location: Germany
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote fuxi Quote  Post ReplyReply Direct Link To This Post Topic: Browser Control: Set Document
    Posted: 11 January 2010 at 7:50am
hi all,

i'm wondering - is it possible to directly assign a mshtml.document to the browser control?
currently i need to write a tempfile then use navigate on it - it would make the tempfile obsolete.

in case it's not possible - it would be nice if you could implement it in a further version.

thanks
Back to Top
shipwreck View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 April 2008
Location: United States
Status: Offline
Points: 308
Post Options Post Options   Thanks (0) Thanks(0)   Quote shipwreck Quote  Post ReplyReply Direct Link To This Post Posted: 11 January 2010 at 8:44am
What exactly do you mean?
The web browser control does have the document property.
Are you trying to load an actual HTML file?
Product: Xtreme Suite Pro (Active-X), Version 15.3.1

Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit)

Language: Visual Basic 6.0 SP6
Back to Top
fuxi View Drop Down
Groupie
Groupie


Joined: 15 December 2008
Location: Germany
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote fuxi Quote  Post ReplyReply Direct Link To This Post Posted: 11 January 2010 at 12:47pm
Originally posted by shipwreck shipwreck wrote:

What exactly do you mean?
The web browser control does have the document property.
Are you trying to load an actual HTML file?


yes - but the document property is read-only.
i meant i'd like to apply the document directly, like
      set browser.document = myDoc
in order to show the document.

thanks
Back to Top
shipwreck View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 April 2008
Location: United States
Status: Offline
Points: 308
Post Options Post Options   Thanks (0) Thanks(0)   Quote shipwreck Quote  Post ReplyReply Direct Link To This Post Posted: 11 January 2010 at 1:49pm
Okay, I'm pretty sure I understand what you are saying.

What I would do, is use the InnerHTML feature with CodeJock's version of the web browser control. So, if it is an HTML document, just load the HTML coding from the file to the InnerHTML property of the control. Then just make sure you include your files (Images, etc.)

Another option would be to simply navigate to that file.
An example would be:
webbrowsercontrol.navigate (Path of file)



Now, for the read only property you can just set the static text property to True. This pretty much disables alteration of the document.

You can also disable the right click menu property to ensure read only property.

I hope that helps some, if not let me know and we can try something else.

Good Luck!
Product: Xtreme Suite Pro (Active-X), Version 15.3.1

Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit)

Language: Visual Basic 6.0 SP6
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.266 seconds.