Page 1 of 1

window minimizes after inputrequester

Posted: Fri Jul 16, 2004 4:10 pm
by localmotion34
after i call the inputrequester to get a string from user entry, and the "ok" button is clicked, my main window is either minimized or sent to the background automatically. and there is nothing i can do to stop it. i tried the API to minimize, maximize, and top-level a window, but it seems after the input requester, manual input is required to bring the main window to the top again.

Code: Select all

date$=FormatDate("%mm/%dd/%yy", Date())  
          workoutdate$=InputRequester("Enter The Date For The Workout","",date$)

if workoutdate$<>""
else
endif 
thats the basic code when the requester is called. any ideas?

Re: window minimizes after inputrequester

Posted: Fri Jul 16, 2004 6:44 pm
by PB
> it seems after the input requester, manual input is required to bring the
> main window to the top again.

This works fine for me (W2K Pro) and doesn't affect my window in any way.
If it also works for you, then clearly something else is at fault (either your
code or OS environment, or perhaps a combination of both).

Code: Select all

If OpenWindow(1,300,250,400,200,#PB_Window_SystemMenu,"Window")
  CreateGadgetList(WindowID())
  ButtonGadget(1,50,50,60,25,"test")
  Repeat
    ev=WaitWindowEvent()
    If ev=#PB_Event_Gadget
      a$=InputRequester("title","message","default")
    EndIf
  Until ev=#PB_EventCloseWindow
EndIf

Posted: Fri Jul 16, 2004 7:25 pm
by Paul
There is a z-order problem with PB windows and Fred is aware of the problem. This IS a bug and Fred has told me he is working on trying to fix it. (I hope there is a fix in the near future)

Posted: Sat Jul 17, 2004 12:09 am
by Dr_Pixel
I've had somewhat similar problems a couple of times, but in my case it has been the PathRequester appearing in back of my program's window(s)

In these cases, clicking on my program's window would give the "error" sound, and pop the PathRequester to the front where it should have been.

Is this related to the same bug?

I've managed to correct them by making changes in my code, doing whatever operation came before the PathRequester in a different way -

but there was really nothing wrong with the original code that I could find.

Posted: Sat Jul 17, 2004 1:02 am
by localmotion34
well this z order problem has created an "f" order problem, namely the order in which a certain word that starts with that letter is yelled by me every other word when i try to fix this. anyone else have an idea?

Posted: Sat Jul 17, 2004 6:07 am
by PB
Localmotion, to bring your window back to the front after using the requester
just call SetForegroundWindow_(WindowID()) and it should do it. Also, did my
example above work properly for you? I'm curious as I've never had this bug
with PureBasic at all.

..

Posted: Sat Jul 17, 2004 6:26 am
by NoahPhense
PB wrote:Localmotion, to bring your window back to the front after using the requester
just call SetForegroundWindow_(WindowID()) and it should do it. Also, did my
example above work properly for you? I'm curious as I've never had this bug
with PureBasic at all.
Your above code works fine for me.. specs below (win2k)

- np