?
Solved

Remove MDI Title Bar or increase size

Posted on 2000-04-12
5
Medium Priority
?
226 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
[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
  • 2
  • 2
5 Comments
 
LVL 28

Expert Comment

by:AzraSound
ID: 2708713
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 400 total points
ID: 2708777
' 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
ID: 2708806
good job ameba!  =)
0
 

Author Comment

by:CharlieM
ID: 2708868
Once again experts exchange solves a problem!

Good job indeed ameba. Thanks!
0
 
LVL 15

Expert Comment

by:ameba
ID: 2709523
:) Thanks
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

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