473,473 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

checkbox

i want to disable of enable a groupbox with a checkbox
but it doesn't want to disable
i can enable it but not disable it again

<code>
Private Sub new_project_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

gpsub.Enabled = False

End Sub

Private Sub chbsubprojecten_CheckedChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles chbsubprojecten.CheckedChanged

If chbsubprojecten.CheckState.Checked Then

gpsub.Enabled = True

Else

gpsub.Enabled = False

End If

End Sub

</code>

can anyone hep a newbie
--
Sven Vandamme
Rollegemkapelsestraat 12
8880 Sint-Eloois-Winkel
[e-mail] sv***********@hotmail.com
[tel] 056/509079
[GSM] 0478706801
Nov 20 '05 #1
3 3147
Cor
Hallo Sven,
Same error as me all the time in the text
i want to disable of enable a groupbox with a checkbox of=or
And in the code I think If chbsubprojecten.CheckState.Checked Then

If chbsubprojecten.CheckState= checkstate.Checked Then

To overcome this kind of problems in the program: Set Option Strict in the
top of your
program to On.

When there is such a kind of an error it will be shown in your IDE.
When you think you don't need that, don't use it.

I hope this helps.

Cor
Nov 20 '05 #2
Hello,

"Sven Vandamme" <sv***********@hotmail.com> schrieb im Newsbeitrag
news:uP**************@TK2MSFTNGP09.phx.gbl...
i want to disable of enable a groupbox with a checkbox
but it doesn't want to disable
i can enable it but not disable it again [...] If chbsubprojecten.CheckState.Checked Then


\\\
If chbsubprojecten.CheckState = CheckState.Checked Then
///

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #3
"Sven Vandamme" <sv***********@hotmail.com> wrote in message
news:uP**************@TK2MSFTNGP09.phx.gbl...
i want to disable of enable a groupbox with a checkbox
but it doesn't want to disable
i can enable it but not disable it again


[snip]

Lookup CheckState in the documentation! It is an enum, so CheckState.Checked
_always_ = True. The "Checked" property holds a member of the "CheckState"
enum, and that is the property that will tell you the state of the control.

Try this:

Private Sub chbsubprojecten_CheckedChanged(Object, EventArgs)...
gpsub.Enabled = chbSubprojecten.Checked
End Sub

HTH

~

Jeremy
Nov 20 '05 #4

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

Similar topics

4
by: Fabri | last post by:
How can I, on button click, to select ONLY the following 4 checkbox? I would like to do this without a for loop through form.lenght because this is only an example and I have to apply this script...
4
by: feanor | last post by:
I need to select children checkboxes when selecting the parent one. This is my function: function SelectChildrens(checkbox_name){ form = document.forms; Sname = checkbox_name.split("-"); for...
0
by: mike | last post by:
Hi there: I've read an excellent "how to"-article by Microsoft (no. 306227) - partly cited cited at the end of this email). I have implemented the code related to the part "How to Add a...
2
by: bebop | last post by:
I'm using three checkbox web controls in C# .NET and one button, and one labe Is there a way to "group" these individual checkbox web controls If so, do I use a for loop, hashtable, array,...
5
by: DotNetJunkies User | last post by:
1. i want to populate checkboxlist using javascript only at client side ....how can i do this..by populate word i mean that checkboxes should be checked or unchecked on some condition basis.......
2
by: Adam Knight | last post by:
Hi all, I have a datagrid with a checkbox in one column. The checkbox is set to autopostback and calls a method named UpdateMailSubscribers. The first click on the checkbox cause the page to...
2
by: Ceema M via DotNetMonster.com | last post by:
Hello all, I have a nested repeater, which displays categories(parent repeater) and corresponding subcategories(child repeater). Both repeaters have checkboxes. When I check category checkbox...
4
by: Wolfgang Uhr | last post by:
Hello I've the following code Panel pnlData = new System.Windows.Forms.Panel(); CheckBox checkBox = new System.Windows.Forms.CheckBox(); checkBox.AutoSize = true; checkBox.Dock =...
10
by: rn5a | last post by:
All the rows in a DataGrid, including the Header, are accompanied with a CheckBox. I want that when the CheckBox in the Header is checked, then all the CheckBoxes should automatically get checked....
0
by: cyberdawg999 | last post by:
Greetings all in ASP land I have overcome one obstacle that took me 2 weeks to overcome and I did it!!!!! I am so elated!! thank you to all who invested their time and energy towards helping me...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.