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 / Window without borders - help needed urgently!

Author
Message
marvin944
12
Years of Service
User Offline
Joined: 27th Aug 2013
Location:
Posted: 27th Aug 2013 09:49
Hi everyone!

I need to have a full screen program, but due to the fact that I have multimonitor screens and the other one has something else to show, I cannot use set window off. As soon as I click in the non-dbpro part of the screen, it crashes. I can create a window and move it up and left a little to obscure the borders (and make it slightly wider), but the bottom of the window cnnot be extended beyond the screen height! Any idea how to solve this? I desperately need help!

Dutch
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 27th Aug 2013 11:56
Get rid of your commands where you set window on or off.

Just use the "Set Display Mode" command.

In the editor, before you compile you should see a left hand menu. It's to the left of the window where all your code is typed and displayed.

Go to the "Properties" tab. Select "fulldesktop" under screen type.

If you decide you want to have your program use both of your monitors then the "Set Display Mode" command has a multi-monitor option. Check the help section to learn more if so.

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 27th Aug 2013 12:27 Edited at: 27th Aug 2013 12:29
You can also just clip the mouse to your application:



Original solution was by WickedX in this thread: http://forum.thegamecreators.com/?m=forum_view&t=202232&b=1

TheComet

marvin944
12
Years of Service
User Offline
Joined: 27th Aug 2013
Location:
Posted: 27th Aug 2013 23:01
Thanks for the quick reply guys! I like your tips, unfortunately I need the mouse to be clicked on the second screen, so clipping it is not useful in this case (but good to know this trick).

Mage's tip looks very promising (will try in the morning), I overlooked these settings completely. If this still enables one full screen on monitor one and a clickable screen on monitor 2 I owe him a serious amount of beer... (or whatever you like to drink).

Is there a way to conrol on what screen the desktop appears or is this always the main screen?

Dutch
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 28th Aug 2013 01:33
Quote: "Is there a way to conrol on what screen the desktop appears or is this always the main screen?"

That is controlled by the operating system. So either windows or your video drivers should have a method of controlling this. The program can in many cases be moved between the screens, probably by right clicking on the app in the taskbar. You may need to alt-tab to make the taskbar visible.

Burning Feet Man
18
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 28th Aug 2013 08:15 Edited at: 28th Aug 2013 08:22
To display a DBPro app on a second screen, the below works for my dual monitor setup at work;



The command of interest is "SetWindowPos", more information here;

http://msdn.microsoft.com/en-us/library/windows/desktop/ms633545%28v=vs.85%29.aspx


The horizontal position (where I've written "-260") is an Integer, postive & negative numbers are used here. Zero is the left side of my primary monitor, negative one is the right side of my secondary monitor, which sits to the left of my primary monitor.

For the record, I turned off Window borders & buttons on one of my DBpro projects, and I use User32 calls to make my own buttons & grab zones (such as when I grab then drag the application window). You can also configure your application to run "always ontop" and in a full screen window too by using User32 calls. But make a note that I also had to re-write my entire Mouse detection procedure to call User32.DLL so that mouse detection worked well with these screen/window commands too (you'll need to track the mouse cursor relative to the desktop to get some of this stuff working, along with clicks that occur outside of the DBPro window, and User32.DLL is one way of achieving this).

Hopefully I've helped with part of your problem.

EXTRA BROWNIE POINTS: Who knows how to stop a DBPro application from crashing when the application window is resized to a bigger size than the primary monitor resolution?

Cheers,
BFM

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
marvin944
12
Years of Service
User Offline
Joined: 27th Aug 2013
Location:
Posted: 28th Aug 2013 10:17
Mage, Comet, BFM please give me your PayPal email address in a PM if you have one, you definitely deserve my thanks! Its good to have such experts at hand!

BFM, unfortunately that SetWindowPos does not work with desktop setting, but I have an extensive list of USER32 calls, so I might use those later. I had no idea it was that simple to use with DBpro! Thanks!

Dutch
Burning Feet Man
18
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 28th Aug 2013 13:54
I'm facing my own programmatic problems just like yours. I'm not seeking or asking for money, and would rather solutions to my never ending list of programmatic problems that need solving!

If by "Desktop setting", you mean the DBPro "Project Setting Compile/Display" mode, you're right in that it doesn't work and the application crashes. But if you think about what a "Desktop" sized application is... if you;

Disable the DBPro application border
Disable the DBPro applications windows Minimize/Maximise/Close buttons
Force the DBPro Application Z-Order to the top
Position the DBPro application to 0,0
Set the DBPro application window size to the primary monitors resolution

... You have a full screen application. And all of these techniques do work with the DBPro Project Setting is set to "Windowed" mode.

Now the only bug I have with the above ideas (and they're not just ideas, I have written a working example of what I've described above), is that DBpro applications crash when a DBPro App Window size larger than the primary monitors resolution by 1 pixel. It's most annoying and I'm still reading up on how to fix this very issue. But all of the above works using only calls to Windows DLL's and Matrix1 Utilites.

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
marvin944
12
Years of Service
User Offline
Joined: 27th Aug 2013
Location:
Posted: 28th Aug 2013 23:34
Well, I wasn't talking serious money anyway, just a token of gratitude . Can I make you guys happy with the latest Humble Bundle?

Dutch
Burning Feet Man
18
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 29th Aug 2013 08:01
EA games? EeeewwwWW!

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 29th Aug 2013 12:10
Quote: "Well, I wasn't talking serious money anyway, just a token of gratitude . Can I make you guys happy with the latest Humble Bundle?"


It's quite alright, marvin944. We know that feeling of being helped ourselves, and knowing one can rely on receiving help in a give-and-take community is the real reward.

TheComet

Login to post a reply

Server time is: 2026-07-07 05:39:00
Your offset time is: 2026-07-07 05:39:00