ICONICO

Discussion Thread

UniToolbox

Message Thread

Developer ComponentFor WindowsUniToolbox

UniToolbox iconThe leading control suite for Unicode development in Visual Basic.

Posted in the UniToolbox Forum.




Popup menu sample code?

Hi,

Currently evaluating the product...do you have any sample code for how to create popup menus? Something more substantial than what is in the FAQ?

Thanks
by Potential Buyer on Apr 14 2009 10:24am Reply

Popup menu sample code?

Yes we have a bunch of demo apps:
http://www.iconico.com/Un...oApps.aspx
by Nico Westerdale on Apr 14 2009 12:12pm Reply

Popup menu sample code?

Great stuff!

Thanks!
by Potential Buyer on Apr 14 2009 3:41pm Reply

Popup menu sample code?

OK, one question....

I downloaded the sample menu application and it works just as expected.

However, when I try to write similar code in my application I get a compile error on the

Set o = .add("PopUp")

line in the InitializeMenus routine. Says that "add" isn't a method of the object.

What am I missing? I added the module-wide variables at the top and the UniMenu1 control to my form.

There must be something else...

Thanks
by Potential Buyer on Apr 14 2009 4:55pm Reply

Popup menu sample code?

hard for me to say without seeing your project! I'd try starting at the demo project and modifying it.
by Nico Westerdale on Apr 14 2009 4:57pm Reply

Popup menu sample code?

Got it...

Had to declare my variables as:

Private mobjMenuSetA As UniToolbox2.Menus

instead of

Private mobjMenuSetA As Menus

Thanks!
by Potential Buyer on Apr 14 2009 5:42pm Reply

Popup menu sample code?

One more question...

Is there a known issue with showing a MsgBox in the click event of a popup menu?

For example - in the sample app above I changed the

Debug.Print "UniMenu1_MenuClick() --", Menu.Caption

to

MsgBox "UniMenu1_MenuClick() --" & Menu.Caption

The popup menu then gets "stuck" in the top part of the form where the "traditional" menu bar goes.

Is there a workaround for this?

Thanks
by Potential Buyer on Apr 15 2009 12:52pm Reply

Popup menu sample code?

Yes this is a bug and the workaround is to use a Timer with a tiny delay, this will sort out the rendering problem.
by Nico Westerdale on Apr 15 2009 12:56pm Reply

Popup menu sample code?

OK. Before or after the MsgBox. Got a sample?

Thanks for all your help with this, BTW.
by Potential Buyer on Apr 15 2009 1:04pm Reply

Popup menu sample code?

On the menu click start a timer. When the timer completes open the MsgBox.
by Nico Westerdale on Apr 15 2009 1:07pm Reply

Popup menu sample code?

Still not getting it. Not sure how the Timer control can "delay" it like that.

I used..

Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

..but still no dice.
by Potential Buyer on Apr 15 2009 1:22pm Reply

Popup menu sample code?

No don't use Sleep use a Timer.

On the menu click enable the Timer, and then when it fires show the MsgBox.
by Nico Westerdale on Apr 15 2009 1:23pm Reply

Popup menu sample code?

Got it. Had my Timer interval set to 0...

Need more coffee...

Thanks again!
by Potential Buyer on Apr 15 2009 1:29pm Reply

Our Software Stores

IconicoAccurate Design and Development Software

BitsDuJourDiscount Deal Coupons for Windows and Mac Software Apps

Our Software Services

IcoBlogOur Official Blog

© copyright 2004-2024 Iconico, Inc. Code & Design. All Rights Reserved. Terms & Conditions Privacy Policy Terms of Use Login