Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Mdi form without border

Posted on 2004-04-04
4
Medium Priority
?
435 Views
Last Modified: 2008-03-17
Hi
In VB, Normal form has a Borderstyle property that can set to "no border".
(When set to no border this form fill all of screen)
but One mdi form has not this property.
I want my mdi form has not border and fill all of screen.
0
Comment
Question by:msalari
[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
4 Comments
 
LVL 11

Expert Comment

by:dbrckovi
ID: 10755369
Try this:
http://www.visualbasicforum.com/showthread.php?t=71750

I'm having dificulties copying an pasting. Everything goes to a single line in VB.
But maybe you'll have more luck.

I'm not sure if this will work with MDI forms.

According to my experience, I don't think it's possible to change MDI form border style. I mean, have you ever seen a MDI form without border (in any application)?
0
 
LVL 19

Accepted Solution

by:
BrianGEFF719 earned 150 total points
ID: 10756708
Try this:


Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Const WS_CAPTION = &HC00000
Private Const GWL_EXSTYLE = (-20)
Private Const GWL_STYLE = (-16)
Private Const WS_BORDER = &H800000
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_PAINT = &HF

Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long


Private Sub MDIForm_Click()
    Dim wStyle As Long
    wStyle = GetWindowLong(Me.hwnd, GWL_STYLE)
    wStyle = wStyle Xor WS_CAPTION
    wStyle = wStyle Xor WS_BORDER
    SetWindowLong Me.hwnd, GWL_STYLE, wStyle
    Me.WindowState=vbMaximized
0
 
LVL 19

Expert Comment

by:BrianGEFF719
ID: 10756715
You can move it from click() to paint() or load() if you wish.


_Brian
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 10756743
Try this

don't know whether it works for mdi but you can pass the hwnd and try


http://www.mvps.org/vb/code/FormBdr.zip
0

Featured Post

Technology Partners: 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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
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…
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…
Suggested Courses

596 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