Solved

Remove MDI Title Bar or increase size

Posted on 2000-04-12
5
220 Views
Last Modified: 2010-05-02
I'm need to do one of two things:-

1) Remove the title bar of an MDI form

2) Increase the size so that the title bar is off the screen yet make the window big enough to cover the screen. Currently Vb/windows limits how big my MDI window can be.

Thanks.
0
Comment
Question by:CharlieM
  • 2
  • 2
5 Comments
 
LVL 28

Expert Comment

by:AzraSound
Comment Utility
yes even with the api i could not increase the window size, but only move the title bar off screen.  what are you trying to do?  perhaps there is an alternative.
0
 
LVL 15

Accepted Solution

by:
ameba earned 100 total points
Comment Utility
' mdichild form Form1 :borderstyle=0, no code

' mdiform: appearance=0 (optional), paste this code
Option Explicit
Private Const GWL_STYLE = (-16)
Private Const WS_SYSMENU = &H80000
Private Const WS_CAPTION = &HC00000
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

Private Sub MDIForm_Click()
    MsgBox ScaleWidth / 15 & " x " & ScaleHeight / 15
    Unload Me
End Sub

Private Sub MDIForm_Load()
    Dim style As Long
    style = GetWindowLong(hwnd, GWL_STYLE)
    style = style And Not WS_SYSMENU
    style = style And Not WS_CAPTION
    style = SetWindowLong(hwnd, GWL_STYLE, style)
    Move -45, -45, 20000, 20000
    Form1.Show ' show mdichild (also without border)
End Sub
0
 
LVL 28

Expert Comment

by:AzraSound
Comment Utility
good job ameba!  =)
0
 

Author Comment

by:CharlieM
Comment Utility
Once again experts exchange solves a problem!

Good job indeed ameba. Thanks!
0
 
LVL 15

Expert Comment

by:ameba
Comment Utility
:) Thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…

762 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