Solved

Function: SetBounds

Posted on 2004-10-07
4
257 Views
Last Modified: 2008-02-01
Hello

I am having a problem with the following function call:

     m_oForm.SetBounds(0, 0, fmdi.ClientRectangle.Width, fmdi.ClientRectangle.Height)

Before execution of the above function, Form fmdi does not have
scroll bars. After exectuion Scrollbars appear on Form fmdi.

any idea what I am doing wrong ???
0
Comment
Question by:mat0974
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 12249727
Hi mat0974,

what are you trying to achieve, are you trying to fill a mdi child in the parent without maximizing ?
0
 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 12249854
if you are use this

Private Sub FillActiveChildFormToClient()
 
               Dim child As Form = Me.ActiveMdiChild
 
               Dim mdiClientArea As Rectangle = Rectangle.Empty
 
               Dim c As Control
 
               For Each c In Me.Controls
 
                    If TypeOf c Is MdiClient Then
 
                         mdiClientArea = c.ClientRectangle
 
                    End If
 
               Next
 
               child.Bounds = mdiClientArea
 
          End Sub
 
0
 

Author Comment

by:mat0974
ID: 12249945
I want to stretch form m_oForm to fit in the Client area of Form
fmdi. I do not want to see scroll bars on form fmdi.

(I am migrating a VB6 Application to VBNET. In VB6 the function
used was Form.move())
0
 
LVL 25

Accepted Solution

by:
RonaldBiemans earned 125 total points
ID: 12250011
Then use the code I posted. This will not produce the scrollbars
0

Featured Post

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question