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 / BBB Gui , disable "close" in window

Author
Message
Guido Italy
19
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 19th Aug 2014 11:55
Hi ,

how do to disable the button "close" (X),
leaving only "minimize" (-) button in a window?
Guido Italy
19
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 20th Aug 2014 14:44
Ri hello !

Any idea ???
Rudolpho
19
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 20th Aug 2014 15:45
I've never used BBB GUI, but assuming you can get a window handle from it something like this might work:



"Why do programmers get Halloween and Christmas mixed up?"
Guido Italy
19
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 20th Aug 2014 16:17
Thank you, Rudolpho !

I have not explained well, sorry ... (for my bad english ... )

I do not have to remove "X" from the window of DBPro,

I have to create a window in BBBGui and that window must have only the button "_" And the "Maximize" button,
but should not have button "Close" ("X")

Lilttle example :

sync on : sync rate 0
set window on
BBB App_Start
dbpro_w=BBB App_GetDbproWindow()
BBB App_SetMainWindow dbpro_w
ThisWindow=BBB Window_Make(50,50,300,300,"Standard window",dbpro_w, WS_OVERLAPPEDWINDOW)

Only "ThisWindow" must have only the button "_" And the "Maximize", but should not have to "Close" ("X")

Thank you Guido .
Rudolpho
19
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 20th Aug 2014 16:33
Yes, I imagined that.
You just have to use a different hwnd, it *might* be as simple as using your "ThisWindow" variable instead of my "hwnd" one. If that doesn't work, you should take a look through the documentation for BBB GUI to see if it contains any function that will return a window handle.


"Why do programmers get Halloween and Christmas mixed up?"
Guido Italy
19
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 20th Aug 2014 16:36
OK!
I look, I try, and then I write to you, Thank you!
Guido Italy
19
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 20th Aug 2014 16:44
Unfortunately, the function removes all button

( not only "Close" )
Guido Italy
19
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 20th Aug 2014 16:55
If you find a solution'll watch your post tonight, Thanks!
Rudolpho
19
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 20th Aug 2014 17:53
You cannot remove the close button alone, but you can disable it:



"Why do programmers get Halloween and Christmas mixed up?"
Guido Italy
19
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 20th Aug 2014 21:19
Perfect !!!! Thank !!!!!!!

Login to post a reply

Server time is: 2025-05-14 17:01:26
Your offset time is: 2025-05-14 17:01:26