Controls in non-client areas such as title bars and menus

Forums for specific tips, techniques and example code
gtcp
Posts: 6
Joined: Tue May 18, 2021 6:28 am

Controls in non-client areas such as title bars and menus

Postby gtcp » Wed Feb 23, 2022 10:27 am

The search box shown in the title bar of Office 365 apps is something we'd like to mimic. We'd like to put a control into the title bar or menu bar of an MDI parent form. Big ask? It looks to me like you can do this outside Jade by custom-drawing menus, handling painting and user events, the whole crazy complexity. Has anyone attempted this and survived to tell the tale?

User avatar
BeeJay
Posts: 312
Joined: Tue Jun 30, 2009 2:42 pm
Location: Christchurch, NZ

Re: Controls in non-client areas such as title bars and menus

Postby BeeJay » Fri Feb 25, 2022 11:30 am

I've not tried, but I imagine it will be quite difficult, nigh on impossible, to get this working without assistance from JADE... not to mention handling all the continual repaints of this area generated by Windows. It may be worth a JEDI suggestion for JADE to provide a way to do this in future.

Personally I find that the latest version of Office 365 now has so many controls overlayed into the title bar area it's now difficult to actually find a place to actually grab the title bar to drag that window around the screen or bring that window to the top of the zOrder, etc. It's a step backwards to me to have so much getting in the way of simply wanting to move a window on screen.

Cheers,
BeeJay.

Any thoughts expressed are my own and in no way reflect the views of my employer. If this reply includes any sample code, or other changes such as registry key settings, I believe that this information is accurate and reliable and has been prepared with care but give no guarantee that the sample code or suggested changes will be free of defects or errors. No responsibility or liability, financial or otherwise, is accepted for any consequences arising out of the use of any sample code, registry changes, etc, including loss of profits, indirect, special or consequential losses or damages.

gtcp
Posts: 6
Joined: Tue May 18, 2021 6:28 am

Re: Controls in non-client areas such as title bars and menus

Postby gtcp » Sat Feb 26, 2022 6:58 am

Agreed, looks hard to do properly. We've proven in principle a budget solution, which is to float a borderless form, and programmatically tie it to the main form - reposition it with resize and formMove events, show and hide it with activate and deactivate, etc. It's a cheap and cheerful option.


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 10 guests