We help IT Professionals succeed at work.

Closing an MDI child form

meravkn
meravkn asked
on
Medium Priority
205 Views
Last Modified: 2008-02-26
Hi,

I have 2 MDI froms in my project. I wouldn't like the user to have the option of closing any of them. How can I do that? all the border styles of the forms have that X that can close the window except the no border one. I'd like to have a border just not the X.

Thanks!

Merav
Comment
Watch Question

you could use this in form_queryunload():

If UnloadMode = vbFormCode Then
  'do nothing
else
  msgbox "Cant close it that way!"
  cancel = true
end if

hope this helps!
CERTIFIED EXPERT
Commented:
Hi
http://www.mvps.org/vbnet/code/system/killclosemdi.htm
>>Cloce Any Form's Close Menu and 'X' Button - SDI, MDIParent or MDIChild <<

Cheers
Ark
CERTIFIED EXPERT

Commented:
Sorry, description:
>>Killing Any Form's Close Menu and 'X' Button - SDI, MDIParent or MDIChild <<

Author

Commented:
Thanks a lot!!!

Merav
Ark
CERTIFIED EXPERT

Commented:
Thanks for points, glad I could help you

Explore More ContentExplore courses, solutions, and other research materials related to this topic.