Programmatically Expand or Collapse a sub menu

Does anyone know how to do this on a CMenu object?

I'm working on a RClick feature for a CMenu. I've got to the point now
where, while the menu is displayed, I can Right click on a menu item
then that item will automatically be converted to a SubMenu and the
little arrow on the right side appears - this all happens automatically
while the menu is still displayed.

Problem is that I have to move the mouse over, in order to display the
new submenu. I would like for the submenu to be displayed
automatically, after I've added it.

Is there a hidden method on CMenu that I can't see, or perhaps a
windows message that I can send to something in order to automatically
expand the sub menu?

Thanks in advance for any help

Mike

0
2/22/2006 4:57:31 PM
vc.mfc 33608 articles. 0 followers. Follow

32 Replies
644 Views

Similar Articles

[PageSpeed] 31

>I can Right click on a menu item then that item will automatically be converted to a SubMenu

Just curious, how did you accomplish this since CMenu is derived from
CWnd?

If I am not missing what you are asking, all you need is
CMenu::TrackPopupMenu.

---------
Ajay Kalra
ajaykalra@yahoo.com

0
ajaykalra (6841)
2/22/2006 5:39:33 PM
That would be the obvious answer - so I tried that :-) But it turns out
that TrackPopupMenu fails because I already have a PopupMenu displayed.
THat is the exact behavior that I want so I'm trying a little trick
where I'll dynamically add a submenu to the item that I've Right
clicked on.

0
2/22/2006 6:08:43 PM
How about selecting the menu item programatically. That should pop up
the menu. I dont know the best way to select an item though.

-------
Ajay Kalra
ajaykalra@yahoo.com

0
ajaykalra (6841)
2/22/2006 6:23:26 PM
I never thought of that - it does sound like a good idea, but I'm not
sure I know of a function on CMenu that will do that??

0
2/22/2006 6:38:05 PM
Unfortunately CMenu does not have any method that will let you select
an item. One way would be to move the mouse (SetCursorPos) to the
location of desired item. I still find it hard to believe that this
needs to be done in order to achieve this. It should be straightforward
using TrackPopupMenu etc.

------
Ajay Kalra
ajaykalra@yahoo.com

0
ajaykalra (6841)
2/22/2006 7:19:16 PM
I am a bit lost, but I think I see what you are doing.  You have a menu say
file and under that you have a bunch of items. So you are loading the menu
and then calling TrackPopupMenu. Where you should be getting the submenu
first then calling TrackPopupMenu on that.

CMenu Menu;
Menu.LoadMenu(IDR_MYPOPUPMENU);
CMenu *pSubMenu = Menu.GetSubMenu(0);
pSubMenu->TrackPopupMenu();

AliR.

"Mike Arsenault" <mike.arsenault@ivara.com> wrote in message
news:1140627451.474330.77400@f14g2000cwb.googlegroups.com...
> Does anyone know how to do this on a CMenu object?
>
> I'm working on a RClick feature for a CMenu. I've got to the point now
> where, while the menu is displayed, I can Right click on a menu item
> then that item will automatically be converted to a SubMenu and the
> little arrow on the right side appears - this all happens automatically
> while the menu is still displayed.
>
> Problem is that I have to move the mouse over, in order to display the
> new submenu. I would like for the submenu to be displayed
> automatically, after I've added it.
>
> Is there a hidden method on CMenu that I can't see, or perhaps a
> windows message that I can send to something in order to automatically
> expand the sub menu?
>
> Thanks in advance for any help
>
> Mike
>


0
AliR3470 (3235)
2/22/2006 8:20:46 PM
This works but I think what OP wants is to continue showing the parent
menu of this submenu as well. By calling TrackPopupMenu on
GetSubMenu(0), the parent menu disappears. I am guessing parent menu in
this case is also a popup menu.

------------
Ajay Kalra
ajaykalra@yahoo.com

0
ajaykalra (6841)
2/22/2006 8:27:10 PM
I thought that too, but why would you want to popup a menu and open it's
submenu at the same time?

AliR.

"Ajay Kalra" <ajaykalra@yahoo.com> wrote in message
news:1140640030.447354.194040@o13g2000cwo.googlegroups.com...
> This works but I think what OP wants is to continue showing the parent
> menu of this submenu as well. By calling TrackPopupMenu on
> GetSubMenu(0), the parent menu disappears. I am guessing parent menu in
> this case is also a popup menu.
>
> ------------
> Ajay Kalra
> ajaykalra@yahoo.com
>


0
AliR3470 (3235)
2/22/2006 8:30:25 PM
> why would you want to popup a menu and open it's submenu at the same time?

It does not seem odd to me. Win32 lets you do it. It appears it does
not let you do it programmatically.

----------
Ajay Kalra
ajaykalra@yahoo.com

0
ajaykalra (6841)
2/22/2006 8:38:15 PM
WOW - thanks for all the comments!!

AliR, I have attempted calling TrackPopupMenu, but as I mentioed above,
I get error code 1446 from GetLastError which is
ERROR_POPUP_ALREADY_ACTIVE.

The behavior that I'm trying to emulate is exhibited in IE. Click on
the Favorites menu of IE to display your saved favorites. RIght click
on one of those and, lo and behold, you get a context (popup menu) for
the menu item that you right clicked on.

THis is what I want to do - now I'm aware that the favorites menu on IE
is actually a WIndow that is programmed to look a menu and that is how
it works. If I was given infinte time, then I would probably take this
approach too, but I don't .... so I'm not :-).

I was hoping to take a quick attempt at this by dynamically and
programatically, convert the menu (that I right clicked on) into a sub
menu and <<sort of>> make it look the same.

0
2/22/2006 8:53:06 PM
Actually the part of favorites menu that you are talking about is a
win32 menu. I am guessing MSFT hacked.  But.. you mentioned that you
were able to look for right click on the menu. How did you achieve
that?

--------
Ajay Kalra
ajaykalra@yahoo.com

0
ajaykalra (6841)
2/22/2006 8:57:42 PM
ON My frame class, I've written a handler for the WM_MENURBUTTONUP
message - the wParam is the position of the item Right-clicked on and
the lParam is the handle of the menu containing the item.

ASsuming that I'm able to get anywhere with this, I have to be able to
do the same thing from various popup context menus in out application
as well - I'm not sure if the handler for that case would also be on
the frame or some other location - but I'll cross that bridge when I
get to it.....

Mike

0
2/22/2006 9:04:42 PM
Interesting.. I never thought of doing it this way. Actually a menu is
a special window except that its not exposed directly by MSFT and
surely not in MFC. So if you are able to catch the right click on the
menu  in the frame, its kind of odd.

--------
Ajay Kalra
ajaykalra@yahoo.com

0
ajaykalra (6841)
2/22/2006 9:08:58 PM
I am confused here, when I right click on an item in the favorites in IE, it
opens a popup menu.
Open
Create new folder
Print
-------------------
Make available Offline
-------------------
Send To >
---------------
copy and so on

Am I missing something?

AliR.


"Ajay Kalra" <ajaykalra@yahoo.com> wrote in message
news:1140641862.227826.30750@g47g2000cwa.googlegroups.com...
> Actually the part of favorites menu that you are talking about is a
> win32 menu. I am guessing MSFT hacked.  But.. you mentioned that you
> were able to look for right click on the menu. How did you achieve
> that?
>
> --------
> Ajay Kalra
> ajaykalra@yahoo.com
>


0
AliR3470 (3235)
2/22/2006 9:09:40 PM
What you are saying is correct. How would you do this programmatically?
You have to keep all the menus open. IOW, Favorites pop up menu and the
SendTo popup menu as well.

Perhaps we are now going in different directions.

--------
Ajay Kalra
ajaykalra@yahoo.com

0
ajaykalra (6841)
2/22/2006 9:24:31 PM
Run this right click anywhere inside the dialog box, and then tell me the
difference between what I have and what you want to do.

http://www.learnstar.com/AliR/Rightclickmenu.exe


AliR.

"AliR" <AliR@online.nospam> wrote in message
news:oq4Lf.11358$rL5.3717@newssvr27.news.prodigy.net...
> I am confused here, when I right click on an item in the favorites in IE,
it
> opens a popup menu.
> Open
> Create new folder
> Print
> -------------------
> Make available Offline
> -------------------
> Send To >
> ---------------
> copy and so on
>
> Am I missing something?
>
> AliR.
>
>
> "Ajay Kalra" <ajaykalra@yahoo.com> wrote in message
> news:1140641862.227826.30750@g47g2000cwa.googlegroups.com...
> > Actually the part of favorites menu that you are talking about is a
> > win32 menu. I am guessing MSFT hacked.  But.. you mentioned that you
> > were able to look for right click on the menu. How did you achieve
> > that?
> >
> > --------
> > Ajay Kalra
> > ajaykalra@yahoo.com
> >
>
>


0
AliR3470 (3235)
2/22/2006 9:25:08 PM
Oh I think I am getting it now. You want a popup menu after right clicking a
normal.

Let me think about that for a minute.

AliR.



"Ajay Kalra" <ajaykalra@yahoo.com> wrote in message
news:1140643471.136279.228380@z14g2000cwz.googlegroups.com...
> What you are saying is correct. How would you do this programmatically?
> You have to keep all the menus open. IOW, Favorites pop up menu and the
> SendTo popup menu as well.
>
> Perhaps we are now going in different directions.
>
> --------
> Ajay Kalra
> ajaykalra@yahoo.com
>


0
AliR3470 (3235)
2/22/2006 9:28:35 PM
AliR, Yes that works from the Favorites menu - but try it from the File
menu of IE - you'll notice that it doesn't work there - or even on the
top portion of the Favorites menu - that doesn't work either!! THe same
is true for a menu from the Word application.

I did receive confirmation from someone that the Favorites Menu in IE
is a bit of a special beast - it is a custom window.

Mike

0
2/22/2006 9:32:10 PM
Right clicking simply makes the menu disappear except when you right
click on "has children". From what I understand OP is adding the sub
menu "Has Children" dynamically and would like it to pop up without a
click.

Actually, I am now lost. Also time to go home. I will catch up later at
night.

------
Ajay Kalra
ajaykalra@yahoo.com

0
ajaykalra (6841)
2/22/2006 9:34:21 PM
Doesn't matter any more - Canada just lost the hockey game :-( -
Nothing matters any more, specially CMenu's :-)

0
2/22/2006 9:50:26 PM
Here is what I have so far.  I have a CMenu and I changed it's parent, to
another window that I have control over.  Now I am catching the
WM_MENURBUTTONUP message, there I am tried to do a TrackPopupMenu, but I am
getting an error 1446 (Popup menu already active) If I can find a way around
this, I think the problem will be solved.

AliR.

"Ajay Kalra" <ajaykalra@yahoo.com> wrote in message
news:1140644061.567132.308920@f14g2000cwb.googlegroups.com...
> Right clicking simply makes the menu disappear except when you right
> click on "has children". From what I understand OP is adding the sub
> menu "Has Children" dynamically and would like it to pop up without a
> click.
>
> Actually, I am now lost. Also time to go home. I will catch up later at
> night.
>
> ------
> Ajay Kalra
> ajaykalra@yahoo.com
>


0
AliR3470 (3235)
2/22/2006 10:09:15 PM
Sorry - I just realized that you posted a sample AliR. Thank you!!

I agree with what Ajay said, when right clicking on any action the menu
disappears. I would like it, instead, to popup a context menu.
Obviously click on the left button will and should invoke the menu
action, but the right button should display another menu. 

Mike

0
2/22/2006 10:53:00 PM
On 22 Feb 2006 10:23:26 -0800, Ajay Kalra wrote:

>How about selecting the menu item programatically. That should pop up
>the menu. I dont know the best way to select an item though.

Interesting, I tried WM_MENUCOMMAND and WM_MENUSELECT without luck.
Obviously I couldn't use WM_COMMAND because there's no ID for a popup.

Not a sausage on either one. Tricky.

--
Bob Moore
http://bobmoore.mvps.org/
(this is a non-commercial site and does not accept advertising)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Do not reply via email unless specifically requested to do so.
Unsolicited email is NOT welcome and will go unanswered.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0
Bob
2/22/2006 10:59:34 PM
Problem solved.  I think.

Well I totally missed it in the Doc's for WM_MENURBUTTONUP, you have to call
TrackPopupMenu when the TPM_RECURSE flag.

That did it.

See if you like this, if you do I'll send you the code. Rigth click on the
dialog to get the right click menu, then right click on the menu item.

http://www.learnstar.com/AliR/Rightclickmenu.exe

AliR.

"AliR" <AliR@online.nospam> wrote in message
news:fi5Lf.11387$rL5.3144@newssvr27.news.prodigy.net...
> Here is what I have so far.  I have a CMenu and I changed it's parent, to
> another window that I have control over.  Now I am catching the
> WM_MENURBUTTONUP message, there I am tried to do a TrackPopupMenu, but I
am
> getting an error 1446 (Popup menu already active) If I can find a way
around
> this, I think the problem will be solved.
>
> AliR.
>
> "Ajay Kalra" <ajaykalra@yahoo.com> wrote in message
> news:1140644061.567132.308920@f14g2000cwb.googlegroups.com...
> > Right clicking simply makes the menu disappear except when you right
> > click on "has children". From what I understand OP is adding the sub
> > menu "Has Children" dynamically and would like it to pop up without a
> > click.
> >
> > Actually, I am now lost. Also time to go home. I will catch up later at
> > night.
> >
> > ------
> > Ajay Kalra
> > ajaykalra@yahoo.com
> >
>
>


0
AliR3470 (3235)
2/22/2006 11:06:58 PM
Here is another example this one is an SDI app.  You can open the File menu
and right click on the Menu items to bring up the popup menu.  I have it to
where it will only do it on the file menu. And it also does nothing on the
New command.

http://www.learnstar.com/AliR/SDIPopupMenu.exe

The solution ended up simply being this

LRESULT CMainFrame::OnMenuRButtonUp(WPARAM wParam,LPARAM lParam)
{
   //only do this when the are clicking on the File menu
   CMenu *pMenu = GetMenu();
   ASSERT(pMenu);
   //get the File Menu
   CMenu *pSubMenu = pMenu->GetSubMenu(0);
   if (pSubMenu != NULL && (HMENU)lParam == pSubMenu->GetSafeHmenu())
   {
      //get cursor position, the docs say that wParam should have the point
      //but it doesn't
      CPoint Pt;
      GetCursorPos(&Pt);

      int MenuItem = MenuItemFromPoint(m_hWnd,pSubMenu->m_hMenu,Pt);
      //don't do this for New menu item
      if (MenuItem != 0)
      {
         CMenu Menu;
         Menu.LoadMenu(IDR_MENU2);
         CMenu *pPopupMenu = Menu.GetSubMenu(0);

pPopupMenu->TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_RECURSE,Pt.x,Pt.
y,this);
      }
   }
   return 1;
}

AliR.

"Mike Arsenault" <mike.arsenault@ivara.com> wrote in message
news:1140648780.334991.292260@z14g2000cwz.googlegroups.com...
> Sorry - I just realized that you posted a sample AliR. Thank you!!
>
> I agree with what Ajay said, when right clicking on any action the menu
> disappears. I would like it, instead, to popup a context menu.
> Obviously click on the left button will and should invoke the menu
> action, but the right button should display another menu.
>
> Mike
>


0
AliR3470 (3235)
2/22/2006 11:29:47 PM
I am surprised that this has not been brought up so far. I would have
expected some API which allows menu to be programmatically manipulated
from user interaction point of view.   I am not sure why Win32 does not
expose the window object that contains the menu.

------
Ajay Kalra
ajaykalra@yahoo.com

0
ajaykalra (6841)
2/23/2006 3:09:38 AM
Try TrackPopupMenu with TPM_RECURSE flag.

"Mike Arsenault" <mike.arsenault@ivara.com> wrote in message 
news:1140627451.474330.77400@f14g2000cwb.googlegroups.com...
> Does anyone know how to do this on a CMenu object?
>
> I'm working on a RClick feature for a CMenu. I've got to the point now
> where, while the menu is displayed, I can Right click on a menu item
> then that item will automatically be converted to a SubMenu and the
> little arrow on the right side appears - this all happens automatically
> while the menu is still displayed.
>
> Problem is that I have to move the mouse over, in order to display the
> new submenu. I would like for the submenu to be displayed
> automatically, after I've added it.
>
> Is there a hidden method on CMenu that I can't see, or perhaps a
> windows message that I can send to something in order to automatically
> expand the sub menu?
>
> Thanks in advance for any help
>
> Mike
> 


0
alegr (1130)
2/23/2006 4:00:01 AM
TPM_RECURSE

"Mike Arsenault" <mike.arsenault@ivara.com> wrote in message 
news:1140648780.334991.292260@z14g2000cwz.googlegroups.com...
> Sorry - I just realized that you posted a sample AliR. Thank you!!
>
> I agree with what Ajay said, when right clicking on any action the menu
> disappears. I would like it, instead, to popup a context menu.
> Obviously click on the left button will and should invoke the menu
> action, but the right button should display another menu.
>
> Mike
> 


0
alegr (1130)
2/23/2006 4:00:37 AM
AliR, what can I say!!!! - That is amazing!! - It's funnny that I can't
find any reference to TPM_RECURSE in the help file and very little on
the Web. - I opened up the header file and determined that it's only
supported for WINVER >= 0x5000, which shouldn't be a big issue for us.

Listen, thanks a lot for your perseverence in tackling this problem -
We really appretiate it.

Where are you? Maybe I can buy you a beer someday!!!! :-)

Mike

0
2/23/2006 2:33:50 PM
Excellent.

--------
Ajay Kalra
ajaykalra@yahoo.com

0
ajaykalra (6841)
2/23/2006 2:46:28 PM
I am in Dallas, though I would appreciate a good beer on any day, you don't
really have to do that. I am glad this helped you out.


AliR.

"Mike Arsenault" <mike.arsenault@ivara.com> wrote in message
news:1140705230.804037.200130@z34g2000cwc.googlegroups.com...
> AliR, what can I say!!!! - That is amazing!! - It's funnny that I can't
> find any reference to TPM_RECURSE in the help file and very little on
> the Web. - I opened up the header file and determined that it's only
> supported for WINVER >= 0x5000, which shouldn't be a big issue for us.
>
> Listen, thanks a lot for your perseverence in tackling this problem -
> We really appretiate it.
>
> Where are you? Maybe I can buy you a beer someday!!!! :-)
>
> Mike
>


0
AliR3470 (3235)
2/23/2006 3:46:10 PM
A reference to TPM_RECURSE is somewhat hidden in TrackPopupMenu SDK topic. 
It's not visible at the first sight.

"Mike Arsenault" <mike.arsenault@ivara.com> wrote in message 
news:1140705230.804037.200130@z34g2000cwc.googlegroups.com...
> AliR, what can I say!!!! - That is amazing!! - It's funnny that I can't
> find any reference to TPM_RECURSE in the help file and very little on
> the Web. - I opened up the header file and determined that it's only
> supported for WINVER >= 0x5000, which shouldn't be a big issue for us.
>
> Listen, thanks a lot for your perseverence in tackling this problem -
> We really appretiate it.
>
> Where are you? Maybe I can buy you a beer someday!!!! :-)
>
> Mike
> 


0
alegr (1130)
2/23/2006 4:38:45 PM
Reply:

Similar Artilces:

Putting formulas in Private Sub Worksheet_Change(ByVal Target As Range)
Instead of dragging down your formulas the standard way on the spreadsheet itself. How would you inplement the code in the Worksheet itself. I'd like for... Once A3 has a date input, for all the formulas to be automatically pasted into that same row. Once A4 has a date and so on. "D" thru "K" all have formulas in them. Thanks in advance!! You could do that but might be easier if you use no code at all. In D1:K1 enter =IF($A3="","",your formula) Drag all down as far as you wish. Only have to do this once. Gord Dibben MS Excel MVP On Sun, ...

System Menu for Dialog w/out Caption
Hi I am using a custom dialog w/out caption. I draw the caption in OnPaint with buttons for minimize, maximize and close. Dialog styles have POPUP, Show System Menu and Show in Taskbar set in resource template. Dialog do not have any parent window. On InitDialog I do this SetWindowLong(GetSafeHwnd(),GWL_STYLE,GetWindowLong(GetSafeHwnd(),GWL_STYLE) ^ WS_SYSMENU); CMenu* pSysMenu = GetSystemMenu(FALSE); if (pSysMenu != NULL) { pSysMenu->RemoveMenu(SC_MAXIMIZE,MF_BYCOMMAND); pSysMenu->RemoveMenu(SC_MINIMIZE,MF_BYCOMMAND); pSysMenu->RemoveMenu(SC_RESTORE,MF_BYCOMMAND); ...

Programmatically Minimizing my App?
Hi, How can I programmatically Minimizing my App? Thanks, Scott Metzger Try ::ShowWindow( hWnd, SW_SHOWMINIMIZED /* or SW_FORCEMINIMIZE in W2K & XP */ ); -- Cheers Check Abdoul [ VC++ MVP ] ----------------------------------- "Scott Metzger" <NOSPAMScott.Metzger@york.com> wrote in message news:3F621CDB.2060406@york.com... > Hi, > > How can I programmatically Minimizing my App? > > Thanks, > Scott Metzger > ...

Create Requisitions Programmatically
Hi I need some help creating Requisitions programmatically. Here is the process that we want to follow. 1.. Vendors drop their files in a directory 2.. The program reads the files and performs some validations. 3.. A new Requisition should created automatically Can someone please give me some guidance and where possible some sample code to perform the above. I am strong in .NET development but is a newbie in GP. I have the development environment setup and is going through eConnect documentation. All help is greatly appreciated. TIA walterd ...

Creating popup-menu on the fly
Hello, I'd like to create a popup menu (in a dialog) on the fly. Everythings works fine, but there is one problem, all the items are greyed. What is the reason for this. Here the code-snippets (mfuncMenu and m_contextMenu are Dialog-defined vars of CMenu) In InitDialog: -------------- m_funcMenu.CreatePopupMenu(); m_funcMenu.AppendMenu(MF_STRING, 1, (LPCTSTR) "SubItem1"); m_funcMenu.AppendMenu(MF_STRING, 2, (LPCTSTR) "SubItem2"); m_contextMenu.CreatePopupMenu(); m_contextMenu.AppendMenu(MF_POPUP, (UINT) m_funcMenu.m_hMenu, (LPCTSTR) &...

GP 10 Windows not able to expand
Has anyone had an issue with some of the windows not beign able to be expanded? I have not had any issues on the test environment with 10 no service pack. We did an upgrade for a client and they needed service pack 1 and they have a few windows that can't be expanded. Just wodnering if anyone else has this issue. Thanks -- Tammy Chavez There have always been a few windows that did not expand. One I ran into today in V10 no service pack was the 1099 setup window. -- Richard L. Whaley Author / Consultant / MVP Documentation for Software Users Get our Free Tips and Tricks Newsl...

Sub-categories on the X axis
I am trying to graph data from various schools and want to display data from 2002-03, 2003-04, 2004-05 and so on with the school name under that range of dates. I only want the school name to appear once. The data adjacent to those dates had the school name repeated for each year but when I merge the repeated school names into one field the chart now show only one school name but it is directly under the first data point. I want it to be centered under the dates associated with that particular school. Thanks for your help. What version of Excel? In 97 the behavior was as you describe...

Tab sequence programmatically..
I have a button which added dynamically to a property sheet. Now for setting the tab sequence with this new button, Am using SetWindowPos() method. Now tab sequence is proper. THE PROBLEM IS Through the arrow keys, I could not navigate to the last button for which I called SetWindowPos. where as through tab keys I could go to the last control. I will appreciate ur help in this. DETAILED DESCRIPTION I have three buttons (OK,Cancel, Help)on the property sheet. I added a button "Default" to the property sheet and positioned between Cancel and Help. I set the tab sequence as ...

Combo box in sub-form
To John W Vinson: Any chance of an answer to my previous question, as follows? I really would appreciate your help; you're my last hope! > On Sun, 29 Nov 2009 12:21:01 -0800, Chris <Chris@discussions.microsoft.com> > wrote: > > >I have a Track Artists table with field headings: Track Artist ID, Track > >Artist, Recording ID & Track ID. There are 3 names entered. > >When I click on a Track Artist field in the Sub-forn, a down arrow appears. > >If I click on the arrow a drop-down list appears but it is empty. When I > >double clic...

Menu & Tool bars in outlook
I've added a button to both the global menu bar and application level tool bar. They appear perfectly in IE, but not in Outlook. What have I forgotten? I've got web.config set to: <add key="ISVIntegration" value="All"/> isv.config.xml excerpt: - <ToolBar ValidForCreate="0" ValidForUpdate="1"> <Button Title="Acumen" ToolTip="Acumen Enquiries" Icon="/customicons/ico_statement16x16.gif" Url="http://tnl-chc-crm1:5556/default.aspx" WinMode="0" WinParams="dialogHeight:600px...

How to Lock VBProject Programmatically without SendKeys (Note:- I don't want to Unlock or crack the VBProject. Just want to Lock it Programmatically)
Hi all, I got macro in which I can Lock VBProject with SendKeys. But problem with SendKeys that they not work on every User's Computer and Users can see all the hard work which I put to create my macros. I tried to search for the sultion but I came across with the comments that its not available because of the security issues. Well i want to say that i don't want to Unlock or Cract the VBProject. I just want to Lock it Programmatically. If there is no sultion then its my message to Microsoft that they should at least put this function also that you can secure your Macros o...

Executing sub from form code
I have a userform. On the form I have a button that's named "cmdok". In the form's code I have this sub: Sub cmdok_click() Make_CSVs End Sub Make_CSVs is a sub in one of my modules. My code bombs although I can run Make_CSVs by itself and it runs fine. Can someone tell me what I'm doing wrong? Thx. What does "my code bombs" mean - Do you get a run-time error? A compler error? A crash? Is your Make_CSV's routine started, but something interrupts? Is your Make_CSV's sub in a regular code module (which it should be)? In article <166901c3f...

My file menu is not on the menu bar.
The file menu has mysteriously disappeared from the menu bar in Word 2003 (Student and Teacher edition). Is there any way to get it back? I've tried both View>Toolbars>Customize and Tools>Customize. Karyn, What you say you've tried isn't clear. Have you, in Customize, Toolbars tab, clicked the checkbox in "Worksheet Menu bar?" You want the checkbox, not just a blue selection bar across it. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "karyn slm" <karyn slm@discussions.microsoft.c...

Options Choice in Tools Menu
Word 2003 - The 'Options' choice in the 'Tools' Menu has disappeared. Anyone know how to get it back. I have found an answer for Word 2007 but not Word 2003. Help! See http://word.mvps.org/FAQs/Customization/RestoreMenuCmd.htm -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "tess" <tess@discussions.microsoft.com> wrote in message news:8B21B84A-6F41-4476-B253-57B0C78CA514@microsoft.com... > Word 2003 - The 'Options' choice in the 'Tools' Menu has disappeared. > ...

How to gracefully (programmatically) kill an app?
I have an app that runs 24x7. Occasionally (after a few weeks or so) the main UI thread hangs on an odd machine. I have not been able to duplicate the problem in the lab. As a temporary solution I'm thinking of killing the app when it is detected that the thread is hung. The problem is that I can't find a way of killing it gracefully - i.e. like a task manager. I would not like to see any popups from CRT library or from the OS when the app is killed. I'd appreciate _any_suggestions. thanks, Bogdan PostMessage(hwnd,WM_CLOSE,0,0); This is the simple way to close one ap...

Scrolling to show sub-folders when opening folders
Every other version of Outlook I have had scrolls up or down to show all the subfolders in an opened folder. 2003 is inert. If you open a folder at the bottom of the window, all the subfolders become "visible" off the bottom of the screen, and you have to scroll down manually to find them. When filing 100 or more e-mails per day, this wastes an extraordinary amounbt of time. PLEASE, is there any way to regain the 'auto-scroll-into-visible-window' feature Outlook has always had in the past? ...

save as programmatically
Hello, I am using Visio 2003. And I am opening pre-Visio 2003 documents programmatically. When I save I get prompted with a dialog. How can I stop this? I am doig this programmatically. Why would it be prompting me. Looking at the object browser I see... Save, SaveAs, SaveAsEx. But none seem to have the values I would need. Even SaveAsEx only has these options: visSaveAsRO &H1 The document is saved as read-only. visSaveAsWS &H2 The current workspace is saved with the file. visSaveAsListInMRU &H4 The document is included in the Most Recently Used (MRU) list. By defau...

Pull down menues with automatic values
Well this is my first time here and the first time i have known abou the forum. Im not into Excel as a use on a daily base scenario, but i have got t use it a lot in my University course from now on. Ive been asked to produce a spreadsheet which will allow a user t create their own computer. The user HAS to select certain component like motherboard, hard drive, processor etc. Beside each component there should be a drop down list to give the use a wide choice of products relating to the component, then when the select what they want, the price of that component should show u beside the com...

backgound menu color
In the IE on XP the backgound color of the menu bar has turned black, so i can't read the menu items as they are black text on black backrgound. How ca I resolve this problem? Thank you Zan Pule wrote: > In the IE on XP the backgound color of the menu bar has turned black, > so i can't > read the menu items as they are black text on black backrgound. > How ca I resolve this problem? > > Thank you Display Properties Appearance Advanced Active - and maybe Inctive - Title bar in the "Item" box. -- dadiOH ...

Changing programmatically the color of a row #4
tghcogo Wrote: > once you have the conditional format set correctly all you have to do is > rightclick on the mouse, copy, highlight the destination cells, paste > special, formats. > > Or alternatively double click the "format painter" icon and highlight > the destination cells/rows and leftclick to paste > > tghcogo Very thaks to all! I have already sloved the problem... Thanks for the help :p -- masterx81 ------------------------------------------------------------------------ masterx81's Profile: http://www.excelforum.com/member.php?action...

Open Subform on main menu to show specific date
I have created a menu form which has a subform in it and what I want to do to is the following: When the Main Menu opens I want the subform to open to a specific record. The Main Menu has a field called 'Turnover Date' and so does the sub-form. I want to open the sub-form so that the Turnover Dates match or if there is no matching date in the sub-form then open a blank record for the subform. I know it can be done, I just can not remember how to do it. Any help would be greatly appreciated. Thanks in the subform control within the main form, set the LinkChildFields and LinkMast...

Programmatically Posting a Receipt to the Journal
Hi, I've searched various sources and read endless documentation, but I'm still at a loss of how to solve this one. In essence I require to complete a transaction without any cashier interaction, including posting of the receipt, which is the stumbling block. Programmatically, I can find a select the correct XML template from the database, I can also post 'basic' XML to the journal. The issue is tieing the 2 together, so that the contents of the journal are exactly what the customer would expect from their template. Afaik the journal 'receiptcompressed' field c...

Expand formula in EXCEL
Hi. Is it possible someway to expand a formula in EXCEL downward, (A1--> A100), but the values of cells have to be read from a horizontal line? (That means: A1=B1, A2=C1, A3=D1,…………………….A100=CW1). I try some forms of $A1, A$1, e.g. (expand) but without any result. Thank you. Put in A1 =OFFSET($A$1,,ROW(A1)) then copy downward "?????" <@discussions.microsoft.com> wrote in message news:4FA7B8F6-B6CC-401C-813C-3A5D5B904908@microsoft.com... > Hi. > Is it possible someway to expand a formula in EXCEL downward, (A1--> > A100), > but the values of cells hav...

move a scroll bar programmatically
I have a form that I am doing several things with programmatically to aid the data entry user. The form enters new lines of data automatically in response to user events. The user is taken to a record in a subform where the user needs to enter data. Sometimes, depending on the task and data present, the user is taken to the next to last record; however, the scroll bar stops short and the user thinks this is the last record. I need a way to nudge the scrollbar down a line or two programmatically. Is this possible? Thank you in advance. hollyylloh wrote: >I have a form tha...

Viso save as menu does not contain the file formats shown in help
I need to export my visio drawing to a web page (Visio 2003). Viso Help says to use save as and select an export file type from the file type drop-down list. My visio does not contain any choices other than standard visio formats. What is wrong? Thanks, Keiht Hi Keith, Another option in Visio 2003 to save your drawing as a web page is the Save as Web Page... command on the File menu. Web Page (*.htm, *.html) should be listed as a choice in the Save As dialog in the Save As Type control, and there should be several non-Visio save as file types available in the dialog, as with other...