Solved

How to disable..?

Posted on 2000-05-05
10
194 Views
Last Modified: 2010-05-02
Hello,

I used a fixedDialog as a form's borderstyle. The min. and max. buttons is disappear already, but I don't want the close button that appear in the top right hand corner, also the close option appear in the system menu.
How can I disable them ? such that the user cannot close the dailog box by pressing the close button or the close option in the menu.
Please help!

Regards,

Raymond
0
Comment
Question by:rng
10 Comments
 
LVL 32

Accepted Solution

by:
bhess1 earned 100 total points
ID: 2781785
See:

http://www.mvps.org/vbnet/code/system/killclose.htm

To show you how to kill the close button and menu option
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 2781789
set controlbox property to false
0
 
LVL 9

Expert Comment

by:Ruchi
ID: 2781854
Try this.

Option Explicit

Private Sub Command1_Click()
Unload Me
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = vbFormControlMenu Then Cancel = 1
End Sub
0
 
LVL 4

Expert Comment

by:dreamvb
ID: 2782463
Try this it will stop the user form closeing the form

Private Sub Form_Unload(Cancel As Integer)
 Cancel = 1
 
End Sub

also put is into your menu.
0
 

Expert Comment

by:vrkpemmaraju
ID: 2782468
The good thing u can do is to make the control box false and u can even embose another control on the top right of the form and u can operate with that also if u don't want to use the system close option. And, if u make false the control box the system close option also will not appear. u try this if not give me ur descriptive question so that i can answer u for the specific problem
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 28

Expert Comment

by:AzraSound
ID: 2782478
<sigh>
0
 
LVL 9

Expert Comment

by:Ruchi
ID: 2782518
Vbdream,
It is not good idea to mark your solution as answer. You should mark it as comments. If Rng will find your solution the best solution for this situation, he/she will ask you to mark it as answer, or he/she can accept your solution as answer.
0
 
LVL 9

Expert Comment

by:Ruchi
ID: 2782523
Oops.. I meant Dreamvb. I am sorry!
0
 
LVL 14

Expert Comment

by:wsh2
ID: 2782950
DreamVB Writes:

Private Sub Form_Unload(Cancel As Integer)
 Cancel = 1
 
End Sub

If you need to close the program just press Alt-Ctrl-Delete a couple of times, right?.. 'cause that baby is NEVER going to unload on its own.. <smile>.

Checkout Ruchi's Query_Unload and UnLoadMode test above.

0
 

Author Comment

by:rng
ID: 2784249
Thanx everyone.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now