I have a usercontrol in which the IDE generated context menu statement is:
Friend WithEvents ContextMenuThumbnails As System.Windows.Forms.ContextMenu
I want to save the contents of it so I tried:
Private mMenuSaved As ContextMenu = Me.ContextMenuThumbnails.clonemenu
But the compiler says:
C:\Documents and Settings\Cal\My Documents\Visual Studio Projects\CAG
Studio\CAG ControlThumbnails\ControlThumbnails.vb(531):
'System.Windows.Forms.Menu.Protected Sub CloneMenu(menuSrc As
System.Windows.Forms.Menu)' is not accessible in this context because it is
'Protected'.
Is there a way to get around this?
Thanks 7 1618
Hi,
have you tried:
Private mMenuSaved As New ContextMenu
mMenuSaved = Me.ContextMenuThumbnails
Hth Greetz Peter
--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning.
" **Developer**" <RE*************@a-znet.com> schreef in bericht
news:Ol**************@TK2MSFTNGP12.phx.gbl... I have a usercontrol in which the IDE generated context menu statement is:
Friend WithEvents ContextMenuThumbnails As
System.Windows.Forms.ContextMenu
I want to save the contents of it so I tried: Private mMenuSaved As ContextMenu = Me.ContextMenuThumbnails.clonemenu But the compiler says:
C:\Documents and Settings\Cal\My Documents\Visual Studio Projects\CAG Studio\CAG ControlThumbnails\ControlThumbnails.vb(531): 'System.Windows.Forms.Menu.Protected Sub CloneMenu(menuSrc As System.Windows.Forms.Menu)' is not accessible in this context because it
is 'Protected'.
Is there a way to get around this?
Thanks
Seems to me that would:
1) Define a new variable mMenuSaved
2) Instantiate a new ContextMenu and reference it in mMenuSaved
3)Then replace that reference with a reference to the present
ContextMenuThumbnails
That is, the end result will be a new reference to the present
ContextMenuThumbnails.
I'm not very knowadgeable about these things so I'm not sure and would like
comments, that is, either confirmation, correction, or denial or the above.
Thanks
"Peter Proost" <pp*****@nospam.hotmail.com> wrote in message
news:uy*************@tk2msftngp13.phx.gbl... Hi,
have you tried:
Private mMenuSaved As New ContextMenu mMenuSaved = Me.ContextMenuThumbnails
Hth Greetz Peter
-- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
" **Developer**" <RE*************@a-znet.com> schreef in bericht news:Ol**************@TK2MSFTNGP12.phx.gbl... I have a usercontrol in which the IDE generated context menu statement is:
Friend WithEvents ContextMenuThumbnails As System.Windows.Forms.ContextMenu
I want to save the contents of it so I tried: Private mMenuSaved As ContextMenu = Me.ContextMenuThumbnails.clonemenu But the compiler says:
C:\Documents and Settings\Cal\My Documents\Visual Studio Projects\CAG Studio\CAG ControlThumbnails\ControlThumbnails.vb(531): 'System.Windows.Forms.Menu.Protected Sub CloneMenu(menuSrc As System.Windows.Forms.Menu)' is not accessible in this context because it
is 'Protected'.
Is there a way to get around this?
Thanks
What exactly do you mean with I want to save the contents of it in your first post
Greetz Peter
--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning.
" **Developer**" <RE*************@a-znet.com> schreef in bericht
news:uL**************@tk2msftngp13.phx.gbl... Seems to me that would: 1) Define a new variable mMenuSaved 2) Instantiate a new ContextMenu and reference it in mMenuSaved 3)Then replace that reference with a reference to the present ContextMenuThumbnails
That is, the end result will be a new reference to the present ContextMenuThumbnails.
I'm not very knowadgeable about these things so I'm not sure and would
like comments, that is, either confirmation, correction, or denial or the
above. Thanks
"Peter Proost" <pp*****@nospam.hotmail.com> wrote in message news:uy*************@tk2msftngp13.phx.gbl... Hi,
have you tried:
Private mMenuSaved As New ContextMenu mMenuSaved = Me.ContextMenuThumbnails
Hth Greetz Peter
-- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to
produce bigger and better idiots. So far, the Universe is winning.
" **Developer**" <RE*************@a-znet.com> schreef in bericht news:Ol**************@TK2MSFTNGP12.phx.gbl... I have a usercontrol in which the IDE generated context menu statement is:
Friend WithEvents ContextMenuThumbnails As System.Windows.Forms.ContextMenu
I want to save the contents of it so I tried: Private mMenuSaved As ContextMenu = Me.ContextMenuThumbnails.clonemenu But the compiler says:
C:\Documents and Settings\Cal\My Documents\Visual Studio Projects\CAG Studio\CAG ControlThumbnails\ControlThumbnails.vb(531): 'System.Windows.Forms.Menu.Protected Sub CloneMenu(menuSrc As System.Windows.Forms.Menu)' is not accessible in this context because
it is 'Protected'.
Is there a way to get around this?
Thanks
Did you mean to send this to someone else?
I don't see I want to save the contents of it in your first post
in my post.
"Peter Proost" <pp*****@nospam.hotmail.com> wrote in message
news:uc**************@TK2MSFTNGP15.phx.gbl... What exactly do you mean with
I want to save the contents of it in your first post
Greetz Peter
-- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
" **Developer**" <RE*************@a-znet.com> schreef in bericht news:uL**************@tk2msftngp13.phx.gbl... Seems to me that would: 1) Define a new variable mMenuSaved 2) Instantiate a new ContextMenu and reference it in mMenuSaved 3)Then replace that reference with a reference to the present ContextMenuThumbnails
That is, the end result will be a new reference to the present ContextMenuThumbnails.
I'm not very knowadgeable about these things so I'm not sure and would like comments, that is, either confirmation, correction, or denial or the above. Thanks
"Peter Proost" <pp*****@nospam.hotmail.com> wrote in message news:uy*************@tk2msftngp13.phx.gbl... > Hi, > > have you tried: > > Private mMenuSaved As New ContextMenu > mMenuSaved = Me.ContextMenuThumbnails > > Hth Greetz Peter > > > -- > Programming today is a race between software engineers striving to > build > bigger and better idiot-proof programs, and the Universe trying to
produce > bigger and better idiots. So far, the Universe is winning. > > " **Developer**" <RE*************@a-znet.com> schreef in bericht > news:Ol**************@TK2MSFTNGP12.phx.gbl... >> I have a usercontrol in which the IDE generated context menu statement >> is: >> >> Friend WithEvents ContextMenuThumbnails As > System.Windows.Forms.ContextMenu >> >> >> >> I want to save the contents of it so I tried: >> Private mMenuSaved As ContextMenu = Me.ContextMenuThumbnails.clonemenu >> >> >> >> But the compiler says: >> >> C:\Documents and Settings\Cal\My Documents\Visual Studio Projects\CAG >> Studio\CAG ControlThumbnails\ControlThumbnails.vb(531): >> 'System.Windows.Forms.Menu.Protected Sub CloneMenu(menuSrc As >> System.Windows.Forms.Menu)' is not accessible in this context because it > is >> 'Protected'. >> >> >> >> >> Is there a way to get around this? >> >> >> >> >> >> Thanks >> >> > >
" **Developer**" <RE*************@a-znet.com> wrote in message
news:us**************@tk2msftngp13.phx.gbl... Did you mean to send this to someone else? I don't seeI want to save the contents of it in your first post
in my post.
Sorry, I can't believe I missed what this says.
Any way, I just meant I didn't want a new reference to the same data memory
locations but wanted a new variable that reference a new set of data.
Hi sorry for the late response,
do you mean something like this:
Dim newCM As New ContextMenu
Dim miNew As MenuItem
For Each mi As MenuItem In ContextMenu1.MenuItems
miNew = New MenuItem(mi.Text)
newCM.MenuItems.Add(miNew)
Next
hth Greetz Peter
--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning.
" **Developer**" <RE*************@a-znet.com> schreef in bericht
news:#s**************@TK2MSFTNGP09.phx.gbl... " **Developer**" <RE*************@a-znet.com> wrote in message news:us**************@tk2msftngp13.phx.gbl... Did you mean to send this to someone else? I don't seeI want to save the contents of it in your first post in my post.
Sorry, I can't believe I missed what this says.
Any way, I just meant I didn't want a new reference to the same data
memory locations but wanted a new variable that reference a new set of data.
I'll have to study this.
Thanks
"Peter Proost" <pp*****@nospam.hotmail.com> wrote in message
news:uE**************@TK2MSFTNGP14.phx.gbl... Hi sorry for the late response,
do you mean something like this:
Dim newCM As New ContextMenu Dim miNew As MenuItem For Each mi As MenuItem In ContextMenu1.MenuItems miNew = New MenuItem(mi.Text) newCM.MenuItems.Add(miNew) Next
hth Greetz Peter
-- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
" **Developer**" <RE*************@a-znet.com> schreef in bericht news:#s**************@TK2MSFTNGP09.phx.gbl... " **Developer**" <RE*************@a-znet.com> wrote in message news:us**************@tk2msftngp13.phx.gbl... > Did you mean to send this to someone else? > I don't see >>>I want to save the contents of it in your first post > in my post. > > Sorry, I can't believe I missed what this says.
Any way, I just meant I didn't want a new reference to the same data
memory locations but wanted a new variable that reference a new set of data.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: MD |
last post by:
I have a ContextMenu that is assigned to 3 RichTextBox's (i.e., if you
right-click on any of the 3 RichTextBox's, you get the same ContextMenu).
My ContextMenu has 2 items, each of which have their...
|
by: MrNobody |
last post by:
For the the sake of keeping my code simple, I wanted a ContextMenu and a
MainMenu to share some MenuItems, but it turns out when I Add() one MenuItem
to the other it 'steals' that MenuItem so it...
|
by: I_AM_DON_AND_YOU? |
last post by:
I have written a VB.Net program. This program has a ConetxtMenu1.
ContextMenu1 is very big and has many levels. There are so many procedures
and depending upon the logic many times a menu item...
|
by: tmaster |
last post by:
When I try to dynamically add a second sub menu item to this ContextMenu
item, I get an error 'Specified argument was out of the range of valid
values'.
Private Sub mnuTopics_Show_Select(ByVal...
|
by: Libby Sharf |
last post by:
Hello,
I have several ContextMenus and I want to connect them to the GridControl's
ContextMenu property depending on the row that was right clicked. Is there
an event that is raised just before...
|
by: Steve Richter |
last post by:
I cant get a contextmenu to popup in the context of a datagridview. It
pops up in the ListBox, and in the form itself. But not the
DataGridView. How could that be?
here is my code:
using...
|
by: Academia |
last post by:
In an old project I still use MainMenu and ContexMenu.
How can I get them to appear in my Toolbox?
Thanks
|
by: snehal12345 |
last post by:
I have created 1 contextmenu for a listbox in C#.net 3.0 . For that context menu I have written one event handler for mouseup event . But when i click on contextmenu item that event is not captured....
|
by: asharda |
last post by:
Hi,
I am trying to create a context menu in my application. The context
menu takes menu otems from an XML file. In XAML the code is
<Grid.ContextMenu>
<ContextMenu Name="cm" StaysOpen="true"...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |