Welcome to Dream.In.Code
Getting VB.NET Help is Easy!

Join 117,527 VB.NET Programmers for FREE! Ask your question and get quick answers from experts. There are 1,971 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



a question about checkedbox list

 
Reply to this topicStart new topic

a question about checkedbox list, how can i save changes that happen to it and change the text

narmer93
post 2 Jul, 2008 - 04:49 AM
Post #1


D.I.C Head

**
Joined: 13 Mar, 2008
Posts: 220



Thanked 1 times
My Contributions


hi i am asking about the checked boxlist,i think i will make a sort of a reminder for things i will do,i will make a form contains a checkboxlist with all things that i have to do that day and i will mark the dome actions,now the problem is how can i save the changes that happen to the list as a user not a programmer biggrin.gif
User is offlineProfile CardPM

Go to the top of the page


dineeshd
post 2 Jul, 2008 - 06:11 AM
Post #2


D.I.C Addict

Group Icon
Joined: 30 Jun, 2008
Posts: 543



Thanked 15 times

Dream Kudos: 575
My Contributions


QUOTE(narmer93 @ 2 Jul, 2008 - 04:49 AM) *

hi i am asking about the checked boxlist,i think i will make a sort of a reminder for things i will do,i will make a form contains a checkboxlist with all things that i have to do that day and i will mark the dome actions,now the problem is how can i save the changes that happen to the list as a user not a programmer biggrin.gif


This doesn’t seems to be a big challenge, you must be saving the list items to database right? Just keep a flag against each item in database, For Example:

Items Status

Item1 1
Item2 0
Item3 1
Item4 0

Where 0 stands for not done and 1 stands for done. When you retrieve the data keep the item checked if status is 1. Isn’t that too easy….

Or if you don’t want to use database to save the data, then you can use the .ini file or a simple text file to store data.
User is offlineProfile CardPM

Go to the top of the page

AdamSpeight2008
post 2 Jul, 2008 - 06:50 AM
Post #3


DICula

Group Icon
Joined: 29 May, 2008
Posts: 602



Thanked 38 times

Dream Kudos: 2000
My Contributions


Be aware thats are 3 possibles values for checked.
0 Unchecked
1 Checked
2 Indeterminate

This post has been edited by AdamSpeight2008: 2 Jul, 2008 - 06:56 AM
User is offlineProfile CardPM

Go to the top of the page

narmer93
post 3 Jul, 2008 - 06:29 AM
Post #4


D.I.C Head

**
Joined: 13 Mar, 2008
Posts: 220



Thanked 1 times
My Contributions


well about saving changes to a .txt file
i think it will be as the following but
vb

System.IO.File.WriteAllText("c:\Documents and Settings\Administrator\Desktop\New Microsoft Office Word Document.doc", ???)

what will i type instead of ???
there will be many things or i will use
vb

if checkbox1.checked=true then
System.IO.File.WriteAllText("c:\Documents and Settings\Administrator\Desktop\New Microsoft Office Word Document.doc", chechbox1.text+" is done")
else if
if checkbox1.checked .......................................................................................................

it will be so boaring
i know i will use
vb

Public Class Form1

Private Sub Form1_close(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles MyBase.FormClosed
'the code here'
End Sub
End Class

but how can i simply open the form ,check some boxes,open it a gain and the changes are saved,and i want also to be able to change the text in the checkboxes and a timer to tell me when something comes i think i will take care of the timer
vb

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If Now.DayOfWeek = DayOfWeek.Thursday And Now.Hour = 16 And Now.Minute = 24 And Now.Second = 0 Then
My.Computer.Audio.Play("'wav file location'")
End If
End Sub

now i can take care of the timer,what about saving the changing in the textboxes and the text in them ?
i hope somebody can help me with this
and i didn't understand that part of saving the file to database or ini file cuz i don't have enough experience yet to do these things
User is offlineProfile CardPM

Go to the top of the page

dineeshd
post 3 Jul, 2008 - 06:54 AM
Post #5


D.I.C Addict

Group Icon
Joined: 30 Jun, 2008
Posts: 543



Thanked 15 times

Dream Kudos: 575
My Contributions


Storing the data in text files is not seems to be a smart idea. Why don't you try the ini files....

Please check the below link to get some idea about ini files.....

http://www.dreamincode.net/forums/showtopic56479.htm
User is offlineProfile CardPM

Go to the top of the page

Damage
post 3 Jul, 2008 - 03:23 PM
Post #6


D.I.C Regular

Group Icon
Joined: 5 Jun, 2008
Posts: 473



Thanked 2 times

Dream Kudos: 75
My Contributions


just out of curiosity, why are you writing to a text file and not a small database?
User is offlineProfile CardPM

Go to the top of the page

narmer93
post 3 Jul, 2008 - 03:32 PM
Post #7


D.I.C Head

**
Joined: 13 Mar, 2008
Posts: 220



Thanked 1 times
My Contributions


i don't have experience yet about database and i have no idea about it ,can any body tell me where i can find some free tutorials about databse?
User is offlineProfile CardPM

Go to the top of the page

Damage
post 3 Jul, 2008 - 03:48 PM
Post #8


D.I.C Regular

Group Icon
Joined: 5 Jun, 2008
Posts: 473



Thanked 2 times

Dream Kudos: 75
My Contributions


GOOOGLE!!

sorry, don't know any off hand
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 10/7/08 03:58PM

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month