Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Disable Minimize and Maximize?

Author
Message
Mugen Wizardry
User Banned
Posted: 18th Dec 2010 15:28
Hi all, I have found a MAJOR crash glitch when the program window is clicked out of. When you click anywhere out of the program window, DBPro crashes it. So I came up with a way around that. I would like to disable the Minimize and Maximize button on my windowed mode program.

I looked online and discovered a VB.Net code that allows for this, and I tried to convert it, but it won't work right.

Here's the code:



Here's the VB.Net script:



CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 18th Dec 2010 16:06
Why don't you just fix the crash instead of denying your program basic window functionality?

Mugen Wizardry
User Banned
Posted: 18th Dec 2010 16:18
Because it's an internal error caused by DBPro.

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
=PRoF=
23
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 18th Dec 2010 17:29 Edited at: 18th Dec 2010 17:33
So make a neat snippet which causes the crash and post it in the bug forum? It won't get fixed if Lee doesn't know about it.

>Edit<
I just checked how I do it in BMFC, and I have the following code



But I think these are commands from the BlueGUI plugin.

sladeiw
17
Years of Service
User Offline
Joined: 16th May 2009
Location: UK
Posted: 18th Dec 2010 18:28 Edited at: 18th Dec 2010 18:28
Quote: "But I think these are commands from the BlueGUI plugin."


They are added commands from Humanoid's version, but really Mad Nightmare is right. If your app is crashing when it loses focus, then there are plenty of ways to force that even if you disable minimise/restore. Better to fix the actual problem if at all possible. Can you post a snippet that reproduces the bug?
Mugen Wizardry
User Banned
Posted: 18th Dec 2010 18:44 Edited at: 18th Dec 2010 18:46
No, I cannot. Because that would be giving out the source to my whole program and I don't want that, and I CANNOT reproduce the error in dbpro without my project.

I CAN however have someone bug report once I release my program to the public

So that is why I simply for now want to delete the minimize and maximize buttons.

The window doesn't move anywhere anyway in windowed mode

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
=PRoF=
23
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 18th Dec 2010 19:00 Edited at: 18th Dec 2010 19:00
If you can't reproduce the error without your project, that makes me think the error is in your code, and not DBP.

Mugen Wizardry
User Banned
Posted: 18th Dec 2010 19:34
Here's a SORTA working version of the VB Code.

For some reason, it's doing NOTHING.



CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
Mugen Wizardry
User Banned
Posted: 18th Dec 2010 19:59


Here's a disable code I found on the forum that I edited to be a function Enjoy!

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 18th Dec 2010 21:58
Quote: "Here's a disable code I found on the forum that I edited to be a function"


That must have been tough work :/ Who is the original code by?

Mugen Wizardry
User Banned
Posted: 18th Dec 2010 22:07
No idea man. It didn't have a name in the header o.o

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
Sven B
21
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 18th Dec 2010 22:22
Ah well, still useful. Added it to my useful snippets database after altering it a bit.



Still, I don't think it's a good idea to resort to this if your program isn't working. If your program crashes without DBP giving an error, then it probably means you're making DBP do something it isn't designed to do.
Using DLL calls the wrong way is but an example.

Sven B

Login to post a reply

Server time is: 2026-07-21 07:03:49
Your offset time is: 2026-07-21 07:03:49