Home All Groups Group Topic Archive Search About

App with forms as tabs

Author
3 Aug 2006 7:44 PM
Tom
I'd like to create a new VB 2005 app that looks like the VS 2005 IDE -
in other words, an app that has multiple forms, but instead of
displaying them seperately or in an MDI main from, I'd rather display
them in tabs across the screen. I might have functions that are
available to the app in the tree view on the left, then as they select
functions it would open them in a new tab... again, almost exactly as
the VB IDE does.

My question therefore really is: Can we display Windows Forms forms in
tabs?

Tom
--

Author
3 Aug 2006 7:59 PM
Marina Levit [MVP]
You would want to make user controls, and put those in the tabs.

Show quoteHide quote
"Tom" <tom@nospam.com> wrote in message
news:ezGesUztGHA.4752@TK2MSFTNGP02.phx.gbl...
> I'd like to create a new VB 2005 app that looks like the VS 2005 IDE -
> in other words, an app that has multiple forms, but instead of
> displaying them seperately or in an MDI main from, I'd rather display
> them in tabs across the screen. I might have functions that are
> available to the app in the tree view on the left, then as they select
> functions it would open them in a new tab... again, almost exactly as
> the VB IDE does.
>
> My question therefore really is: Can we display Windows Forms forms in
> tabs?
>
> Tom
> --
>
Author
3 Aug 2006 8:19 PM
Tom
Marina: Unfortunately, that isn't really what I 'want' to do. I want to
convert an application I already coded over to this 'Visual Studio IDE'
type format. This app has 50 or so already coded forms - I really don't
want to try to convert EVERY one of those forms over to a user
control!! That would take awhile and probably cost too much for our
company to 'approve'.

Isn't there any way to display an already-created form in a tab? How
does the VS IDE do it?

Tom
--



Marina Levit [MVP] wrote:

Show quoteHide quote
>You would want to make user controls, and put those in the tabs.
>
>"Tom" <tom@nospam.com> wrote in message
>news:ezGesUztGHA.4752@TK2MSFTNGP02.phx.gbl...
>>I'd like to create a new VB 2005 app that looks like the VS 2005
>>IDE - in other words, an app that has multiple forms, but instead of
>>displaying them seperately or in an MDI main from, I'd rather
>>display them in tabs across the screen. I might have functions that
>>are available to the app in the tree view on the left, then as they
>>select functions it would open them in a new tab... again, almost
>>exactly as the VB IDE does.
>>
>>My question therefore really is: Can we display Windows Forms forms
>>in tabs?
>>
>>Tom
>>--
Author
3 Aug 2006 8:32 PM
Simon Verona
I'm sure it's the same in vb2005, in vb2003 you do :

    dim myform as new frmToGoOnTab
    frm.toplevel=false
    tabpage1.controls.add(frm)
    frm.dock=DockStyle.Fill ' Expands the form to fill the tabpage
    frm.show


hth
Simon

--
Simon Verona

Show quoteHide quote
"Tom" <tom@nospam.com> wrote in message
news:u4EwroztGHA.148@TK2MSFTNGP05.phx.gbl...
> Marina: Unfortunately, that isn't really what I 'want' to do. I want to
> convert an application I already coded over to this 'Visual Studio IDE'
> type format. This app has 50 or so already coded forms - I really don't
> want to try to convert EVERY one of those forms over to a user
> control!! That would take awhile and probably cost too much for our
> company to 'approve'.
>
> Isn't there any way to display an already-created form in a tab? How
> does the VS IDE do it?
>
> Tom
> --
>
>
>
> Marina Levit [MVP] wrote:
>
>>You would want to make user controls, and put those in the tabs.
>>
>>"Tom" <tom@nospam.com> wrote in message
>>news:ezGesUztGHA.4752@TK2MSFTNGP02.phx.gbl...
>>>I'd like to create a new VB 2005 app that looks like the VS 2005
>>>IDE - in other words, an app that has multiple forms, but instead of
>>>displaying them seperately or in an MDI main from, I'd rather
>>>display them in tabs across the screen. I might have functions that
>>>are available to the app in the tree view on the left, then as they
>>>select functions it would open them in a new tab... again, almost
>>>exactly as the VB IDE does.
>>>
>>>My question therefore really is: Can we display Windows Forms forms
>>>in tabs?
>>>
>>>Tom
>>>--
Author
3 Aug 2006 9:44 PM
Herfried K. Wagner [MVP]
"Simon Verona" <nom***@nomail.zzz> schrieb:
> I'm sure it's the same in vb2005, in vb2003 you do :
>
>    dim myform as new frmToGoOnTab
>    frm.toplevel=false
>    tabpage1.controls.add(frm)
>    frm.dock=DockStyle.Fill ' Expands the form to fill the tabpage
>    frm.show

.... but this could cause focus/tab order problems.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
4 Aug 2006 8:34 AM
Simon Verona
Herfried,

I use this technique pretty regularly without any noticeable issues (except
a little screen flickering sometimes as it loads the form).

What sort of focus/tab order issues can occur?   I find that once you click
into the form on the tab, the tab order in the "sub-form" is as would be
expected, though of course it won't tab back through the hosting form
without you clicking elsewhere.

Nevertheless, it's a useful way of hosting a form on a tabpage (also works
for panels etc) - I use this technique quite extensively to dynamically load
"forms" into panels and tabcontrols depending on logic within the code.
Usercontrols obviously work better if coding from scratch..

Something else I didn't mention in my original reply is that it looks better
if you hide the controlbox, and the title bar on the form when it's
displayed - it looks a bit stupid otherwise!

Regards
Simon

--
Simon Verona

Show quoteHide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:%23MnNBY0tGHA.1288@TK2MSFTNGP02.phx.gbl...
> "Simon Verona" <nom***@nomail.zzz> schrieb:
>> I'm sure it's the same in vb2005, in vb2003 you do :
>>
>>    dim myform as new frmToGoOnTab
>>    frm.toplevel=false
>>    tabpage1.controls.add(frm)
>>    frm.dock=DockStyle.Fill ' Expands the form to fill the tabpage
>>    frm.show
>
> ... but this could cause focus/tab order problems.
>
> --
> M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
> V B   <URL:http://classicvb.org/petition/>
Author
4 Aug 2006 9:49 AM
Pritcham
Hi

I came across the following yesterday funnily enough - looks like it's
exactly what you're looking for - I've downloaded the source but not
had a chance to look over it as of yet but looks quite promising (The
developer also has a template you can download called something like
"Application Explorer" which looks like it goes even further towards
what you're trying to achieve.

http://www.cflashsoft.com/progs/mdiwinman/

Hope it helps
Martin

Simon Verona wrote:
Show quoteHide quote
> Herfried,
>
> I use this technique pretty regularly without any noticeable issues (except
> a little screen flickering sometimes as it loads the form).
>
> What sort of focus/tab order issues can occur?   I find that once you click
> into the form on the tab, the tab order in the "sub-form" is as would be
> expected, though of course it won't tab back through the hosting form
> without you clicking elsewhere.
>
> Nevertheless, it's a useful way of hosting a form on a tabpage (also works
> for panels etc) - I use this technique quite extensively to dynamically load
> "forms" into panels and tabcontrols depending on logic within the code.
> Usercontrols obviously work better if coding from scratch..
>
> Something else I didn't mention in my original reply is that it looks better
> if you hide the controlbox, and the title bar on the form when it's
> displayed - it looks a bit stupid otherwise!
>
> Regards
> Simon
>
> --
> Simon Verona
>
> "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
> news:%23MnNBY0tGHA.1288@TK2MSFTNGP02.phx.gbl...
> > "Simon Verona" <nom***@nomail.zzz> schrieb:
> >> I'm sure it's the same in vb2005, in vb2003 you do :
> >>
> >>    dim myform as new frmToGoOnTab
> >>    frm.toplevel=false
> >>    tabpage1.controls.add(frm)
> >>    frm.dock=DockStyle.Fill ' Expands the form to fill the tabpage
> >>    frm.show
> >
> > ... but this could cause focus/tab order problems.
> >
> > --
> > M S   Herfried K. Wagner
> > M V P  <URL:http://dotnet.mvps.org/>
> > V B   <URL:http://classicvb.org/petition/>
Author
4 Aug 2006 10:42 AM
Simon Verona
I use a similar technique using a toolbar on the MDI parent, which
dynamically loads up the mdi children as you click the buttons.     The
software link you gave me does the same thing but using "tabs".

If you wanted to have a "tabbed" control which hosted sub-forms, then this
might do the trick for the OP.  I have a suspicion that it would...

Regards
Simon

--
Simon Verona

Show quoteHide quote
"Pritcham" <dontwanttogivemyn***@hotmail.com> wrote in message
news:1154684987.354791.142920@i3g2000cwc.googlegroups.com...
> Hi
>
> I came across the following yesterday funnily enough - looks like it's
> exactly what you're looking for - I've downloaded the source but not
> had a chance to look over it as of yet but looks quite promising (The
> developer also has a template you can download called something like
> "Application Explorer" which looks like it goes even further towards
> what you're trying to achieve.
>
> http://www.cflashsoft.com/progs/mdiwinman/
>
> Hope it helps
> Martin
>
> Simon Verona wrote:
>> Herfried,
>>
>> I use this technique pretty regularly without any noticeable issues
>> (except
>> a little screen flickering sometimes as it loads the form).
>>
>> What sort of focus/tab order issues can occur?   I find that once you
>> click
>> into the form on the tab, the tab order in the "sub-form" is as would be
>> expected, though of course it won't tab back through the hosting form
>> without you clicking elsewhere.
>>
>> Nevertheless, it's a useful way of hosting a form on a tabpage (also
>> works
>> for panels etc) - I use this technique quite extensively to dynamically
>> load
>> "forms" into panels and tabcontrols depending on logic within the code.
>> Usercontrols obviously work better if coding from scratch..
>>
>> Something else I didn't mention in my original reply is that it looks
>> better
>> if you hide the controlbox, and the title bar on the form when it's
>> displayed - it looks a bit stupid otherwise!
>>
>> Regards
>> Simon
>>
>> --
>> Simon Verona
>>
>> "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
>> news:%23MnNBY0tGHA.1288@TK2MSFTNGP02.phx.gbl...
>> > "Simon Verona" <nom***@nomail.zzz> schrieb:
>> >> I'm sure it's the same in vb2005, in vb2003 you do :
>> >>
>> >>    dim myform as new frmToGoOnTab
>> >>    frm.toplevel=false
>> >>    tabpage1.controls.add(frm)
>> >>    frm.dock=DockStyle.Fill ' Expands the form to fill the tabpage
>> >>    frm.show
>> >
>> > ... but this could cause focus/tab order problems.
>> >
>> > --
>> > M S   Herfried K. Wagner
>> > M V P  <URL:http://dotnet.mvps.org/>
>> > V B   <URL:http://classicvb.org/petition/>
>
Author
4 Aug 2006 12:50 PM
Marina Levit [MVP]
Why would it take a long time? A usercontrol is really just a form that
can't be displayed on a form, but needs to be in another container. I would
imagine in most cases it should be trivial to convert.

In any case, it sounds like the other solution proposed will work for you.

Show quoteHide quote
"Tom" <tom@nospam.com> wrote in message
news:u4EwroztGHA.148@TK2MSFTNGP05.phx.gbl...
> Marina: Unfortunately, that isn't really what I 'want' to do. I want to
> convert an application I already coded over to this 'Visual Studio IDE'
> type format. This app has 50 or so already coded forms - I really don't
> want to try to convert EVERY one of those forms over to a user
> control!! That would take awhile and probably cost too much for our
> company to 'approve'.
>
> Isn't there any way to display an already-created form in a tab? How
> does the VS IDE do it?
>
> Tom
> --
>
>
>
> Marina Levit [MVP] wrote:
>
>>You would want to make user controls, and put those in the tabs.
>>
>>"Tom" <tom@nospam.com> wrote in message
>>news:ezGesUztGHA.4752@TK2MSFTNGP02.phx.gbl...
>>>I'd like to create a new VB 2005 app that looks like the VS 2005
>>>IDE - in other words, an app that has multiple forms, but instead of
>>>displaying them seperately or in an MDI main from, I'd rather
>>>display them in tabs across the screen. I might have functions that
>>>are available to the app in the tree view on the left, then as they
>>>select functions it would open them in a new tab... again, almost
>>>exactly as the VB IDE does.
>>>
>>>My question therefore really is: Can we display Windows Forms forms
>>>in tabs?
>>>
>>>Tom
>>>--
Author
3 Aug 2006 8:38 PM
George Shubin
Try the DockPanel Suite at
http://sourceforge.net/project/showfiles.php?group_id=110642

It's free and works pretty good.

--
------------------------------------------------------------------------
George Shubin       Custom Software Development
dX Software Systems          Database Applications
Ph: 503-981-6806                     Fax: 503-982-0120
www.dxonline.com              geo***@dxonline.com
------------------------------------------------------------------------



Show quoteHide quote
"Tom" <tom@nospam.com> wrote in message
news:ezGesUztGHA.4752@TK2MSFTNGP02.phx.gbl...
> I'd like to create a new VB 2005 app that looks like the VS 2005 IDE -
> in other words, an app that has multiple forms, but instead of
> displaying them seperately or in an MDI main from, I'd rather display
> them in tabs across the screen. I might have functions that are
> available to the app in the tree view on the left, then as they select
> functions it would open them in a new tab... again, almost exactly as
> the VB IDE does.
>
> My question therefore really is: Can we display Windows Forms forms in
> tabs?
>
> Tom
> --
>
Author
8 Aug 2006 2:41 PM
Tom
Thanks to everyone for their suggestions! I tried the original code
snippet by Simon and it does work well... However, am going to look at
this DockPanel and MDIWinMan suites - they look like exactly what I was
looking for!

Thanks again!

Tom
--



George Shubin wrote:

Show quoteHide quote
>Try the DockPanel Suite at
>http://sourceforge.net/project/showfiles.php?group_id=110642
>
>It's free and works pretty good.