473,320 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

close icon disable

Hi,

I would like to disable the close icon on the
form which will be available at the right most corner of
the form in VB.NET which property i have to set.

Regards,
Krishna.
Nov 21 '05 #1
3 1563
Krishna,

Although it is easy to do, will disabling the close button probably mean
that your users will call this a bug.

In my opinion is better to set the controlbox to false.

I hope this helps?

Cor

"krishna" <ve*************@gmail.com>
Hi,

I would like to disable the close icon on the
form which will be available at the right most corner of
the form in VB.NET which property i have to set.

Regards,
Krishna.

Nov 21 '05 #2
"krishna" <ve*************@gmail.com> schrieb:
I would like to disable the close icon on the
form which will be available at the right most corner of
the form in VB.NET which property i have to set.


<URL:http://dotnet.mvps.org/dotnet/code/windowsandforms/>
-> "Entfernen der "Schliessen"-Systemschaltfläche eines Formulars"

Ignore the text and take a look at the code...

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #3
Put this anywhere in the form.

Protected Overrides ReadOnly Property CreateParams() As CreateParams

Get

Dim cp As CreateParams = MyBase.CreateParams

Const CS_DBLCLKS As Int32 = &H8

Const CS_NOCLOSE As Int32 = &H200

cp.ClassStyle = CS_DBLCLKS Or CS_NOCLOSE

Return cp

End Get

End Property
"krishna" <ve*************@gmail.com> wrote in message
news:0e****************************@phx.gbl...
Hi,

I would like to disable the close icon on the
form which will be available at the right most corner of
the form in VB.NET which property i have to set.

Regards,
Krishna.

Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Nick250 | last post by:
I have a simple app that I created for our Real Estate office using Access 2000 and it is working fine except for on thing. I need to keep the close button hidden from the users. No problem...
1
by: redneon | last post by:
Is it possible to stop the menu from appearing when you click the icon on a Window's title bar? I'm wanting to use it as a button for a different purpose. I've tried capturing all the messages that...
1
by: Alpha | last post by:
I have a Window based application that shows up still running in the task manager when I close it. It reaches the "this.close" statement and then it stops at the "}" at the section of the...
1
by: radhikaullas | last post by:
hello i need a code for to disable the close icon in browser or how to handle session if the user close the window not logout please help for me
6
by: DhananjayPatki | last post by:
Hello, I wnat the code , how to disable the Close(x) icon script using java script . is there any event that can be used to prompt the user before closing the new window.
5
by: Rick | last post by:
I'm moving Access2000/2003 apps into Access2007 running on XPpro Dells. I've found where to lower the macro security and with a tweak to references have allowed me to use my custom toolbars...
10
by: viki1967 | last post by:
Disable/enable icon.gif Hi all. I have this form in the page.htm: <form action="form.asp" method="post" onsubmit="return(validateForm(this));"> <select size="1" name="t_im"...
1
by: =?iso-8859-1?B?S2VyZW0gR/xtcvxrY/w=?= | last post by:
Hi, how can i remove/disable the tray icon for the started Express Edition from the system tray. Te icon directs me to the express editons website after clicking on it. I dont want these tray...
5
by: Tony | last post by:
I am continuing to develop an Access 2007 application which was originally converted from Access 2003. In Access 2003 I was able to disable the Access Close button in the top righthand corner of...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.