By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,949 Members | 1,426 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,949 IT Pros & Developers. It's quick & easy.

Cor, Herfried, Ken Tucker - no answer to these questions?

P: n/a
I asked two fairly simple questions, or so I thought, but have received no
ideas at all.

1. What is the control that MS uses in Outlook Express that contains
attachments? It appears to be a multicolumn listbox but the # of columns is
somehow fixed and it contains icons as well as text.

2. When I add a main menu to a child form in an mdi app, and use this code,
the
menu does not merge (I do not want it to merge with the parent's menu):
Dim i As Integer

For i = 0 To MainMenu1.MenuItems.Count - 1

MainMenu1.MenuItems(i).MergeType = MenuMerge.Remove

Next

But I want the menu to appear on the child form, and it does, so long as I
don't really make it a child. If I call it like this:

Dim newmdichild As New buttonstest

'newmdichild.MdiParent = Me

newmdichild.Show()

it's a happy camper, but it is not a child form and it disappears behind the
mdi parent when it doesn't have focus. But when I uncomment
'newmdichild.mdiparent = me, the form is now a child form but it has no
menu!

What I want is for it to have its own menu and be a child form at the same
time. How can this be done?

Tx for any help.

Bernie Yaeger
Nov 21 '05 #1
Share this Question
Share on Google+
12 Replies


P: n/a
Nak
Hi Bernie,

Sorry to hear that your questions are going some time without being
answered but you must be aware that everyone here bar the Microsoft
employees are helping completely voluntarily so it may take a little while
for your questions to be answered. Just have a little patience.
1. What is the control that MS uses in Outlook Express that contains
attachments? It appears to be a multicolumn listbox but the # of columns
is somehow fixed and it contains icons as well as text.
AFAIK this is the ListView control. There are plenty of advanced
extensions that can be applied to it, and it is probably the most extensible
control available in the framework.
2. When I add a main menu to a child form in an mdi app, and use this
code, the
menu does not merge (I do not want it to merge with the parent's menu):
Dim i As Integer

For i = 0 To MainMenu1.MenuItems.Count - 1

MainMenu1.MenuItems(i).MergeType = MenuMerge.Remove

Next
Don't merge items by code, use the merge properties available for the
menu item. If you want an item to merge with it's parent you set the merge
order to the same value as an item in the parent menu. How it merges all
depends on the merge type property.
What I want is for it to have its own menu and be a child form at the same
time. How can this be done?


It can't, the menu will always be attached. If you don't want this
functionality you will have to implement your own MDI interface. You can
add forms to containers providing their hidden property toplevel is set to
false, but be warned there is *allot* of work involved!

Nick.
Nov 21 '05 #2

P: n/a
Nick,

Bernie is with the ones who answer a lot here. He started I thought in that
time you was away.

He is always friendly and I find he does it as well now in a friendly way.
Although there is no need to set it directly on Herfried, Ken and me, there
are a lot of others who helps as well here.

Bernie had for Outlook in his previous message not written what outlook it
was for and I thought it was therefore not Outlook express and in my opinion
are there better ones to answer that than me.

I had planned to check what it could be, after that I thought that the
control was a created usercomponent with as most important part the listview
and a buttonbar (I have the idea it looks as that one in the powertools)
some comboboxes, some textboxes and a button.

I also planned to find out how I could help him with the MDI. Armin our
group specialist in MDI is already a while gone. I have done as well
something with that. However that merging from menu's I find always awfull
to do.

So I wait now on the answer on Bernie if your answer fit and will when it
does not fit when I have time other take some time in it to help him.

Cor
Nov 21 '05 #3

P: n/a
"Bernie Yaeger" <be*****@cherwellinc.com> schrieb:
I asked two fairly simple questions, or so I thought, but have received no
ideas at all.


Please avoid addressing posts to certain people. Instead, address them to
the whole group!

(I didn't have time to reply because I got a new computer yesterday and I am
still setting everything up.)

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #4

P: n/a
Congrats on the new computer...what did you get? (specs, brand etc).

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:hi***************@gmx.at:
"Bernie Yaeger" <be*****@cherwellinc.com> schrieb:
I asked two fairly simple questions, or so I thought, but have received
no
ideas at all.


Please avoid addressing posts to certain people. Instead, address them to

the whole group!

(I didn't have time to reply because I got a new computer yesterday and I
am
still setting everything up.)

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


Nov 21 '05 #5

P: n/a
"scorpion53061" <sc************@nospamhereyahoo.com> schrieb:
Congrats on the new computer...what did you get? (specs, brand etc).


That's very much OT here... ;-).

I got an Intel P4 3.0 GHz HT, 1 GB of Kingston RAM, 160 GB Western Digital
HDD (S-ATA), LiteOn CD/DVD writer (R+RW, supporting double layer DVDs), a
normal CD/DVD drive, a 3.5" floppy drive, Aeolus FX 550 graphics card, all
working on an ASUS board. The soundcard is on-board. Did I forget to
mention anything? Well, I have chosen a black/silver tower instead of such
an ugly grey box.

BTW: Donations are welcome ;-):

<URL:http://dotnet.mvps.org/meta/donate/#EnglishDonate>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #6

P: n/a
Tx Herfried; great help this time.

Bernie

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:eI****************@TK2MSFTNGP10.phx.gbl...
"Bernie Yaeger" <be*****@cherwellinc.com> schrieb:
I asked two fairly simple questions, or so I thought, but have received no
ideas at all.


Please avoid addressing posts to certain people. Instead, address them to
the whole group!

(I didn't have time to reply because I got a new computer yesterday and I
am still setting everything up.)

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #7

P: n/a
Hi Nak,

Thanks for your response.

I suspect you are correct about the listview.

Re the menus, I'm sorry that that's the answer - the inability to have a
simple menu on a child form is a serious oversight, in my opinion. There is
often need for such.

Tx again,

Bernie Yaeger

"Nak" <a@a.com> wrote in message
news:OF*******************@TK2MSFTNGP09.phx.gbl...
Hi Bernie,

Sorry to hear that your questions are going some time without being
answered but you must be aware that everyone here bar the Microsoft
employees are helping completely voluntarily so it may take a little while
for your questions to be answered. Just have a little patience.
1. What is the control that MS uses in Outlook Express that contains
attachments? It appears to be a multicolumn listbox but the # of columns
is somehow fixed and it contains icons as well as text.


AFAIK this is the ListView control. There are plenty of advanced
extensions that can be applied to it, and it is probably the most
extensible control available in the framework.
2. When I add a main menu to a child form in an mdi app, and use this
code, the
menu does not merge (I do not want it to merge with the parent's menu):
Dim i As Integer

For i = 0 To MainMenu1.MenuItems.Count - 1

MainMenu1.MenuItems(i).MergeType = MenuMerge.Remove

Next


Don't merge items by code, use the merge properties available for the
menu item. If you want an item to merge with it's parent you set the
merge order to the same value as an item in the parent menu. How it
merges all depends on the merge type property.
What I want is for it to have its own menu and be a child form at the
same
time. How can this be done?


It can't, the menu will always be attached. If you don't want this
functionality you will have to implement your own MDI interface. You can
add forms to containers providing their hidden property toplevel is set to
false, but be warned there is *allot* of work involved!

Nick.

Nov 21 '05 #8

P: n/a
Hi Cor,

Thanks for your consideration. I know you always try to help, and very
often are very helpful.

Yes, Nak's answers, although I wish the answer about menus was different,
were helpful.

Thanks again,

Bernie

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2********************@TK2MSFTNGP09.phx.gbl.. .
Nick,

Bernie is with the ones who answer a lot here. He started I thought in
that time you was away.

He is always friendly and I find he does it as well now in a friendly way.
Although there is no need to set it directly on Herfried, Ken and me,
there are a lot of others who helps as well here.

Bernie had for Outlook in his previous message not written what outlook it
was for and I thought it was therefore not Outlook express and in my
opinion are there better ones to answer that than me.

I had planned to check what it could be, after that I thought that the
control was a created usercomponent with as most important part the
listview and a buttonbar (I have the idea it looks as that one in the
powertools) some comboboxes, some textboxes and a button.

I also planned to find out how I could help him with the MDI. Armin our
group specialist in MDI is already a while gone. I have done as well
something with that. However that merging from menu's I find always awfull
to do.

So I wait now on the answer on Bernie if your answer fit and will when it
does not fit when I have time other take some time in it to help him.

Cor

Nov 21 '05 #9

P: n/a
Sweet.

My laptop is 1 gig of ram, 80 gig hard drive, 3.2 ghz, 64bit but the
thing likes to shut down every once in a while on its own. It is
annoying. WE have been over the virus and worm and none were there.

SO what did your machine cost you? Did you build it yourself?

Did you have issues moving projects? Or did you image to the new
machine?

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:hi***************@gmx.at:
"scorpion53061" <sc************@nospamhereyahoo.com> schrieb:
Congrats on the new computer...what did you get? (specs, brand etc).


That's very much OT here... ;-).

I got an Intel P4 3.0 GHz HT, 1 GB of Kingston RAM, 160 GB Western Digital

HDD (S-ATA), LiteOn CD/DVD writer (R+RW, supporting double layer DVDs), a

normal CD/DVD drive, a 3.5" floppy drive, Aeolus FX 550 graphics card, all

working on an ASUS board. The soundcard is on-board. Did I forget to
mention anything? Well, I have chosen a black/silver tower instead of
such
an ugly grey box.

BTW: Donations are welcome ;-):

<URL:http://dotnet.mvps.org/meta/donate/#EnglishDonate>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


Nov 21 '05 #10

P: n/a
Hi,

Might not be the best solution but you could use the SetParent API
to add your form to the mdiform. That way your form will look like it is a
mdi child and still be able to keep its own menu.

Declare Function SetParent Lib "user32" Alias "SetParent" (ByVal hWndChild
As IntPtr, ByVal hWndNewParent As IntPtr) As Integer

Dim frm As New Form2

SetParent(frm.Handle, Me.Handle)

frm.Show()

Ken

----------------------------------

"Bernie Yaeger" <be*****@cherwellinc.com> wrote in message
news:%2********************@TK2MSFTNGP11.phx.gbl.. .
I asked two fairly simple questions, or so I thought, but have received no
ideas at all.

1. What is the control that MS uses in Outlook Express that contains
attachments? It appears to be a multicolumn listbox but the # of columns is
somehow fixed and it contains icons as well as text.

2. When I add a main menu to a child form in an mdi app, and use this code,
the
menu does not merge (I do not want it to merge with the parent's menu):
Dim i As Integer

For i = 0 To MainMenu1.MenuItems.Count - 1

MainMenu1.MenuItems(i).MergeType = MenuMerge.Remove

Next

But I want the menu to appear on the child form, and it does, so long as I
don't really make it a child. If I call it like this:

Dim newmdichild As New buttonstest

'newmdichild.MdiParent = Me

newmdichild.Show()

it's a happy camper, but it is not a child form and it disappears behind the
mdi parent when it doesn't have focus. But when I uncomment
'newmdichild.mdiparent = me, the form is now a child form but it has no
menu!

What I want is for it to have its own menu and be a child form at the same
time. How can this be done?

Tx for any help.

Bernie Yaeger

Nov 21 '05 #11

P: n/a
Hi Ken,

Tx - that is an excellent idea - probably the best solution I've heard.

Thanks again,

Bernie

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:eE**************@TK2MSFTNGP12.phx.gbl...
Hi,

Might not be the best solution but you could use the SetParent API
to add your form to the mdiform. That way your form will look like it is
a
mdi child and still be able to keep its own menu.

Declare Function SetParent Lib "user32" Alias "SetParent" (ByVal hWndChild
As IntPtr, ByVal hWndNewParent As IntPtr) As Integer

Dim frm As New Form2

SetParent(frm.Handle, Me.Handle)

frm.Show()

Ken

----------------------------------

"Bernie Yaeger" <be*****@cherwellinc.com> wrote in message
news:%2********************@TK2MSFTNGP11.phx.gbl.. .
I asked two fairly simple questions, or so I thought, but have received no
ideas at all.

1. What is the control that MS uses in Outlook Express that contains
attachments? It appears to be a multicolumn listbox but the # of columns
is
somehow fixed and it contains icons as well as text.

2. When I add a main menu to a child form in an mdi app, and use this
code,
the
menu does not merge (I do not want it to merge with the parent's menu):
Dim i As Integer

For i = 0 To MainMenu1.MenuItems.Count - 1

MainMenu1.MenuItems(i).MergeType = MenuMerge.Remove

Next

But I want the menu to appear on the child form, and it does, so long as I
don't really make it a child. If I call it like this:

Dim newmdichild As New buttonstest

'newmdichild.MdiParent = Me

newmdichild.Show()

it's a happy camper, but it is not a child form and it disappears behind
the
mdi parent when it doesn't have focus. But when I uncomment
'newmdichild.mdiparent = me, the form is now a child form but it has no
menu!

What I want is for it to have its own menu and be a child form at the same
time. How can this be done?

Tx for any help.

Bernie Yaeger

Nov 21 '05 #12

P: n/a
Nak
Hi Ken
Might not be the best solution but you could use the SetParent API
to add your form to the mdiform. That way your form will look like it is
a
mdi child and still be able to keep its own menu.


That's interesting, thanks for sharing that one!

Nick.
Nov 21 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.