Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Function: SetBounds

Posted on 2004-10-07
4
Medium Priority
?
260 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 500 total points
ID: 12250011
Then use the code I posted. This will not produce the scrollbars
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

719 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