Displaying an icon/image in a menu Displaying an icon/image in a menu efrain (Programmer) (OP) 11 Aug 99 01:24 I am a student and was curious if there is a way to place an image next to a menu selection. I know that the check mark can be placed rather easily but is there a way to place an image or an icon? RE: Displaying an icon/image in a menu chiph (Programmer) 11 Aug 99 13:23 It's possible to add graphics to menus, using Win32 API calls, but it's a tad messy. See Daniel Appleman's book about the Win32 API for VB programmers. A 'must-have' book in any case. Look up "Owner-draw". The other way to do it (and much easier, IMO), is to use an OCX that does it for you. I've used the ActiveBar control from Data Dynamics with good results. You can have menus, toolbars, button bars, a bunch of stuff. There are likely many other controls with similar functionality out there. Take a look at http://www.vbxtras.com, they sell a lot of different controls. Chip H. RE: Displaying an icon/image in a menu bigfoot (Programmer) 23 Aug 99 14:48 ActiveBar Rules!!! for doing what you want to do, and many other tasks. RE: Displaying an icon/image in a menu MikeLacey (MIS) 24 Aug 99 03:57 <grin> I'm sure that Data Dynamics are a fine company - that there are *many* fine companies that produce controls for the MS Visual environments - but bear this in mind. When you upgrade to the next version of VB - the MS controls get upgraded automatically and the third party ones do not. This doesn't sound like a big deal - and it isn't until you have to do it on an application with a large number of 3rd party controls and then it's hard (and boring) work that means working with the text versions of your forms. I suggest you think carefully before you use 3rd party controls. Regards Mike --- Mike_Lacey@Cargill.Com RE: Displaying an icon/image in a menu Alt255 (Programmer) 24 Aug 99 05:12 The third party controls are fantastic. You can save yourself hours and hours of development time by filling your forms with these artful doo-dads. Just click&drag to give your app functionality. And they make upgrading the VB version a rewarding, educational experience. A few months ago my company asked me to convert a large VB2 application to VB6 and write some routines to make it HP3000 friendly. "No problem," I thought, "most of the code is already written and in working order." In my opinion, Mike Lacey didn't state the case with accuracy. The work wasn't HARD (torture with red-hot pokers springs to mind). The work certainly wasn't BORING (I had a lot of people breathing down my neck while making all sorts of usefull suggestions). In the end, only the "intention" of the original application remained. Hundreds a asprins after I took on the project, I understand the procedure for upgrading such an app; study the logic, make notes on the interface, click on the folder containing the originals and press the delete key. Every company should have a strongly-worded section in their manual discouraging the use of the third-party controls. The convenience you gain today will be a royal pain-in-the-arse for some poor sap a few years from now. RE: Displaying an icon/image in a menu bitbrain (Programmer) 24 Aug 99 07:55 Is there a happy middle ground? (regarding third party controls). How about sticking with mainstream/reliable vendors? I converted a VB3 app. to VB5 and was able to find OCX versions of the VBX's without TOO much difficulty. RE: Displaying an icon/image in a menu MikeLacey (MIS) 24 Aug 99 10:26 It's your decision - and your ass. <grin> I can't make my advice any clearer without using unladylike language. Mike --- Mike_Lacey@Cargill.Com RE: Displaying an icon/image in a menu bigfoot (Programmer) 25 Aug 99 09:18 Any control, no matter if you create it yourself or purchase it is gonna be a pain in the... I have 15 sites, each with 5 to 20 PC's with my program on them, and I just found a bug in one of my "home built" controls. Or maybe I get an update from one of my vender build controls. MS in their infident wisdom says you can't replace the control - you have to do an install i.e. unregister/register the new control. What a pain!!!! I want the old days back when the entire program lives in one directory, and you can upgrade by direct replacement. RE: Displaying an icon/image in a menu MikeLacey (MIS) 26 Aug 99 06:34 those were the days.... RE: Displaying an icon/image in a menu MikeLacey (MIS) 26 Aug 99 06:36 P.S. Can't you just do this? regsvr32 /u yourcontrol.ocx copy newone.ocx c:\win\system32 regsvr32 newone.ocx RE: Displaying an icon/image in a menu bigfoot (Programmer) 26 Aug 99 08:49 Yeah, but I have to be on site. We do most of our upgrading by NT RAS, over the phone line. RE: Displaying an icon/image in a menu chiph (Programmer) 26 Aug 99 09:13 Oops. Looks like I opened a big can o' worms here. When I said that I had had good results with ActiveBar, I meant it. What I didn't say was that we'd gone through nearly every other menu/toolbar control on the market before deciding they all suck or majorly suck for one reason or another, and that ActiveBar was the best available for us and our products. Our general policy is to depend on a very few, very good controls. The rest we write ourselves. Some of the third-party stuff we encapsulate in our own controls (depends on the license, and whether it'll work encapsulated). That way we control the programming interface that's visible to the rest of our code, in case we have to swap out controls at a future date. Chip H.