It is currently Sun May 19, 2013 8:23 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 44 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: leave FullScreen with Alt-Tab is not functional?
PostPosted: Sun Mar 14, 2010 3:57 am 
Offline
Addict
Addict
User avatar

Joined: Sun Mar 19, 2006 1:57 pm
Posts: 4835
Location: Germany
I just happen to stumble over a Problem that a Fullscreen does not recover properly after Alt-Tab..
I can leave it, but when i click on the TaskBar Icon it does not recover...
or is it forbidden to test IsScreenActive() twice in one loop?
just a quick question if this issue is known, I will provide a short code producing the problem tomorrow...

_________________
oh... and have a nice day.


Top
 Profile  
 
 Post subject: Re: leave FullScreen with Alt-Tab is not functional?
PostPosted: Sun Mar 14, 2010 9:48 am 
Offline
Enthusiast
Enthusiast

Joined: Thu Aug 30, 2007 11:54 pm
Posts: 442
Location: ger
i have the same problem, but didn't realize it as a possible PB bug
Code:
InitSprite()
InitMouse()
InitKeyboard()
OpenScreen(1024,768,32,"fllscrn")

Repeat
  If IsScreenActive()
    ExamineMouse()
    ExamineKeyboard()
    ClearScreen(0)
    StartDrawing( ScreenOutput() )
      Circle(MouseX(),MouseY(),5,$770000)
    StopDrawing()
  Else
    ReleaseMouse(1)
    Delay(200)
  EndIf
  FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape)


Top
 Profile  
 
 Post subject: Re: leave FullScreen with Alt-Tab is not functional?
PostPosted: Sun Mar 14, 2010 10:18 am 
Offline
Enthusiast
Enthusiast

Joined: Sun Mar 16, 2008 9:18 am
Posts: 469
Confirmed here too. Very strange! I can't even Alt+Tab back to it.


Top
 Profile  
 
 Post subject: Re: leave FullScreen with Alt-Tab is not functional?
PostPosted: Sun Mar 14, 2010 11:30 am 
Offline
Addict
Addict
User avatar

Joined: Sun Mar 19, 2006 1:57 pm
Posts: 4835
Location: Germany
@#NULL
thanks for providing a demo.

yes, I also cannot Alt-Tab back on it, the Cursor on the TaskRow just jumps on to the next task.

I also see that when I reactivate the game task, I hear the "maximize" sound of the desktop,
and then my mouse vanishes and refresh is infunctional
for the top left part of the desktop that has the size of the fullscreen.

tested it with xp-skin support on/off and debugger on/off.

_________________
oh... and have a nice day.


Top
 Profile  
 
 Post subject: Re: leave FullScreen with Alt-Tab is not functional?
PostPosted: Sun Mar 14, 2010 11:57 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat May 17, 2003 11:31 am
Posts: 5808
Browse around, this is a known issue.

If you look through the forum a bit you'll find some solutions. Here's my take on it:

http://www.xs4all.nl/~bluez/purebasic/p ... abbing_out

_________________
( PB5.11 Win7 x64 Dell XPS710 Raid 0 VelociRaptor Intel Q6600 nForce 5 NVidia GTS450 )
( You have two options: psychotherapy, or the PureBasic Survival Guide... )


Top
 Profile  
 
 Post subject: Re: leave FullScreen with Alt-Tab is not functional?
PostPosted: Sun Mar 14, 2010 1:13 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Mar 19, 2006 1:57 pm
Posts: 4835
Location: Germany
well, I ran into it late last night, on the last test before I had to sleep.
so I just dropped a note, also to make me not forget to ask early this morning.

in your guide you only mention the drawing problem... this is not my point.
read the posts carefully again, the problem is that it is IMPOSSIBLE to Tab-In again, no matter drawing or not.

[edit]

I modified #NULL's example to take the drawing out of the loop.
also, I took the ExamineKeyboard out of the If, to make it possible to end the program with ESC when backed in.
you cannot reach the red [X] in the IDE to stop it, because it's beyond the screen area.
Code:
InitSprite()
InitMouse()
InitKeyboard()
OpenScreen(1024,768,32,"fllscrn")

CreateSprite(0, 64,64)
  StartDrawing(SpriteOutput(0))
    Line( 0, 0, 48, 32,$0FF0FF)
    Line( 0, 0, 64, 64,$0FF0FF)
    Line( 0, 0, 32, 48,$0FF0FF)
  StopDrawing()

Repeat
  ExamineKeyboard()
  If IsScreenActive()
    ReleaseMouse(0)
    ExamineMouse()
    ClearScreen(0)
    DisplayTransparentSprite(0,MouseX(),MouseY())
  Else
    ReleaseMouse(1)
    Delay(200)
  EndIf
  FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape)

_________________
oh... and have a nice day.


Last edited by Kaeru Gaman on Sun Mar 14, 2010 1:28 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: leave FullScreen with Alt-Tab is not functional?
PostPosted: Sun Mar 14, 2010 1:28 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 31, 2005 11:09 pm
Posts: 2238
Location: Italy
Try with directx7 as subsystem.

It's a problem with the new dx9 subsystem I believe.

There are work arounds posted, maybe by djes ? I'm not sure.

_________________
[ Home ] [ My PC ] [ New to PB ? ]


Top
 Profile  
 
 Post subject: Re: leave FullScreen with Alt-Tab is not functional?
PostPosted: Sun Mar 14, 2010 1:32 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Mar 19, 2006 1:57 pm
Posts: 4835
Location: Germany
your're right. just tested it with DX7 and it works flawlessly...

*sigh* I have to take a deep thought if I could use DX7 then...
was the AlphaSprite stuff working with DX7?

gna! sometimes this language is no fun anymore...

_________________
oh... and have a nice day.


Top
 Profile  
 
 Post subject: Re: leave FullScreen with Alt-Tab is not functional?
PostPosted: Sun Mar 14, 2010 5:26 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat May 17, 2003 11:31 am
Posts: 5808
If you read through the guide, you may have seen my work around using a maximized windowed screen, which does work with DirectX9. Also, I seem to recall that there was a fix by one of our french members, but it was a little too difficult for me :-)

_________________
( PB5.11 Win7 x64 Dell XPS710 Raid 0 VelociRaptor Intel Q6600 nForce 5 NVidia GTS450 )
( You have two options: psychotherapy, or the PureBasic Survival Guide... )


Top
 Profile  
 
 Post subject: Re: leave FullScreen with Alt-Tab is not functional?
PostPosted: Sun Mar 14, 2010 5:53 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Mar 19, 2006 1:57 pm
Posts: 4835
Location: Germany
I know about the Maximized WindowedScreen. http://www.purebasic.fr/english/viewtopic.php?f=12&t=41174
but this is not the same, since it would have to use the full area of the recent desktop.
a 1024x768 Screen is 4:3, a 1920x1080 Desktop is 16:9. maximizing the screen will squeeze it.

I read the whole paragraph in your guide, and you do not mention the not-tab-in-again-problem.

_________________
oh... and have a nice day.


Top
 Profile  
 
 Post subject: Re: leave FullScreen with Alt-Tab is not functional?
PostPosted: Sun Mar 14, 2010 6:41 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2005 2:46 pm
Posts: 1334
Location: Pas-de-Calais, France
I have posted ten times this question and a possible solution to that. Well, not this time. :evil:

_________________
The Shooting Crew ~> http://www.shootingcrew.com/
Bobble Puzzle, Purebreaker 3 ~> http://djes.free.fr


Top
 Profile  
 
 Post subject: Re: leave FullScreen with Alt-Tab is not functional?
PostPosted: Sun Mar 14, 2010 6:48 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Mar 19, 2006 1:57 pm
Posts: 4835
Location: Germany
what?

_________________
oh... and have a nice day.


Top
 Profile  
 
 Post subject: Re: leave FullScreen with Alt-Tab is not functional?
PostPosted: Sun Mar 14, 2010 6:54 pm 
Offline
PureBasic Bullfrog
PureBasic Bullfrog
User avatar

Joined: Wed Jul 06, 2005 5:42 am
Posts: 6465
I posted a solution using a lowlevel keyboard hook to disable ALT but it no longer works if dx9 is used.

_________________
Veni, vidi, vici.


Top
 Profile  
 
 Post subject: Re: leave FullScreen with Alt-Tab is not functional?
PostPosted: Sun Mar 14, 2010 7:10 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Mar 19, 2006 1:57 pm
Posts: 4835
Location: Germany
netmaestro wrote:
I posted a solution using a lowlevel keyboard hook to disable ALT but it no longer works if dx9 is used.

thanks for the hint, but that is no option at all.
using fullscreen means to me, to be able to tab out of it and back into, and additionally that the game goes to pause mode automatically when you leave.
anyways, when using DX7 the tabbing works.
and the maximized windowedscreen works on both DX.
I maybe come back to the container (where you helped me with the mouse)
or searching for some API stuff to determine Heigth of WindowCaption + Border + Taskbar and offer one size where the Window goes Desktop-fit.


...
if I was in good mood (I'm bloody not) I would've cared which question djes meant.

_________________
oh... and have a nice day.


Top
 Profile  
 
 Post subject: Re: leave FullScreen with Alt-Tab is not functional?
PostPosted: Sun Mar 14, 2010 8:24 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat May 17, 2003 11:31 am
Posts: 5808
Frankly, Kaeru, you seldom seem to be in a good mood. I'd be tempted to suggest another hobby but won't as you seem to be enjoying yourself that much...

_________________
( PB5.11 Win7 x64 Dell XPS710 Raid 0 VelociRaptor Intel Q6600 nForce 5 NVidia GTS450 )
( You have two options: psychotherapy, or the PureBasic Survival Guide... )


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 44 posts ]  Go to page 1, 2, 3  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye