Browser Control: Set Document
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=15980
Printed Date: 23 November 2024 at 5:47am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: Browser Control: Set Document
Posted By: fuxi
Subject: Browser Control: Set Document
Date 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
|
Replies:
Posted By: shipwreck
Date 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
|
Posted By: fuxi
Date Posted: 11 January 2010 at 12:47pm
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
|
Posted By: shipwreck
Date 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
|
|