PureBasic 4.5, Ultramon and titlebar-buttons

Working on new editor enhancements?
User avatar
Crusiatus Black
Enthusiast
Enthusiast
Posts: 389
Joined: Mon May 12, 2008 1:25 pm
Location: The Netherlands
Contact:

PureBasic 4.5, Ultramon and titlebar-buttons

Post by Crusiatus Black »

Hey there,

I've recently upgraded to Windows 7 from Windows XP, and I was very pleased, until I
encountered some issues with PureBasic (only PB) and Ultramon. I've got a legit version
of Ultramon and PB installed, however when I enable the titlebar buttons for moving
the window to another window, or maximizing the window to all desktops, the minimize
button sends WM_CLOSE to the window.

Now I've seen threads about this, however I'm wondering if this could be caused by
windows 7. I've never had this issue before on XP, and the PB editor is not the only
one that's being affected by this. Every window created by PureBasic via OpenWindow
does the same thing for me, closing when I'm minimizing it.

Is there a valid explanation for why this only happens with the PB Editor or PB coded apps?
Should I take this up with Ultramon?

I've disabled the 2 titlebar buttons, because I don't need them, so the PB Editor and PB apps
can minimize again. However, I'm wondering if other Windows 7 Professional x86 systems will
do the same with my applications. Well at least I know what to advise to people mailing me with
'Your application closes when I minimize it' :p

Thanks, if this wasn't posted in the right board, excuse me.
Image
Bas Groothedde,
Imagine Programming

I live in a philosophical paradoxal randome filled with enigma's!
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: PureBasic 4.5, Ultramon and titlebar-buttons

Post by blueznl »

Ouch, that's not good. I'm also a (registered) Ultramon user, and things are so much nicer when doing the 'multi monitor ping pong' thing :-)

I haven't been using Win7 on multi monitor setup yet though (still primarily using XP) but when I have some time I see if I suffer the same problem.

Dunno' if any freeware alternative (MultiMon) works on Windows 7 and suffers the same problem, if not you might contact the author of UltraMon, IIRC he fixed some issues with misbehaving software in the past (not implying that PB is misbehaving here :-))
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
Crusiatus Black
Enthusiast
Enthusiast
Posts: 389
Joined: Mon May 12, 2008 1:25 pm
Location: The Netherlands
Contact:

Re: PureBasic 4.5, Ultramon and titlebar-buttons

Post by Crusiatus Black »

Indeed, important stuff on one monitor, other stuff on another monitor, makes working much easier hehe.

I'm going to try to see if the same issue is going to pop up on another system over here, however
I've tried it on a Windows 7 Enterprise x64 system as well, and no issues there. I might contact
him, but it's only (so far) caused when minimizing a PB window/PB app window on 7 Pro x86. Now
in my opinion, that's really weird :p

Thanks! :)
Image
Bas Groothedde,
Imagine Programming

I live in a philosophical paradoxal randome filled with enigma's!
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: PureBasic 4.5, Ultramon and titlebar-buttons

Post by blueznl »

Hey, een echte die-hard gebruikt tenminste twee (22") schermen :-)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
GoodNPlenty
Enthusiast
Enthusiast
Posts: 112
Joined: Wed May 13, 2009 8:38 am
Location: Arizona, USA

Re: PureBasic 4.5, Ultramon and titlebar-buttons

Post by GoodNPlenty »

I am also a registered owner of PB4.51, Ultramon 3.0.10 and Windows 7 x64 Ultimate. When I minimize the PureBasic x86 Editor the minimize button also sends WM_CLOSE to the window. I have not disabled the title bar buttons for moving the window to another window, or maximizing the window to all desktops, since I use that option frequently. Although I do not know this to be a PureBasic issue, but out of the many applications I use PureBasic is the only one to exhibit this problem.
User avatar
Crusiatus Black
Enthusiast
Enthusiast
Posts: 389
Joined: Mon May 12, 2008 1:25 pm
Location: The Netherlands
Contact:

Re: PureBasic 4.5, Ultramon and titlebar-buttons

Post by Crusiatus Black »

And do you use the x64 editor too? Does it happen when you minimize the x64 editor as well?
Image
Bas Groothedde,
Imagine Programming

I live in a philosophical paradoxal randome filled with enigma's!
User avatar
Crusiatus Black
Enthusiast
Enthusiast
Posts: 389
Joined: Mon May 12, 2008 1:25 pm
Location: The Netherlands
Contact:

Re: PureBasic 4.5, Ultramon and titlebar-buttons

Post by Crusiatus Black »

blueznl wrote:Hey, een echte die-hard gebruikt tenminste twee (22") schermen :-)
Precies, maar als je het verschil tussen de groottes van mijn schermen ziet, zie je waarom ik
een tweede nodig heb haha :p Mijn primaire is 17", mijn secundaire is 22" ook haha :p
Image
Bas Groothedde,
Imagine Programming

I live in a philosophical paradoxal randome filled with enigma's!
GoodNPlenty
Enthusiast
Enthusiast
Posts: 112
Joined: Wed May 13, 2009 8:38 am
Location: Arizona, USA

Re: PureBasic 4.5, Ultramon and titlebar-buttons

Post by GoodNPlenty »

Crusiatus Black wrote:And do you use the x64 editor too? Does it happen when you minimize the x64 editor as well?
I have the same problem with the x64 editor as well. I have been creating an additional un saved PureBasic document in the editor with one line so that when I minimize it will ask if I want to save before closing PureBasic and I can click 'Cancel'. This will save me from reloading PureBasic each time. Not a good solution, but it at least reminds me that PureBasic is closing.
User avatar
Crusiatus Black
Enthusiast
Enthusiast
Posts: 389
Joined: Mon May 12, 2008 1:25 pm
Location: The Netherlands
Contact:

Re: PureBasic 4.5, Ultramon and titlebar-buttons

Post by Crusiatus Black »

GoodNPlenty wrote:
Crusiatus Black wrote:And do you use the x64 editor too? Does it happen when you minimize the x64 editor as well?
I have the same problem with the x64 editor as well. I have been creating an additional un saved PureBasic document in the editor with one line so that when I minimize it will ask if I want to save before closing PureBasic and I can click 'Cancel'. This will save me from reloading PureBasic each time. Not a good solution, but it at least reminds me that PureBasic is closing.
That's exactly what I did before I found out that disabling the titlebar buttons completely solves
the weird behaviour, keeping the additional ultramon menu-entries does not cause this issue, so
you could use those for switching monitors.
Image
Bas Groothedde,
Imagine Programming

I live in a philosophical paradoxal randome filled with enigma's!
GoodNPlenty
Enthusiast
Enthusiast
Posts: 112
Joined: Wed May 13, 2009 8:38 am
Location: Arizona, USA

Re: PureBasic 4.5, Ultramon and titlebar-buttons

Post by GoodNPlenty »

Crusiatus Black wrote:
GoodNPlenty wrote:
Crusiatus Black wrote:And do you use the x64 editor too? Does it happen when you minimize the x64 editor as well?
I have the same problem with the x64 editor as well. I have been creating an additional un saved PureBasic document in the editor with one line so that when I minimize it will ask if I want to save before closing PureBasic and I can click 'Cancel'. This will save me from reloading PureBasic each time. Not a good solution, but it at least reminds me that PureBasic is closing.
That's exactly what I did before I found out that disabling the titlebar buttons completely solves
the weird behaviour, keeping the additional ultramon menu-entries does not cause this issue, so
you could use those for switching monitors.
That works great, just need some time to get used to using the menu. :D
User avatar
Crusiatus Black
Enthusiast
Enthusiast
Posts: 389
Joined: Mon May 12, 2008 1:25 pm
Location: The Netherlands
Contact:

Re: PureBasic 4.5, Ultramon and titlebar-buttons

Post by Crusiatus Black »

Haha same here, took me a bit, but at least nothing closes without my permission any more :p
Image
Bas Groothedde,
Imagine Programming

I live in a philosophical paradoxal randome filled with enigma's!
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: PureBasic 4.5, Ultramon and titlebar-buttons

Post by blueznl »

DId you contact UltraMon's author yet?
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
GoodNPlenty
Enthusiast
Enthusiast
Posts: 112
Joined: Wed May 13, 2009 8:38 am
Location: Arizona, USA

Re: PureBasic 4.5, Ultramon and titlebar-buttons

Post by GoodNPlenty »

blueznl wrote:DId you contact UltraMon's author yet?
I sent an email to 'support@realtimesoft.com' with a link to this post asking for their help in resolving this issue with the PureBasic x86 / x64 editor and UltraMon. I will post any reply that I receive.
User avatar
Crusiatus Black
Enthusiast
Enthusiast
Posts: 389
Joined: Mon May 12, 2008 1:25 pm
Location: The Netherlands
Contact:

Re: PureBasic 4.5, Ultramon and titlebar-buttons

Post by Crusiatus Black »

GoodNPlenty wrote:
blueznl wrote:DId you contact UltraMon's author yet?
I sent an email to 'support@realtimesoft.com' with a link to this post asking for their help in resolving this issue with the PureBasic x86 / x64 editor and UltraMon. I will post any reply that I receive.
Thanks! :)
Image
Bas Groothedde,
Imagine Programming

I live in a philosophical paradoxal randome filled with enigma's!
GoodNPlenty
Enthusiast
Enthusiast
Posts: 112
Joined: Wed May 13, 2009 8:38 am
Location: Arizona, USA

Re: PureBasic 4.5, Ultramon and titlebar-buttons

Post by GoodNPlenty »

I received the prompt response below from Realtime Soft support and it fixes the problem for me. I somehow overlooked the compatibility tab. :D

I've been able to reproduce the issue, as a workaround go to UltraMon Options > Compatibility and configure custom settings for PureBasic, then select the 'use alternative method to add window buttons' option.

Here's what happens: when you minimize PureBasic, UltraMon removes the window buttons by posting WM_CLOSE to the button window. By default UltraMon creates the window for the buttons in the application process, meaning that the message loop of the application gets the posted message. Usually a message loop will forward all messages to the associated window procedure, but if the application doesn't do this and instead processes the WM_CLOSE message directly, this could cause the behavior you're seeing.

Using the alternative window buttons fixes the problem because the button window is created in the UltraMon process instead of the application process.
Post Reply