Page 1 of 1
#PB_Event_MaximizeWindow not received
Posted: Fri Apr 19, 2013 3:32 pm
by IdeasVacuum
Has anyone else found this? Running some PB4.61 code in PB5.11 (x86).
In a loop or callback, WaitWindowEvent(), #PB_Event_MaximizeWindow is never received?
Re: #PB_Event_MaximizeWindow not received
Posted: Wed Apr 24, 2013 7:39 am
by netmaestro
I hacked up this little test, it seems to show that in PB 5.11 x86 running under Windows 7 SP1 the events are being sent correctly:
Code: Select all
OpenWindow(0,0,0,320,240,"",#PB_Window_MaximizeGadget)
Repeat
ev = WaitWindowEvent()
Select ev
Case #PB_Event_MaximizeWindow
Debug "I just maximized"
Case #PB_Event_RestoreWindow
Debug "I just restored"
EndSelect
Until ev = #PB_Event_CloseWindow
Re: #PB_Event_MaximizeWindow not received
Posted: Mon Apr 29, 2013 10:52 am
by IdeasVacuum
Hi Netmaestro
That is very similar to my own test. It does work without issue 99.9% of the time, but for some unknown reason, at sometime, it will fail. I wondering if a multi-monitor setup has something to do with it, but since it is very rare I don't think I'm going to track-down the cause of the fault.
Re: #PB_Event_MaximizeWindow not received
Posted: Mon Apr 29, 2013 11:08 am
by luis
So in the first post you say a PB event is never received and after you get a reply based on that assumption you say it does actually work without issues 99.9% of the time.
Re: #PB_Event_MaximizeWindow not received
Posted: Mon Apr 29, 2013 11:38 am
by MachineCode
I think his second post is referring to NM's code, not his own code from his first post. That's how I read it, anyway.
IdeasVacuum has been here long enough to know to post some snippet code showing the problem, too.

Re: #PB_Event_MaximizeWindow not received
Posted: Mon Apr 29, 2013 11:58 am
by luis
MachineCode wrote:I think his second post is referring to NM's code, not his own code from his first post. That's how I read it, anyway.
I understand, thank you. I interpreted the other way but I could be wrong, probably it's the constant influx of wrong stimulus from the coding questions section.
On a second thought I still have some doubts on your interpretation though....
IdeasVacuum wrote: ... since it is very rare I don't think I'm going to track-down the cause of the fault.
uhmm... I don't think he will be so dismissive if it's very rare with netmaestro's code but happens everytime in his own code
But again the "very rare" could be referred not to the problem but to the availability of a multi monitor configuration.
And in that case would be okay to NEVER get the pb event ?
Anyway, IF I was wrong my apologies to ideasvacuum about this. If not ...
In general I think a guide on how to make a question the proper way could be nice, even if it will be end up probably unread like the other stickies (or the manual itself), as demonstrated here daily. It's so depressing, for me at least, how people often make questions showing a total disregard for other people time and a blatant lack of efforts on their part.
Or maybe it's just plain ignorance on the matter and a lack of experience, in that case a guide would help and fill the void where common sense should be.
At least showing you are doing your best instead of being lazy would be enough. After that, anyone can make an honest mistake or simply being tired. That's not the point.
Re: #PB_Event_MaximizeWindow not received
Posted: Mon Apr 29, 2013 2:26 pm
by IdeasVacuum
To be clear:
The occurence of the issue is very rare. I can't post a code snippet that demonstrates a fault that occurs once in a blue moon, so I posed the question to see if anyone else, by chance, had noticed the same thing. That's it, nothing more nothing less, because you never know, someone may have discovered that it only occurs on days that end in 'y'.
Edit: Once the problem occurs, it requires the app to be re-launched to get things back to normal.
Re: #PB_Event_MaximizeWindow not received
Posted: Tue Apr 30, 2013 8:45 am
by MachineCode
IdeasVacuum wrote:I can't post a code snippet that demonstrates a fault that occurs once in a blue moon
Therefore, it sounds like a program flow or coding issue. Sorry!
Re: #PB_Event_MaximizeWindow not received
Posted: Sun May 05, 2013 8:24 pm
by IdeasVacuum
Therefore, it sounds like a program flow or coding issue. Sorry!
Why would you think that? The code snippet (netmaestro) could not be much more simple. I think it might be that the events are being interrupted by something 'external'. I have checked my machine as thoroughly as possible for a virus (though of course, an Anti-virus app could equally be the culprit). It could be another app that is running at the same time, including one of a handful of my own apps. It could be CachemanXP. There are a lot of possibilities but the fault does not occur often enough to narrow things down.
Re: #PB_Event_MaximizeWindow not received
Posted: Sun May 05, 2013 9:28 pm
by BorisTheOld
IdeasVacuum wrote:Edit: Once the problem occurs, it requires the app to be re-launched to get things back to normal.
And that's the clue!
Something, most likely the OS, but it could be PB, has got its control blocks out of sync with reality.
I'm currently running Linux Mint 14, and once every few days a tab on a Firefox panel will sometimes render with a dark background. And then, just as mysteriously, it will render correctly a few minutes later. I've also had an application, unchanged for many years, sometimes lock up during the spring on a particular machine.
In large imperfectly written systems, with many hardware and software elements running asynchronously, its guaranteed that these sort of things will happen. Some people attribute strange happenings to Chaos Theory, but in reality there is some small detail in the Universe that someone overlooked.
Ignore it and it will eventually go away when something gets upgraded or replaced, or when a butterfly in the Amazon flaps its wings.
Re: #PB_Event_MaximizeWindow not received
Posted: Mon May 06, 2013 10:28 am
by IdeasVacuum
when a butterfly in the Amazon flaps its wings
Wait a minute - instead of being the cure, that butterfly could be the cause! I'm booking a flight to the Amazon....
