It is currently Sat Jan 23, 2021 2:29 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: #PB_Window_WindowCentered problem on x64 compiler
PostPosted: Wed Oct 14, 2020 3:42 pm 
Offline
User
User
User avatar

Joined: Fri Jan 20, 2012 3:40 pm
Posts: 45
Location: SE England
If you have a multiple monitor setup and compile the following code. On x86, the child window opens in the middle of the main window wherever it is placed on either desktop. If you compile it on the x64 compiler, it will open the child window on the center of the main window on the first desktop but if you move it to the second, it will open the child window on the edge of the first desktop.

Code:
Enumeration
  #MAIN
  #CHILD
  #BUTTON
EndEnumeration

OpenWindow(#MAIN, #PB_Ignore, #PB_Ignore, 500, 500, "Parent", #PB_Window_SystemMenu | #PB_Window_ScreenCentered )

ButtonGadget(#BUTTON,100,100,300,300,"Press Me!")

exit=#False
Repeat
  event=WaitWindowEvent(20)
  If EventGadget()=#BUTTON
    OpenWindow(#CHILD, #PB_Ignore, #PB_Ignore, 100, 100, "Child",  #PB_Window_SystemMenu | #PB_Window_WindowCentered , WindowID(#MAIN))
  EndIf
 
  If EventWindow()=main
    If event=#PB_Event_CloseWindow
      exit=#True
    EndIf
  EndIf
Until exit


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 7 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