Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MDI Client Area calculations

Posted on 2007-04-01
1
Medium Priority
?
376 Views
Last Modified: 2012-08-13
in vb6 (sp6) I have an MDI window which has a left aligned control  - the control is fixed and does not vary in width, how can I calculate the remaining area of the client (so I can create an mdi child window which is 50pix smaller than in width and height)


MTIA

Darrin
0
Comment
Question by:dwe0608
[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
1 Comment
 
LVL 53

Accepted Solution

by:
Ryan Chong earned 1500 total points
ID: 18834191
try something like:

Private Sub mCenterActiveWindow_Click()

offSetWidth = 0
offSetHeight = 0

    If Not Me.ActiveForm Is Nothing Then
        If Not Me.ActiveForm.WindowState = vbNormal Then Me.ActiveForm.WindowState = vbNormal
        Me.ActiveForm.Left = 0
        Me.ActiveForm.Top = 0
        Me.ActiveForm.Width = Me.Width - IIf(LeftPanelControl.Visible, LeftPanelControl.Width, 0) - offSetWidth
        Me.ActiveForm.Height = Me.Height - IIf(LeftPanelControl.Visible, LeftPanelControl.Height, 0) - offSetHeight
    End If
End Sub

hope this helps
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

715 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