Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SHDocVw.WebBrowser - Load from string
#1
Is it possible to load a html directly from a string into this control ??

If not, Any alternative ?
#2
Use about: protocol. You can find an example in this forum. Search for WebBrowser.
#3
Another learning !

Thx, G
#4
OOps....

Can;t seem to load complicated html using this method....Just get "Page cannot be displayed"...Whats the secret, G?
#5
Probably there is a size limit. For example, this code works with a small page but does not work with bigger pages of similar structure.

Code:
Copy      Help
str controls = "3"
str ax3SHD

IntGetFile "http://www.quickmacros.com/support.html" ax3SHD
ax3SHD.replacerx("(?si).+?<html>(.+)</html>.*" "$1")
ax3SHD-"about:"
out
out ax3SHD

if(!ShowDialog("Dialog31" &Dialog31 &controls)) ret

Save the html to a temporary file...

Code:
Copy      Help
ax3SHD.expandpath("$temp$\temp.htm")
str html=...
html.setfile(ax3SHD)
#6
Hi G,

I was able to load a html directly from memory using MSHTML library. (write Method)

I am receiving error on my another system when I run the .exe -
Quote:'AM.exe': Loaded 'C:\WINDOWS\system32\wshqos.dll', Exports loaded.
'AM.exe': Loaded 'C:\WINDOWS\system32\wshtcpip.dll', Exports loaded.
'AM.exe': Loaded 'C:\WINDOWS\system32\riched20.dll', Exports loaded.
The thread 'Win32 Thread' (0xe3c) has exited with code 0 (0x0).
Unhandled exception at 0x0036fb40 in AM.exe: 0xC0000005: Access violation.

exe available at : http://khemu.net/AM.zip

Let me know if you want the code...I'll PM you.
#7
It asks username and password...
#8
sorry :oops:

user: demo
pass: demo
#9
Rather nice looking program..
#10
Runs well. Only several display problems.
#11
Well....it seems I was more focused on making it pretty than functional...

Its changed now....download new version : http://khemu.net/AM.zip

Its more on the looks of Outlook.

Please respond with screenshots of any problems faced.

Btw: Started on the compose dialog...here is a snippet


Attached Files Image(s)
   
#12
Now its very unstable. Crashing often..
#13
The .exe should output error in QM. Do you see any information in QM ?
Could you post you system info, if possible. Thanks

Works fine on 5 systems that I have here... Sad
#14
I think there is a server-side scripting problem when retrieving message listing....

Its all crapped up....Debugging now..
#15
This I found in QM output:
Code:
Copy      Help
Error (RT) in Dlg_AM_Main:  invalid interface pointer. Use _create or other function to create or get object
Error (RT) in AM_Status:  window not found
Error (RT) in AM_GetMessage:  invalid index
Error (RT) in AM_GetMessage:  invalid index
Error (RT) in AM_Status:  window not found
Error (RT) in AM_GetMessage:  invalid index

I used Windows XP SP2..
#16
Download updated : http://khemu.net/AM.zip

1) Updated Server Script
2) Added Raw Error handling on Internet Routines (Will be made proper later on)

3) Enabled clearing of message fields when changing folder.


Forum Jump:


Users browsing this thread: 1 Guest(s)