RE: IE/OLE - properties & methods questions
-Original Message- > Hello, > I'm using Win32::OLE to work with IE. I've looked through the docs at MSDN and the archives here, but I didn't find my answer so I don't know if these requests are possible or not. > 1) I'd like to disable "view source" via right click (w/o resorting to the JavaScript trick). I've disabled the toolbars and menus however. > 2) Can I disable text selection (that is, left click and drag)? > 3) Instead of using Navigate to get a URL or file, can I use HTML that's stored in a scalar in my source code? Can you set the Document to an html string? > > Thanks "The IPersistStreamInit interface, and its associated methods, can be used to load a HTML content from a stream using the WebBrowser control...", from MSDN, Topic "Loading HTML content from a Stream". I'm not sure how this translates to perl, I don't have any experience using COM from perl. Also, in regards to (1) and (2), these should be possible if you subclass the webbrowser control. IIRC, some of these questions were answered in past issues of MSDN Mag. which is available at http://msdn.microsoft.com/msdnmag. I believe they appeared in the "C++ Q & A" column, but not sure. HTH, Randy. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: IE/OLE - properties & methods questions
On Fri, 24 May 2002, dss wrote: > > > dss <[EMAIL PROTECTED]> wrote: > and then disable right click so that a user can't right click to view source or >cut-and-paste. > > Of course, hiding HTML source is impossible...don't know what I was thinking :) > I'm not absoulutely convinced that hiding HTML source is impossible. However I am convinced that if you could hide it the client/browser couldn't see it. After all, the browser has to read the source HTML in order to render it. I'm not sure what value write-only HTML source would be. Probably about as useful as write-only memory which is just a little more useful than erase-only memory. [EMAIL PROTECTED] All opinions are my own and not necessarily those of my employer ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: IE/OLE - properties & methods questions
dss <[EMAIL PROTECTED]> wrote: and then disable right click so that a user can't right click to view source or cut-and-paste. Of course, hiding HTML source is impossible...don't know what I was thinking :)Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience
Re: IE/OLE - properties & methods questions
Ron Grabowski <[EMAIL PROTECTED]> wrote: Try navigating to 'about':# untested$ie->Navigate("about: hello%20world ");Be careful because you can only send so much HTML that way. Longer pageswill have to be sent loaded via file:// Thanks, that does work, but I will need to load large pages. What I've been asked to create is almost like an ebook. I need to embed the html in the app (the client will be using perl2exe) and then disable right click so that a user can't right click to view source or cut-and-paste. If I have to use a file, I suppose I could use two-way encryption, but I still need to figure out if it's possible with OLE to disable right click. I know the users will be using Windows and that's I'm trying to use Win32::OLE. Thanks again,Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience
Re: IE/OLE - properties & methods questions
> 3) Instead of using Navigate to get a URL or file, can I use HTML > that's stored in a scalar in my source code? Can you set the Document > to an html string? > > my $ie = WIn32::OLE->new('InternetExplorer.Application') or die 'Can't > create instance of IE'; > > my $html = > 'TestTest'; > # Now can I do something like (both of which don't work) > $ie->Document = $html; > #or > $ie->Document->{body} = $html; Try navigating to 'about': # untested $ie->Navigate("about:hello%20world"); Be careful because you can only send so much HTML that way. Longer pages will have to be sent loaded via file:// ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs