05-18-2018, 01:21 PM (This post was last modified: 05-18-2018, 02:19 PM by win.)
I want to insert the html code into the QM code , so that QM can run the web page just by generating an exe file, but I don't know if it can be implemented.
In addition, when the web page is opened, the function fullScreen() in the JS code of the html can be automatically run, so that I can achieve full-screen display effect.
I hope someone can help me, any suggestions and comments are welcome, thanks in advance
05-18-2018, 09:41 PM (This post was last modified: 05-18-2018, 10:03 PM by win.)
The following code can display the full-screen button in the web page, but cannot display the web page. In addition, how to run the full-screen JS function in the web page after displaying the web?
sel message ,caseWM_INITDIALOG ,SHDocVw.WebBrowser we3 ,we3._getcontrol(id(3 hDlg)) ,DT_SetAutoSizeControls(hDlg "3s") ,max hDlg , ,caseWM_DESTROY ,caseWM_COMMANDgoto messages2 ret ;messages2 sel wParam ,caseIDOK ,caseIDCANCEL ret1
Click the full screen button, it can not display the full screen of the webpage, but directly open the HTML file with IE browser, click the button is full screen
The following web page file can be opened normally in Internet Explorer 11. I can also click the full screen button to make the web page full screen display.
below i have shown how to have a button for full screen and also how to load with and without the iframe
don't really need the iframe at all
the javascript was never going to work
str controls ="3" str ax3SHD="http://fs.focusky.com.cn/jhgh/glyv/index.html";;;without iframe ;to use iframe uncomment line below and comment line above and find we3.Refresh line(line 40 and uncomment) ;str ax3SHD= ;<html> ;;;;<head> ;;;;;;;;<title>test</title> ;;;;;;;;<style type="text/css" media="screen"> ;;;;;;;;;;;;html, body { height:100%;width:100% } ;;;;;;;;;;;;body { margin:0; padding:0; overflow:hidden; text-align:center; ;;;;;;;;;;;;;;;;;;;background-color: #ffffff; } ;;;;;;;;</style> ;;;;</head> ;;;;<body> ;;;;;;;;<iframe style="width:100%;height:100%" src="http://fs.focusky.com.cn/jhgh/glyv/index.html" seamless="seamless" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true" ></iframe> ;;;;</body> ;</html> WebBrowserControlDisableIE7Emulation
if(!ShowDialog(dd &sub.DlgProc&controls))ret
#sub DlgProc function# hDlg message wParam lParam
sel message ,caseWM_INITDIALOG ,SHDocVw.WebBrowser we3 ,we3._getcontrol(id(3 hDlg)) ,DT_SetAutoSizeControls hDlg "3s" ,DT_SetAccelerators hDlg "4 F11" ,;we3.Refresh;;; uncomment if using iframe but dont really need iframe ,caseWM_DESTROY ,caseWM_COMMANDgoto messages2 ret ;messages2 sel wParam ,caseIDOK ,caseIDCANCEL ,case4 ,int-- t_full; t_full=!t_full ,int cWC=id(3 hDlg) ,int fsb=id(4 hDlg) ,sub.FullScreen hDlg t_full cWC fsb ret1 #sub FullScreen function w full cwc fullscreenButton str text if full ,,SetWinStyle w WS_BORDER|WS_THICKFRAME2 ,,SetWindowState w SW_SHOWMAXIMIZED1 ,,text="Exit Full Screen (F11)" ,,;SetWindowState cwc SW_SHOWMAXIMIZED 1 ,,InvalidateRectchild("""Internet Explorer_Server" cwc)00 else ,,SetWinStyle w WS_BORDER|WS_THICKFRAME1 ,,SetWindowState w SW_SHOWNORMAL1 ,,text="Full screen (F11)" ,,;SetWindowState cwc SW_SHOWNORMAL 1 ,,InvalidateRectchild("""Internet Explorer_Server" cwc)00
text.setwintext(fullscreenButton)