Page 1 of 1

OpenFileRequester ?

Posted: Thu May 29, 2003 7:08 pm
by TerryHough
Is it possible to specify where the OpenFileRequester dialog appears on the screen?

TIA,
Terry

Posted: Fri May 30, 2003 7:46 pm
by Justin
No, windows chooses the place. your only chance is to build a custom dialog.

Posted: Sat May 31, 2003 12:21 pm
by PB
> windows chooses the place

Actually, it opens it based on where your app's current window is located.
Thus, just open another window first, and then use OpenFileRequester.

Here is a crude example which shows how to open the requester at any
of the four corners of the screen:

Code: Select all

If OpenWindow(0,300,250,400,200,#PB_Window_SystemMenu,"Main App Window")
  CreateGadgetList(WindowID())
  ButtonGadget(1,20,50,250,25,"Click to open file requester at top-left of screen")
  Repeat
    ev=WindowEvent()
    If ev=#PB_EventGadget
      OpenWindow(1,-9999,-9999,0,0,0,"Temp Hidden Window") ; Opens at top-left.
      ;OpenWindow(1,9999,-9999,0,0,0,"Temp Hidden Window") ; Opens at top-right.
      ;OpenWindow(1,9999,9999,0,0,0,"Temp Hidden Window") ; Opens at bottom-right.
      ;OpenWindow(1,-9999,9999,0,0,0,"Temp Hidden Window") ; Opens at bottom-left.
      OpenFileRequester("title","","*.*",0)
      CloseWindow(1)
    EndIf
  Until ev=#PB_EventCloseWindow
EndIf

Posted: Sun Jun 01, 2003 5:26 pm
by TronDoc
nice tip..thanks!
Joe