Using true and false


Licensed User
I submit my experience (problem I had) with true and false.
In my programs I use an Init file where I save setup settings and in particular CheckBox settings. This file is automatically saved at App_Close.
To do that I used variables to store the CheckBox.Checked setting.
These variables were saved in the Init file.
The problem I had was on the device.

The first time I used the program on the device, without having changed the values in the CheckBoxes these variables had the value of 0.

After reading the file and setting
CheckBox1.Checked=0 works in the IDE does not work on the device

After checking and unchecking the CheckBox the variables become
false which is OK.
Before finding this I tried to use boolean variables declared as
Dim CheckBox1_2(1) as boolean

After reading the file
CheckBox1.Checked=CheckBox1_2(0) works on the device but not in the IDE
Erel, is this the same as in post?

I solved the problem in not using variables any more and saving directly the Checked parameter
and the same in reading

I added a small program that shows the different behaviours.

Hope this could avoid some trouble to others.