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

B

Bernie Yaeger

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
 
N

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.
 
C

Cor Ligthert

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
 
H

Herfried K. Wagner [MVP]

Bernie Yaeger said:
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.)
 
H

Herfried K. Wagner [MVP]

scorpion53061 said:
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>
 
B

Bernie Yaeger

Tx Herfried; great help this time.

Bernie

Herfried K. Wagner said:
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.)
 
B

Bernie Yaeger

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
 
B

Bernie Yaeger

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
 
S

scorpion53061

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?
 
K

Ken Tucker [MVP]

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

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

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
 
B

Bernie Yaeger

Hi Ken,

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

Thanks again,

Bernie
 
N

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top