Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

full screen

jmloriot
Einsteiger
1.287Aufrufe

Full screen:

How can the program run automatically in full screen ?

I wrote the following :

status=getwindowconfig(wc)

ecranx=wc.numxpixels

ecrany=wc.numypixels

wc.numtextcols=-1

wc.numtextrows=-1

wc.numcolors=-1

wc.title='my program'

wc.fontsize=-1

status=setwindowconfig(wc)

call setviewport(0,0,int2(ecranx),int2(ecrany))

winfo.type=qwin$max

i = SETWSIZEQQ(0, winfo)

n=initializefonts()

i=setfont('n1')

i=setbkcolorrgb(rgbtointeger(0,0,100)) ! blue

i=setcolorrgb(rgbtointeger(200,200,0)) ! yellow

call clearscreen($gclearscreen)

Then I have to click to VIEW-FULL SCREEN (or to hit Alt-Enter) to go to full screen. How can the program do it ?

Then, when on full screen and when I hit ESC to get out of it, on Windows 7, it does not display the actual screen but the previous one. The program is on the actual screen as it responds correctly when I hit any key. It did not do that on Windows XP. How can I get rid of that previous screen on W7 ?

Thanks in advance.

0 Kudos
8 Antworten
anthonyrichards
Neuer Beitragender III
1.287Aufrufe
You could try this:

hWnd=GETHWNDQQ(IUNIT) ! Get a Windows handle to the window you want to maximise
iret=SendMessage(hWnd, WM_SYSCOMMAND, SC_MAXIMIZE,0,0)

On Windows 7 64-bit, define hWnd as HANDLE so that it is assigned 8 bytes rather than the default 4 bytes on 32-bit Windows
jmloriot
Einsteiger
1.287Aufrufe

Hello Anthonyrichards,

I did test the 5 following codes :

iunit = GETACTIVEQQ( )

hWnd=GETHWNDQQ(iunit) ! Get a Windows handle to the window you want to maximise

iret=SendMessage(hWnd, WM_SYSCOMMAND, SC_MAXIMIZE,0)

hWnd=GETHWNDQQ(QWIN$FRAMEWINDOW ) ! Get a Windows handle to the window you want to maximise

iret=SendMessage(hWnd, WM_SYSCOMMAND, SC_MAXIMIZE,0)

hWnd=GETHWNDQQ(0) ! Get a Windows handle to the window you want to maximise

iret=SendMessage(hWnd, WM_SYSCOMMAND, SC_MAXIMIZE,0)

i = INQFOCUSQQ (iunit)

hWnd=GETHWNDQQ(iunit) ! Get a Windows handle to the window you want to maximise

iret=SendMessage(hWnd, WM_SYSCOMMAND, SC_MAXIMIZE,0)

OPEN (UNIT = 10, FILE = 'USER', IOFOCUS = .TRUE.)

iret = SETACTIVEQQ (10)

hWnd=GETHWNDQQ(10) ! Get a Windows handle to the window you want to maximise

iret=SendMessage(hWnd, WM_SYSCOMMAND, SC_MAXIMIZE,0)

The 4 first ones do not seem to have any effect, the 5th one reduces the window to approx. one third of the screen.

Can you help me more ?

Which library can be used to get the handle type ?

Thanks in advance

jmloriot
Einsteiger
1.287Aufrufe

Hello Anthonyrichards,

I did test the 5 following codes :

iunit = GETACTIVEQQ( )

hWnd=GETHWNDQQ(iunit) ! Get a Windows handle to the window you want to maximise

iret=SendMessage(hWnd, WM_SYSCOMMAND, SC_MAXIMIZE,0)

hWnd=GETHWNDQQ(QWIN$FRAMEWINDOW ) ! Get a Windows handle to the window you want to maximise

iret=SendMessage(hWnd, WM_SYSCOMMAND, SC_MAXIMIZE,0)

hWnd=GETHWNDQQ(0) ! Get a Windows handle to the window you want to maximise

iret=SendMessage(hWnd, WM_SYSCOMMAND, SC_MAXIMIZE,0)

i = INQFOCUSQQ (iunit)

hWnd=GETHWNDQQ(iunit) ! Get a Windows handle to the window you want to maximise

iret=SendMessage(hWnd, WM_SYSCOMMAND, SC_MAXIMIZE,0)

OPEN (UNIT = 10, FILE = 'USER', IOFOCUS = .TRUE.)

iret = SETACTIVEQQ (10)

hWnd=GETHWNDQQ(10) ! Get a Windows handle to the window you want to maximise

iret=SendMessage(hWnd, WM_SYSCOMMAND, SC_MAXIMIZE,0)

The 4 first ones do not seem to have any effect, the 5th one reduces the window to approx. one third of the screen.

Can you help me more ?

Which library can be used to get the handle type ?

Thanks in advance

anthonyrichards
Neuer Beitragender III
1.287Aufrufe
It looks like you have shown that it will only work with the active window.
And probably the window will only maximize within the present size of the frame window, so you need to maximize the frame window first if you want to maximize your child windows within it.
You probably cannot full-screen a quickwin window.
Steven_L_Intel1
Mitarbeiter
1.287Aufrufe
Would building as a "Standard Graphics" application work? This gives you a full screen without a menu.
jmloriot
Einsteiger
1.287Aufrufe

Yes ! a Standard Graphic application starts on FULL SCREEN (Exactly what I need).

But then the input from the keyboard does not work. I use a function I got from the PeekApp sample :

open(unit, file='user')

do

j = focusqq(unit)

r = incharqq()

call EnterCriticalSection( loc(DrawLock) )

!insert the character

bufput = IAND(bufput + 1,16#000000FF)

if(bufput .eq. bufget) then

CALL BEEPQQ(4000,500)

bufput = IAND(bufput - 1,16#000000FF)

else

buffer(bufput) = r

endif

! release the buffer

call LeaveCriticalSection( loc(DrawLock) )

end do

I guess I have to change the "file='user'" ?

Steven_L_Intel1
Mitarbeiter
1.287Aufrufe
I think so - don't open the unit and just use unit 5.
jmloriot
Einsteiger
1.287Aufrufe
It does work
Thanks a lot
Antworten