Print Page | Close Window

How to popup a MiniToolBar on a screen?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=17863
Printed Date: 06 October 2024 at 3:20am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to popup a MiniToolBar on a screen?
Posted By: Jebo
Subject: How to popup a MiniToolBar on a screen?
Date Posted: 10 February 2011 at 12:44pm
How do I popup a MiniToolBar on a specific screen-position?

For example: This will not work: oMiniToolbar.PopupMiniToolBar , 1600, 1600

So do I need a special Flag or any else???


-------------
[Sig removed by Admin: Signature can't exceed 40GB]



Replies:
Posted By: Jebo
Date Posted: 11 February 2011 at 11:22am
Hello Support? Disapprove

I've also opened a Support-ticket - but no respose at all...


-------------
[Sig removed by Admin: Signature can't exceed 40GB]


Posted By: Xander75
Date Posted: 14 February 2011 at 3:54am
Hi Jebo,

I have attached a small sample of how to create a ToolBar that starts in a floating position and can be positioned anywhere on screen as you require. I have created 4 TextBoxes and on GotFocus of each box the ToolBar will position itself above the selected control.



Sample: uploads/2960/ToolBar_Popup.rar - uploads/2960/ToolBar_Popup.rar

Is this what you're looking for?



-------------
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)


Posted By: Jebo
Date Posted: 14 February 2011 at 6:16am
Thank you! But what I mean is a really "Minitoolbar" (without a caption!) not a popupform!

>> Dim oMyMiniToolbar As MiniToolBar



-------------
[Sig removed by Admin: Signature can't exceed 40GB]


Posted By: Xander75
Date Posted: 14 February 2011 at 6:34am
Hi,

Sorry about that, I have never used the MiniToolBar before.

I have created a new sample project for you to test out.



Sample: uploads/2960/MiniToolBar_Popup.rar - uploads/2960/MiniToolBar_Popup.rar


-------------
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)


Posted By: Xander75
Date Posted: 14 February 2011 at 8:12am
Hi,

Can I ask what you intend to use the MiniToolBar for?

The reason I ask is that it is specifically designed for Formatting text a user has highlighted.

Link: http://office.microsoft.com/en-us/word-help/add-formatting-to-your-document-by-using-the-mini-toolbar-HA010173624.aspx - http://office.microsoft.com/en-us/word-help/add-formatting-to-your-document-by-using-the-mini-toolbar-HA010173624.aspx

If this is not what you are what to use it for then it won't work for you as it's desgined to appear when a user has highlighted text to give them required options, which means the users mouse is close by the XY co-cordinates.

If you are looking for different functionality then I believe you may have to stick with the first sample I posted, which is to create a Floating CommandBar ToolBar.

Sorry if I have not helped.


-------------
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)


Posted By: Jebo
Date Posted: 14 February 2011 at 9:10am
Hi,

what I want is this: http://forum.codejock.com/forum_posts.asp?TID=17845&title=how-to-setfocus-to-a-combobox - http://forum.codejock.com/forum_posts.asp?TID=17845&title=how-to-setfocus-to-a-combobox

But this is also not possible because of a BUG or any else. So I was looking for a workaround...

My idea was now, to hide the minitoolbar and show it  immediately again on exacvtly the same screen-position like before. But now, with focused cursor inside the ComboBox!


-------------
[Sig removed by Admin: Signature can't exceed 40GB]


Posted By: Xander75
Date Posted: 14 February 2011 at 9:25am
Ah ok,

Well like I said the MiniToolBar is designed to be used for formatting highlighted text. But with a little workaround you can programmtically reposition the Mouse Cursor to any location on screen just before you display the MiniToolBar! Therefore the MiniToolBar should gain focus Wink


Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long

' Add the code below to your event to show the MiniToolBar
SetCursorPos 100, 100
oMiniToolbar.PopupMiniToolBar , 1600, 1600



-------------
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)


Posted By: Jebo
Date Posted: 14 February 2011 at 9:43am
> SetCursorPos 100, 100
This "solution" I was allready last friday checked. The problem is here, that the mouse pointer will move without the users will "like from a ghost hand" .

This irritate the user and is too much dirty coding. Disapprove

*hope you do understand what I mean (because my bad english!)


-------------
[Sig removed by Admin: Signature can't exceed 40GB]


Posted By: Xander75
Date Posted: 14 February 2011 at 9:48am
This is why I think the MiniToolBar will not work for you in this instance!

What you need is the floating CommandBar ToolBar instead which is in the first post. If the issue is due to the other post forum_posts.asp?TID=17845&title=how-to-setfocus-to-a-combobox - http://forum.codejock.com/forum_posts.asp?TID=17845&title=how-to-setfocus-to-a-combobox

Then why not instead of using the Codejock xtpControlComboBox ComboBox why not use a VB.Combobox and link this into the Toolbar.


Dim custControl As CommandBarControlCustom

Set custControl = ToolBar.Controls.Add(xtpControlCustom, ID_TOOLBAR_COMBO, vbNullString)
custControl.Handle = cboCombo.hWnd


That way you have access to all the events like SetFocus etc!


-------------
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net