Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - click to drag?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

click to drag?

 Post Reply Post Reply
Author
Message
shipwreck View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 April 2008
Location: United States
Status: Offline
Points: 308
Post Options Post Options   Thanks (0) Thanks(0)   Quote shipwreck Quote  Post ReplyReply Direct Link To This Post Topic: click to drag?
    Posted: 26 November 2013 at 1:17am
Hi all

I'm looking to use  "header bars" in my application that already uses the Commandbars.

FYI, header bar means you essentially combine the main toolbar with the top of the Window frame.

EXAMPLE:


To begin this process, one must remove the border of the form. This still leaves the Commandbars entact. here's the problem. How do I make it to where lets say the user clicks to drag the header bar to move the app? is it possible? If so, could you tell me how it could be done? Maybe point me in the right direction? If it isn't possible using these controls, then please let me know so I don't waste to much time on it. Thanks!

I'm using CJ 15.3.1 on VB6 SP6.
Product: Xtreme Suite Pro (Active-X), Version 15.3.1

Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit)

Language: Visual Basic 6.0 SP6
Back to Top
Willowmaster View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 July 2010
Location: Netherlands
Status: Offline
Points: 180
Post Options Post Options   Thanks (0) Thanks(0)   Quote Willowmaster Quote  Post ReplyReply Direct Link To This Post Posted: 27 November 2013 at 4:02am
I have read this 4 times now but I don't understand what try to do. Can you make a sample project that I can run?
Product: Xtreme SuitePro (ActiveX) version 15.3.1

Platform: Windows XP (32bit) - SP 3 (on VMWare)

Language: Visual Basic 6.0



Back to Top
Phrediac View Drop Down
Groupie
Groupie


Joined: 10 March 2010
Location: South Africa
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Phrediac Quote  Post ReplyReply Direct Link To This Post Posted: 27 November 2013 at 9:13am

I assume you are using a parent container to house your header control.  If so you could put your CommandBar in a container and place that in the header container.  That way any clicks on the header can be captured and processed while those on the CommandBar are assumed to be for it.  

You will have to take care of moving and resizing the container control but the CommandBar will take care of itself once you've set it to resize to its parent.

ActiveX 16.2.6
VB6 SP6
Win 7 (x64) Pro
Back to Top
shipwreck View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 April 2008
Location: United States
Status: Offline
Points: 308
Post Options Post Options   Thanks (0) Thanks(0)   Quote shipwreck Quote  Post ReplyReply Direct Link To This Post Posted: 27 November 2013 at 7:35pm
I'm trying to use the commandbar, a regular commandbar (not the ribbon), as the title bar of the window, and drag it around only with the command bar, since it would be functioning as the title bar.

And if I was able to make a sample project of this, I wouldn't really need to ask for help now would I? Hehe. :p 

lol
Product: Xtreme Suite Pro (Active-X), Version 15.3.1

Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit)

Language: Visual Basic 6.0 SP6
Back to Top
shipwreck View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 April 2008
Location: United States
Status: Offline
Points: 308
Post Options Post Options   Thanks (0) Thanks(0)   Quote shipwreck Quote  Post ReplyReply Direct Link To This Post Posted: 02 December 2013 at 9:29am
Either I'm not understanding you correctly, or we have a miscommunication here.

Using a container, and then placing the Commandbar inside would only do one thing and that is define the title bar space. Sure, with some code I can easily manipulate the container to function as the titlebar, but clicking on the commandbar to have it function as the titlebar is what I'm trying to get at here. I'll try to post some better examples in my next post. :)
Product: Xtreme Suite Pro (Active-X), Version 15.3.1

Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit)

Language: Visual Basic 6.0 SP6
Back to Top
shipwreck View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 April 2008
Location: United States
Status: Offline
Points: 308
Post Options Post Options   Thanks (0) Thanks(0)   Quote shipwreck Quote  Post ReplyReply Direct Link To This Post Posted: 02 December 2013 at 9:48am
Alright, the picture below is of the normal titlebar

NORMAL TITLE BAR



Look familiar? I hope so. :p At any rate, see how the main toolbar is separate from the top window frame AKA the title bar? 
Product: Xtreme Suite Pro (Active-X), Version 15.3.1

Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit)

Language: Visual Basic 6.0 SP6
Back to Top
shipwreck View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 April 2008
Location: United States
Status: Offline
Points: 308
Post Options Post Options   Thanks (0) Thanks(0)   Quote shipwreck Quote  Post ReplyReply Direct Link To This Post Posted: 02 December 2013 at 9:53am
Coming up, the newer "Header Bar" option

HEADER BAR


This style is a modern UI modification that has been catching on amongst my fellow developers and I was wondering if the GUI was possible using the Commandbars (and/or other controls) from our CodeJock Suite?

See how the close and maximize buttons, along with the caption, and essentially joined the together with the main toolbar and it's content? This allows more screen room as well as a simple, clean, and more efficient yet minimal interface option.

And no, it doesn't have to match exactly to this. in fact, it can be different so long as the concept remains the same. Caption bar functionality within the toolbar while the toolbar serves as the caption and top title bar simultaneously.
Product: Xtreme Suite Pro (Active-X), Version 15.3.1

Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit)

Language: Visual Basic 6.0 SP6
Back to Top
shipwreck View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 April 2008
Location: United States
Status: Offline
Points: 308
Post Options Post Options   Thanks (0) Thanks(0)   Quote shipwreck Quote  Post ReplyReply Direct Link To This Post Posted: 02 December 2013 at 10:02am
The adoption of Gtk’s new HeaderBar widget concept and style.

This is a major departure from the way window controls and window titles have appeared for years on any platform.

Whether we're talking about tiny 10" displays or giant 32" displays, I aim to make the best possible use of screen real estate. Combining the Titlebar and Toolbar into a single widget or bar saves precious vertical pixels that could be better used to show more important content.

Even though I'm saving vertical space, we're actually able to increase the amount of space around Tool items. And by moving window controls into the same line as Tool items, I decrease the chance for misclicks by placing them farther away from each other.

Traditionally, every window comes with a title calling out the name of the app that’s open. For some apps, I use this space to call out important information such as the name of the file that is currently open. However, for a lot of apps, this title doesn’t add value to what’s displayed on screen. When you open up a music player , you can tell that it’s the music player because of the layout of the controls and the content that is displayed. In this case, the title is simply visual noise that makes it more difficult to focus on other more important information (like the currently playing song).
Product: Xtreme Suite Pro (Active-X), Version 15.3.1

Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit)

Language: Visual Basic 6.0 SP6
Back to Top
Willowmaster View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 July 2010
Location: Netherlands
Status: Offline
Points: 180
Post Options Post Options   Thanks (0) Thanks(0)   Quote Willowmaster Quote  Post ReplyReply Direct Link To This Post Posted: 04 December 2013 at 6:04am

Private Sub CommandBars1_Resize()
Dim lngLeft As Long
Dim lngTop As Long
Dim lngRight As Long
Dim lngBottom As Long
        Call CommandBars1.ActiveMenuBar.GetWindowRect(lngLeft, lngTop, lngRight, lngBottom)
        Me.Move lngLeft, lngTop
End Sub


Is this what you are looking for?
Product: Xtreme SuitePro (ActiveX) version 15.3.1

Platform: Windows XP (32bit) - SP 3 (on VMWare)

Language: Visual Basic 6.0



Back to Top
shipwreck View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 April 2008
Location: United States
Status: Offline
Points: 308
Post Options Post Options   Thanks (0) Thanks(0)   Quote shipwreck Quote  Post ReplyReply Direct Link To This Post Posted: 04 December 2013 at 3:42pm
You know, that actually may be it. I'll let you know ASAP
Product: Xtreme Suite Pro (Active-X), Version 15.3.1

Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit)

Language: Visual Basic 6.0 SP6
Back to Top
rmcmanamy View Drop Down
Groupie
Groupie


Joined: 02 September 2009
Status: Offline
Points: 54
Post Options Post Options   Thanks (0) Thanks(0)   Quote rmcmanamy Quote  Post ReplyReply Direct Link To This Post Posted: 02 April 2015 at 8:05pm
Has anyone ever solved this?  This is really a great idea especially for apps on Tablets.
Product: Xtreme SuitePro (ActiveX Unicode) version 22.0.0

Platform: Windows 11 (64bit)

Language: Visual Basic 6.0

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.145 seconds.