Solved

Remove MDI Title Bar or increase size

Posted on 2000-04-12
5
225 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 100 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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

691 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