User Tools

Site Tools


setting_20the_20position_20of_20the_20file_20open_20dialogue

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

setting_20the_20position_20of_20the_20file_20open_20dialogue [2018/03/31 14:19]
127.0.0.1 external edit
setting_20the_20position_20of_20the_20file_20open_20dialogue [2018/04/15 18:28] (current)
richardrussell Added syntax highlighting
Line 1: Line 1:
 =====Setting the position of the File Open dialogue===== =====Setting the position of the File Open dialogue=====
  
-//by Richard Russell, February 2016//\\ \\  The [[http://www.bbcbasic.co.uk/bbcwin/manual/bbcwine.html#opensave|File Open (and File Save) dialogues]] open, by default, at a position on the screen determined by Windows. Whilst this will almost always be satisfactory, there may very occasionally be a requirement to position the dialogue box at specific coordinates. This may be achieved using the code below:\\ \\ +//by Richard Russell, February 2016//\\ \\  The [[http://www.bbcbasic.co.uk/bbcwin/manual/bbcwine.html#opensave|File Open (and File Save) dialogues]] open, by default, at a position on the screen determined by Windows. Whilst this will almost always be satisfactory, there may very occasionally be a requirement to position the dialogue box at specific coordinates. This may be achieved using the code below: 
 + 
 +<code bb4w>
         INSTALL @lib$+"CALLBACK" : REM Must be version 2.0 or later         INSTALL @lib$+"CALLBACK" : REM Must be version 2.0 or later
  
Line 43: Line 45:
         SYS "SetWindowPos",hdlg%,0,xOFN%,yOFN%,0,0,SWP_NOSIZE OR SWP_NOZORDER         SYS "SetWindowPos",hdlg%,0,xOFN%,yOFN%,0,0,SWP_NOSIZE OR SWP_NOZORDER
         = 0         = 0
 +</code>
 +
 The **xOFN%** and **yOFN%** global variables determine the position at which the dialogue box opens.\\ \\  Unfortunately a side-effect is that the appearance of the dialogue will change from the 'modern' style to the 'classic' style, because Windows assumes that the HookProc is possibly being used to customise the layout. The **xOFN%** and **yOFN%** global variables determine the position at which the dialogue box opens.\\ \\  Unfortunately a side-effect is that the appearance of the dialogue will change from the 'modern' style to the 'classic' style, because Windows assumes that the HookProc is possibly being used to customise the layout.
setting_20the_20position_20of_20the_20file_20open_20dialogue.1522502381.txt.gz · Last modified: 2018/03/31 14:19 by 127.0.0.1