Re: My.Application.OpenForms
- From: "Garry" <garrygrolman@xxxxxxxxx>
- Date: Sat, 16 Dec 2006 19:23:04 +0200
Thank you Stephany,
Will try and re-post.
Assuming that it werks, where did U get it or woz it simply INTUITIVE???????
Garry
"Stephany Young" <noone@localhost> wrote in message
news:ecH3pIPIHHA.3668@xxxxxxxxxxxxxxxxxxxxxxx
Leesten veeeery carefully. I shall say theees only vonce!
Dim _f As New Form2
' parent the form the the MDI Container
_f.MdiParent = Me
' make the form fill the client area of the MDI Container
For Each _c As Control In Controls
If _c.GetType Is GetType(MdiClient) Then
_f.Bounds = CType(_c, MdiClient).ClientRectangle
Exit For
End If
Next
_f.Show()
Et voila!!!!!!!!!!
"Garry" <garrygrolman@xxxxxxxxx> wrote in message
news:uCoTCYEIHHA.4804@xxxxxxxxxxxxxxxxxxxxxxx
Why do you hesitate to have a form as your startup?Conservatism - an abominable affliction in a computer programmer.
The problem is not the Startup but I will remember your comment if I do
change back to frmMain as the start form.
Have you solved the problem of sizing a child form to fit the MDI client
rectangle BUT, the user must be able to move the form within the parent
form.. My solution is not elegant and I wonder how other people solved
it. Perhaps other programmers do not need to. I do not want the child
maximised, thats too easy, I want the child to completely fill the
available area and yet be 'moveable'.
I saw a solution to a forms collection in code with the Load event being
used in each child form to add it to a User Defined forms collection. I
have to consider this carefully. It was written for VS2003 and the
article specifically states that the 'openforms' is available in 2005.
I say it again - things were so simple in VB6.
If only someone had uddated the VB6 GUI and come out with a non Microsoft
VB7 with the improved intellisense on vb2005.
A DOTNET framework for Linux or Mackintosh has not materalised so that
one of the much taunted features at the release of the .NET languages
back in 2002 has not been realised. Garbage Collection is simply not
mentioned any more. I am however, enjoying ADO.NET with SQLCE which has
replaced my original Access database. Very fast.
Anyway, thanks for your answers.
Garry
"RobinS" <RobinS@xxxxxxxxxxxxxxx> wrote in message
news:F8qdnYO0iaq3pB_YnZ2dnUVZ_hy3nZ2d@xxxxxxxxxxxxxx
Unfortunately, I figured out MDI stuff by trial & error, and
the ones I've written are fairly simple. I do have MacDonald's
Windows Forms book; it has some basic info on MDI, but not tons.
You could always search Google.
I have the startup form for my project set to the parent form.
Why do you hesitate to have a form as your startup?
Robin S.
-------------------------------
"Garry" <garrygrolman@xxxxxxxxx> wrote in message
news:%2372JBgAIHHA.2632@xxxxxxxxxxxxxxxxxxxxxxx
Ah Robin,
I just noticed that in the project Properties, Application tab, the
'enable application framework' checkbox is unchecked.
I did this to enable me to build an MDI application and use sub Main()
as the starting point for the code.
There is very little clear info on building MDI applications as
Microsoft presumably is not encouraging the MDI framework. (no internal
support for INI files either in vb2005). Just try to resize an MDI
child to fit the Client Rectangle in the parent form exactly. It was
all so simple in VB6
However, I wonder if you could 'point' me to relevant and truly
constructive info on MDI applications in VB2005 'cos I MAY have to
redefine my application.
Is there anything else that I may be missing from My.Application if I
leave this checkbox unchecked????? I assume that this checkbox is the
source of my present troubles.
I am re-writing completely from VB6, NOT converting and do not feel
comfortable with the frmMain as the StartUp object.
One of the disadvantages of unchecking the checkbox is that when using
Cntrl-Break to debug, the Sub Main() is always shown with the green
line background on Application.Run(frmMain)..
Any clear suggestions would be much appreciated.
Garry
"RobinS" <RobinS@xxxxxxxxxxxxxxx> wrote in message
news:P4CdnVmUhu7b4hzYnZ2dnUVZ_rSjnZ2d@xxxxxxxxxxxxxx
I hate to ask the obvious, but is it a Windows Forms application
that you're trying to use it in?
Robin S.
----------------------------
"Garry" <garrygrolman@xxxxxxxxx> wrote in message
news:uHpO9r5HHHA.2236@xxxxxxxxxxxxxxxxxxxxxxx
Why is it that my installation od vs2005 will not accept
My.Application.OpenForms saying that it is not part of
My.Application???
Dim frm As Form
For Each frm In My.Application.OpenForms
Next frm
Garry
.
- Follow-Ups:
- Re: My.Application.OpenForms
- From: Stephany Young
- Re: My.Application.OpenForms
- References:
- My.Application.OpenForms
- From: Garry
- Re: My.Application.OpenForms
- From: RobinS
- Re: My.Application.OpenForms
- From: Garry
- Re: My.Application.OpenForms
- From: RobinS
- Re: My.Application.OpenForms
- From: Garry
- Re: My.Application.OpenForms
- From: Stephany Young
- My.Application.OpenForms
- Prev by Date: Re: When did ClickOnce come out?
- Next by Date: DirectoryNotFoundException unhandled
- Previous by thread: Re: My.Application.OpenForms
- Next by thread: Re: My.Application.OpenForms
- Index(es):
Relevant Pages
|