windows mode like fullscreen without tittlebar

Started by Santiago, August 09, 2019, 17:36:29

Previous topic - Next topic

Santiago

Hi, I read that you can simulate fullscreen using the window mode. hiding the title bar.

It is not clear to me which of the dll you have to use, or where to get it. Many of the links in the posts are no longer useful.

Do you have to share a link with the info to achieve that modality?

regards

Dabz

#1
From memory, something like this in B+:-


local desktopWidth = gadgetwidth(desktop()), desktopHeight = gadgetheight(desktop())

window=createwindow("Will not be seen",0,0,desktopWidth, desktopHeight,0,0)
canvas=createcanvas(0,0,desktopWidth,desktopHeight,window)
setbuffer canvasbuffer(canvas)
text 0,0,"I love cabbages"
flipcanvas canvas
waitkey


Though I cannot remember if waitkey works with GUI, so it might flash black, then return to the desktop, throw an error or just simply hang... Dunno!

Dabz
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 16Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit

3DzForMe

BLitz3D, IDEal, AGK Studio, BMax, Java Code, Cerberus
Recent Hardware: Dell Laptop
Oldest Hardware: Commodore Amiga 1200 with 1084S Monitor & Blitz Basic 2.1

Dabz

lol, not really, after over a decade and a half using Blitz, you sorta get stuff stuck in there! :D

Dabz
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 16Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit

Santiago

 :o Hi, thanks for the reply, but I couldn't understand how to make the code work, should I have a .dll or something like that?

regards!!!

Dabz

Well, I'm not sure what you are using, that above is for BlitzPlus:-

https://blitzresearch.itch.io/blitzplus

and work straight away.

Though, you should be able to jiggle it for BlitzMax+MaxGUI too, which, again, would work straight away.

If your using Blitz3D, then yes, you will need to use some WinAPI32 functions wrapped up in a DLL, then glue it to B3D with a decls file.

Dabz
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 16Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit

Dabz

#6
Just to help you on your way... If your writing a userlib (DLL) to use in B3D for this, you will need to pass your B3D app window handle (hWnd) to a function in your DLL, to get it, use B3D's SystemProperty() command.

Then in your DLL, use the WinAPI32 function SetWindowLongA:-

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowlonga

e.g. SetWindowLong(hWnd, GWL_STYLE, 0)

The hWnd is the handle B3D passed through, the '0' is basically saying you want no styles (e.g. no title bar, no status bar etc etc)

If you dont know how to write a userlib, check the B3D's userlib folder in its root dir (Source code+decls file), theres an example in there on how to do it, remember though, you will have to compile the DLL yourself.

Dabz

Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 16Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit

Santiago

Hi, thanks Dabz!!

i'm very slow to understand abouts api, dll... but i trying, thanks for the help, and when i make a few step with this info i going to post my results.

thanks!

Dabz

No worries! ;)

Its actually worth delving into WinAPI for a play around, so try and get the userlib example working yourself, then play from there, you'll learn heaps! :)

Dabz
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 16Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit

Dan

#9
This code i'm using for my projects (bb3d).

Basically you need few text files, saved in the user libs folder.

here is a description of how to add the needed decls. (2nd comment)


Function Screen(x,y,full=0)
;full <0 = Fulldesktop, borderless window
;full =0 = Fulldesktop
;full =1 = original x,y
;full >1-5 = x*full,y*full size
;full >5 = 0
DeskX=api_GetSystemMetrics(0)
DeskY=api_GetSystemMetrics(1)
If x>DeskX Then x=DeskX
    If x<64 Then x=64
If y>DeskY Then y=DeskY
    If y<64 Then y=64
    bits=api_GetDeviceCaps(api_GetDC( api_GetDesktopWindow()),12)
Graphics x,y,bits,6
Graphics x,y,bits,7
If full<=0 Or full>5
If full<0 Then api_SetWindowLong(api_GetActiveWindow(), -16, $10000000)
api_MoveWindow(api_GetActiveWindow(),0,0,DeskX,DeskY,True)
    EndIf
If full>1 And full<=5 Then api_MoveWindow(api_GetActiveWindow(),0,0,x*full,y*full,True)
End Function
65536 GOTO Back2Basic