Connecting Tech Pros Worldwide Forums | Help | Site Map

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

Bernie Yaeger
Guest
 
Posts: n/a
#1: Nov 21 '05
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



Nak
Guest
 
Posts: n/a
#2: Nov 21 '05

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


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.
[color=blue]
> 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.[/color]

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.
[color=blue]
> 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[/color]

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.
[color=blue]
> 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?[/color]

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.


Cor Ligthert
Guest
 
Posts: n/a
#3: Nov 21 '05

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


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


Herfried K. Wagner [MVP]
Guest
 
Posts: n/a
#4: Nov 21 '05

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


"Bernie Yaeger" <berniey@cherwellinc.com> schrieb:[color=blue]
>I asked two fairly simple questions, or so I thought, but have received no
>ideas at all.[/color]

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/>

scorpion53061
Guest
 
Posts: n/a
#5: Nov 21 '05

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


Congrats on the new computer...what did you get? (specs, brand etc).

"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:hirf-spam-me-here@gmx.at:[color=blue]
> "Bernie Yaeger" <berniey@cherwellinc.com> schrieb:[color=green]
> >I asked two fairly simple questions, or so I thought, but have received
> >no
> >ideas at all.[/color]
>
> 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/>[/color]

Herfried K. Wagner [MVP]
Guest
 
Posts: n/a
#6: Nov 21 '05

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


"scorpion53061" <scorpion_53061@nospamhereyahoo.com> schrieb:[color=blue]
> Congrats on the new computer...what did you get? (specs, brand etc).[/color]

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/>

Bernie Yaeger
Guest
 
Posts: n/a
#7: Nov 21 '05

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


Tx Herfried; great help this time.

Bernie

"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:eIkWDc$%23EHA.1936@TK2MSFTNGP10.phx.gbl...[color=blue]
> "Bernie Yaeger" <berniey@cherwellinc.com> schrieb:[color=green]
>>I asked two fairly simple questions, or so I thought, but have received no
>>ideas at all.[/color]
>
> 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/>[/color]


Bernie Yaeger
Guest
 
Posts: n/a
#8: Nov 21 '05

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


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:OF5%2374%23%23EHA.600@TK2MSFTNGP09.phx.gbl...[color=blue]
> 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.
>[color=green]
>> 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.[/color]
>
> 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.
>[color=green]
>> 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[/color]
>
> 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.
>[color=green]
>> 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?[/color]
>
> 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.
>[/color]


Bernie Yaeger
Guest
 
Posts: n/a
#9: Nov 21 '05

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


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" <notmyfirstname@planet.nl> wrote in message
news:%23%23ZSvN$%23EHA.2584@TK2MSFTNGP09.phx.gbl.. .[color=blue]
> 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
>
>[/color]


scorpion53061
Guest
 
Posts: n/a
#10: Nov 21 '05

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


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]" <hirf-spam-me-here@gmx.at> wrote in message
news:hirf-spam-me-here@gmx.at:[color=blue]
> "scorpion53061" <scorpion_53061@nospamhereyahoo.com> schrieb:[color=green]
> > Congrats on the new computer...what did you get? (specs, brand etc).[/color]
>
> 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/>[/color]

Ken Tucker [MVP]
Guest
 
Posts: n/a
#11: Nov 21 '05

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


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" <berniey@cherwellinc.com> wrote in message
news:%23frLvN%23%23EHA.3820@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



Bernie Yaeger
Guest
 
Posts: n/a
#12: Nov 21 '05

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


Hi Ken,

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

Thanks again,

Bernie

"Ken Tucker [MVP]" <vb2ae@bellsouth.net> wrote in message
news:eEEYELL$EHA.3376@TK2MSFTNGP12.phx.gbl...[color=blue]
> 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" <berniey@cherwellinc.com> wrote in message
> news:%23frLvN%23%23EHA.3820@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
>
>
>[/color]


Nak
Guest
 
Posts: n/a
#13: Nov 21 '05

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


Hi Ken
[color=blue]
> 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.[/color]

That's interesting, thanks for sharing that one!

Nick.


Closed Thread