Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Popup window open link
#7
Flash by design does not allow fullscreen when loading(security risk)
you can however do a couple things to achieve the desired effect
this adds keyboard hotkey F11 to dialog itself and will toggle between full screen and programmed size
opens in full screen
all the functions needed  listed below
you have some of these already but listed here for complete example


Function dialog_full_screen2
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90CC0AC8 0x0 0 0 224 136 "Dialog"
;3 ActiveX 0x54030000 0x0 0 0 224 136 "SHDocVw.WebBrowser {8856F961-340A-11D0-A96B-00C04FD705A2}"
;END DIALOG
;DIALOG EDITOR: "" 0x2040700 "*" "" "" ""
WebBrowserControlDisableIE7Emulation

str controls = "3"
str ax3SHD="http://static.flipbuilder.com/demo/sysco-seafood/index.html#p=1"
if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,DT_SetAutoSizeControls hDlg "3s"
,int- t_hdlg t_kh
,t_hdlg=hDlg
,t_kh=SetWindowsHookEx(WH_KEYBOARD_LL &DAKH_HookProc _hinst 0)
,,,SetWinStyle hDlg WS_CAPTION 2            
,,,max hDlg
,case WM_APP+10
,FormatKeyString lParam 0 &_s
,if _s = "F11"
,,if max(hDlg)
,,,SetWinStyle hDlg WS_CAPTION 1
,,,res hDlg
,,else
,,,SetWinStyle hDlg WS_CAPTION 2            
,,,max hDlg            
,case WM_DESTROY
,,UnhookWindowsHookEx t_kh
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1


Function DAKH_HookProc
Code:
Copy      Help
;/dialog_and_keyboard_hook
function nCode wParam KBDLLHOOKSTRUCT&h

/FormatKeyString h.vkCode 0 &_s; out "%s %s" _s iif(h.flags&LLKHF_UP "up" "down") ;;disable this

;Example of triggers for keys F11
;With Ctrl etc need more work, eg reliably remember key state.

if(h.flags&(LLKHF_INJECTED|LLKHF_UP)) goto gr

int- t_hdlg
sel h.vkCode
,case [VK_F11] SendMessage t_hdlg WM_APP+10 0 h.vkCode

;gr
ret CallNextHookEx(0 nCode wParam &h)

Function DT_AutoSizeControls
Code:
Copy      Help
;/
function hDlg message $controls

;Moves or resizes dialog controls when you resize the dialog.
;Call this function from dialog function, before sel message.

;hDlg, message - hDlg, message.
;controls - space-separated list of controls.
;;;Syntax for a control: IdActionDirection
;;;;;Id - control id.
;;;;;Action - m (move) or s (resize).
;;;;;Direction - h (horizontally) or v (vertically) or none (horizontally and vertically).

;EXAMPLE
;;...
;;messages
;DT_AutoSizeControls hDlg message "1m 2m 3sh 4mv 5s"
;sel message
,;case WM_INITDIALOG
,;;...


type ASC_CONTROL hwnd !action !direction horz vert
ASC_CONTROL* p
int i j k x y
RECT r rc

sel message
,case WM_INITDIALOG
,GetClientRect hDlg &rc
,
,ARRAY(lpstr) a
,tok controls a
,p._new(a.len)
,SetProp hDlg "asc_controls" p
,
,for i 0 a.len
,,ASC_CONTROL& c=p[i]
,,lpstr s=a[i] ;;out s
,,j=val(s 0 k); s+k
,,c.hwnd=id(j hDlg); if(!c.hwnd) out "Warning: control %i not found." j; continue
,,c.action=s[0]; c.direction=s[1]
,,
,,GetWindowRect c.hwnd &r; MapWindowPoints 0 hDlg +&r 2
,,sel c.action
,,,case 'm' c.horz=rc.right-r.left; c.vert=rc.bottom-r.top
,,,case 's' c.horz=rc.right-r.right; c.vert=rc.bottom-r.bottom
,
,case WM_SIZE
,GetClientRect hDlg &rc
,
,p=+GetProp(hDlg "asc_controls")
,
,for i 0 p._len
,,&c=p[i]
,,j=0; sel(c.direction) case 'h' j|2; case 'v' j|1
,,sel c.action
,,,case 'm'
,,,x=rc.right-c.horz; y=rc.bottom-c.vert
,,,mov x y c.hwnd j; err
,,,
,,,case 's'
,,,GetWindowRect c.hwnd &r; MapWindowPoints 0 hDlg +&r 2
,,,x=rc.right-r.left-c.horz; y=rc.bottom-r.top-c.vert
,,,siz x y c.hwnd j; err
,
,case WM_DESTROY
,p=+RemoveProp(hDlg "asc_controls")
,p._delete

Function WebBrowserControlDisableIE7Emulation
Code:
Copy      Help
;/

;Ensures that web browser controls of this program (QM or your QM-created exe) can use features of current Internet Explorer version (CSS3, HTML5 etc).

;REMARKS
;By default, web browser controls work in compatibility mode with Internet Explorer 7. IE 8/9/10/11 features are unavailable.
;This function sets this registry value, if it is missing or different:
;;;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION:<ThisProgram.exe>=<CurrentInternetExplorerVersion>
;Error if this process is not running as administrator.
;You can call this function before ShowDialog if the dialog contains an ActiveX control SHDocVw.WebBrowser. Or call it once.


if(_iever<8) ret
str e.getfilename(ExeFullPath 1)
;out e
int t v=_iever>>8*1000
;out v
lpstr k="SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION"
if(rget(t e k HKEY_LOCAL_MACHINE) and t=v) ret
;out t
if(!rset(v e k HKEY_LOCAL_MACHINE)) end ERR_ADMIN


Messages In This Thread
Popup window open link - by win - 04-20-2018, 06:41 AM
RE: Popup window open link - by Gintaras - 04-20-2018, 08:41 AM
RE: Popup window open link - by win - 04-20-2018, 09:13 AM
RE: Popup window open link - by win - 04-20-2018, 11:36 AM
RE: Popup window open link - by Kevin - 04-20-2018, 04:28 PM
RE: Popup window open link - by win - 04-20-2018, 06:32 PM
RE: Popup window open link - by Kevin - 04-20-2018, 07:19 PM
RE: Popup window open link - by win - 04-20-2018, 08:25 PM
RE: Popup window open link - by win - 04-20-2018, 10:45 PM
RE: Popup window open link - by Kevin - 04-21-2018, 12:09 AM
RE: Popup window open link - by win - 04-21-2018, 03:13 AM
RE: Popup window open link - by Kevin - 04-21-2018, 03:18 AM
RE: Popup window open link - by win - 04-21-2018, 04:33 AM
RE: Popup window open link - by win - 04-21-2018, 05:59 AM
RE: Popup window open link - by Kevin - 04-21-2018, 11:46 PM
RE: Popup window open link - by win - 04-22-2018, 01:58 AM
RE: Popup window open link - by r0n - 04-22-2018, 04:33 PM
RE: Popup window open link - by Kevin - 04-22-2018, 05:39 PM
RE: Popup window open link - by win - 04-22-2018, 10:35 PM
RE: Popup window open link - by Kevin - 04-22-2018, 11:19 PM
RE: Popup window open link - by win - 04-22-2018, 11:24 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)