Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web Browser Control

Status
Not open for further replies.

AlastairP

Technical User
Feb 8, 2011
286
AU
I am designing an HTML editor, with thanks to Mike Gagnon link to the french HTML editor thread184-1721534

I have been trying to find doumentation on the various commands like queryCommandValue, and get a list of the available events & properties available for editing?

Secondly, I would dearly like to be able to turn off the border in the Web Browser Control. There is no option exposed for this, but is it perhaps available, just not exposed in VFP?
 
It's not clear exactly what you are looking for. The link that Mike Gagnon provided was to a method of sending emails via CDO. That's got nothing to do with an HTML editor or the Web Browser controls.

If you are looking to use the Web Browser control as a way of creating and editing an HTML stream, that is perfectly possible. I've never been able to find any documentation for it, but the information I've found most useful was Rick Strahl's article:
I used this technique for about a year in one of my applications. But the editing features are very limited, so I switched to using Tiny MCE instead. That has a lot more features, but it is more difficult to implement from within a VFP app.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Mike, no the code just adds the idea to use the edited html as body of a cdo message. But the code itself is a html editor.
Anyway using the IE itself in editing mode is not giving you much control about editing, you don't have any toolbar with formatting options, adding objects (images) etc. This is not really useful.

>documentation on the various commands like queryCommandValue.
This is a very general OLECONTROL method, nothing special to the web browser control and not your way inside events or commands to use. As said you won't gain much control about the html edited indie the webbrowser control. Using a javascript editor with UI would be a better and more complete solution than just putting the webbrowser control in editing mode.

Anyway, to hide the border you put the webbrowser control into a vfp container and set it's top/left to -1 or -2 and it's width 2 or 4 pixels higher than the container width/height and the container will clip the border of the web browser control.

Bye, Olaf.
 
Mike, no the code just adds the idea to use the edited html as body of a cdo message. But the code itself is a html editor.

Oh, I see. I have now downloaded his zip file, and can see how he uses the Web Browser control for editing. My mistake.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
I have built a neat tool bar class that interfaces with the control
I located an article here: which has much information on the a control I believe is the same control, or at the very least provides suitable documentation.

Olaf, being an activex control, will the borders show through even if it is in a VFP container?
 
And I see now it offers a toolbar along with the webbrowser in edit mode, so it already offers enough to create a html page. Some of the things are system dialogs, eg for adding an image. You perhaps won't be able to control that in all its details. I don't want to find out because of several criticism rick strahl posts in his blog article.

Bye, Olaf.
 
The borders work fine oversized. Thanks for the help.
download.aspx
 
 http://files.engineering.com/getfile.aspx?folder=382253eb-60ed-4006-b3b6-22d9e31d7608&file=HTML_Editor.jpg
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top