Solved

Function: SetBounds

Posted on 2004-10-07
4
251 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
  • 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

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…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

813 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now