[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Remove MDI Title Bar or increase size

Posted on 2000-04-12
5
Medium Priority
?
228 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
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
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
Course of the Month18 days, 20 hours left to enroll

834 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