Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Using Checkbox In Lsitbox To Save Settings ??


HI,

i'm making a program that wil change registry settings for a user. I want to build in a listbox in checkbox state and the user must be able to click on the item(There by checking it) en then when the press save and the registry settings will be saved. The problem is i dont how how to get selected box's and pass the value's.

Example.: If a user selected NoFind in the list box i must change the dword HKEY_blabanotherkey..NoFind in to 1
normaly i would do this like X=savesettings HKEY_blabanotherkey..check1.value (i when use checkboxes)

But how do i do this with a listbox ??

Thanx in advance for the help




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Save Settings/load Settings For A Textbox?
anyone know how? or maybe even for a label caption, I just need to know how to keep text in a program without saving it to an external file.

Registry Get Settings Save Settings
I am aware about get and save settings but how can I get settings from the registry from keys outside vb and vba settings or w/e.

Ghost Checkbox Settings
When my program loads I have it search the programs registry entries to retrieve basic options the user has set, however when it loads it sets my check boxe to disabled and checked, however no where in my program are either of those values given to that checkbox. I also looked during design time at the checkbox's properties and those are set to enabled, and unchecked. Any help as to what is going on with these ghost functions would be great, thank you.

Save Settings And Get Settings
Hi all, what i em looking for some one to help me with is this.

i am making a webbroser and i what so when i enter the site onto my combobox it addthesite as a item and also save it to the regedit so the next time i load the app it will add all the saved web in regedit, to the combolist.......

This is how my looks like right now...

Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
WebBrowser1.Navigate Combo1.Text
Combo1.AddItem "http://" & Combo1.Text
SaveSetting "WebSites", "Address", "Site", Combo1.Text

End If
End Sub

Private Sub Form_Load()
Me.WindowState = 2
WebBrowser1.Navigate "www.google.com"
Combo1.Text = "http://www.google.com"
Combo1.AddItem "http://" & GetSetting("WebSites", "Address", "Site", Combo1.Text)
End Sub

But the problem with this code is that it can ONLY SAVE and get one site can you please have a look at it and post the corection that i should of add it to make it work. Thanks

Lsitbox
hi,
how can I select a item from my listbox and made some event occur?
Thanks in advance.
wang

Searching For A Name In A Lsitbox
how would you search for a name in a list box. like if i had a listbox that had these things in it:

blah
blahblah
blahhh

how would i search and find a certain one according to names not index.

Save Settings
I am writing a program (a Html Editor) and everytime I start it up, I have to move it around the screen, resize it, change different options etc.. I want to make a local text file that the program generates to keep track of these settings automatically. I already know how to save it, but I haven't the slightest idea about how to record, retrieve or utilize the data.

An examle of a value would be "mdiHtml.WindowState". On Form_Terminate, I want it to record this setting to the file, then on the next Form_Load to retrieve it and make it match. It should do this with multiple values.

Thanks.

Save Settings
Hello all,

Im trying to save the MSComm settings for serial communication, what can I do to save them even if the program I wrote is closed and started again? Should I use a registry entry, or a temp file hidden somewhere? Its just a couple of strings, please help!

What's The Best Way To Save Settings?
I've been printing settings to text files, and loading them on Form_Load, but I was wondering if there's a better way to save and load settings? Maybe I could do it through the registry or something? I have no idea how, though, so if anyone could help, I would really appreciate it.

[edit] I just realised that this should be in the 'File I/O and Registry' forum, and I appologize for posting it here.

Save Settings
How can I save settings in either the registry or an ini file? Or is there another better way? And the how can I access them

THanks
-Angel

Save Settings
hi,
its me again, yes

my question is: is there an easy way to save settings the person who uses my program made ?

[lots of radio buttons in my program, and i would like to save the settings of which ones were checked]



im thinking i should use a binary file and use the Get command


thanks

P.S. i need both a way to write and read the settings

Please Help With Get / Save Settings In VB 6
Hello, I have created a skinnable game and my question is:

how can I use the save / get settings funtion to where the skin I load will be the default skin loaded on startup?

I need either an example of the save / get settings function for the skinning or a .ini function... The Save Settings / Get Settings need to also work on windows vista... I am using Visual Basic 6.0 and the SkinCrafter 2.8.1 Skin Control... Please help me with this little task.

I would like for example when my game starts on the end user's computer the default skin be loaded, then after they choose to load a different skin from file then that skin will be set as the default skin and when ever they reopen the game (Clicking on the exe) the last skin choosen will be applied on startup...

if you can help please reply to my post or send me an email... thank you...

Save Some Settings
Hi guys i know there is a lot of stuff on this subject because i have googled and read a lot of it. but i cant seem to incorperate what i need to what i have read

i have 4 servers and 2 settings i want to save and read to and from a dat file.
both these settings are saved from and can be read to 2 textboxes i have mastered it kinda
i have them all saved into indiviual dat files. but i would like to iff poss to to save them all to one any ideas please? to recape the 2 text boxes have text in them and this changes dpending on what server i am connected to so all together 8 lines like this would be good

server 1 "line count" "log number"
server 2 "0989869" "Bing"
server 3 "3455667" "What ever"

and so on the text is obviouslt not as in examples but its preaty much the lengh and type basically a log name and line count.

hope this is not to much to ask thanks in advance

Save Settings
hii guy's .
Guy's i have a option of my app , when the user change the option i want
to save it for a next use i know it is save setting's but i want a code please

Save Settings Of An App
I'm working on a program that adjusts light brightness levels and effects etc...I've got everything working, but now I want to be able to save the settings of where the scroll bars are at. So when you open the program, you can open saved settings, and the scroll bars will be adjusted to where you last left them after saving. For now, I just need to do it for one scroll bar, then I'll figure it out later. What I want to do is when you click "save" it reads where the scroll bar is at, and then puts that data in a .txt file. Then when you click "open" and open your last settings, it looks in the .txt file for the number of where the scroll bar was at, and then once it finds where it was at, it adjusts where the scroll bar should be...(the slider thing). I need some code examples...Does anyone know how to do this?

Save Settings
Ok....I've had it with these save settings things! I've looked at guides and i still cant find out how to save the settings so that when the form unloads and loads back up the text box has the text last typed in it. Can someone please post an example! Thx

Save Settings?
Hi all,

I have finally mastered how to save settings to the registry.

My question now is, how can i save + load multiple variables for eg:

check1.value
text1.text
label1.caption


Thanx again

Delete Items From A LsitBox
I'm trying to delete items in a listbox that the user has selected. Currently my code deletes half of the items selected. (If 10 items were selected 5 would be deleted from the listbox, and the other 5 will remain). Any suggestions? Thanks


VB Code:
'*CMDVERIFY_CLICK()************************************************************'NAME: cmdVerify_Click()'DESC: Allows the user to verify that they have counted the selected item(s).Private Sub cmdVerify_Click()    Set connection = New ADODB.connection    connection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _        "Data Source= G:FinanceInventory ControlCycleCountDBcycleCount.mdb"    connection.Open        Dim counter As Integer    Do While counter < lstVerificationScreen.ListCount        If (lstVerificationScreen.Selected(counter) = True) Then             Dim selectStatement, sSQL As String            Dim strArray() As String                        strArray = Split(lstVerificationScreen.List(counter), vbTab, -1, 1)                                           selectStatement = "DELETE FROM [MAIN] WHERE ID=" & strArray(0)                        sSQL = "UPDATE [ALTER] SET TYPEOFCHANGE='DELETED' WHERE [MAIN ID]='" & strArray(0) & "'"                        connection.Execute sSQL                        connection.Execute selectStatement             lstVerificationScreen.RemoveItem (counter)                                End If        DoEvents        counter = counter + 1    Loop            connection.Close    Set connection = Nothing    End Sub'*ENDOF*CMDVERIFY_CLICK()******************************************************  

Plz, Help Me...(Save Checkbox Value)
Hi to everybody!
This is my first post in this forum to in order to ask to you a little help to make my first app!
I have created a check-box, but i dont know how it can set the value "Index" (inside HKEY_LOCAL_MACHINEServicesMyApp key) to 0 when checked and to 2 when un-checked....
....I never programmed befor
Please, helpme!
Tnks soooooooooooooooooo much!
Alex

Checkbox Save
What if i want to save the checkbox so that i dont need to select again when i run the program next time?
Help me if u can pls.

How To Save Paragraph Settings
I need to be able to preserve all the format settings in a given paragraph and then after making some edits in the document, restore the settings.

How can I do this without having to resort to saving every format value individually?

Save Font Settings
I have an option that allows the users to change the default font in 2 text boxes on the form. However they want the settings to remain the same so the next time they open the app the settings they specified will already be set so they don't have to set it back up again. How can I do this

Printer Save Settings
Hy!

I have more than one printer installed on my comuter (local and LAN). I have also some reports to print from a visual basic application.
I need an object or some functions that save some printer settings and apply this different setting when I print different reports.
I try with Printer object from vb but this keep olny few settings(I couldn't save for example the black cartridge instead of the color one). .
I try with Common Dialog but how I save all settings in an object so I can set later the printer settings again!?!?

Thanks!

Save The Connection Settings
I wanted to save the connection settings used while conecting to an SQL server. I am using my program on a network & the SQL server is installed on a different machine. My datasource is the IP addr & the port number to identify the server.

I thought of saving the details in a file on the client's machine & use it. Whenever the IP adress or other fields change it could be updated in the same file.

How can I execute this or is there any other way out which I can use.

Drawbacks To Get And Save Settings
Can anyone tell me please what are the pros and cons of using them?

thanks

Save Current Settings!
Id like to be able to save every control field in my program into a DATabase! and the retreave it later, What is the easiest way to do this?

And Id like to save the current settings. For example, if the user removed the StatusBar, it will be off when the program is next ran.

ListView Save Settings
With a multi columned listview shown as a listreport is there a way to save the size of the columns, (after the user as adjusted them to their liking) to the registry so when the program is reopened they won't have to set them again? Thanks in advance

Wanting To Save Settings
Hello there

I want to save my setting of a bg color to a file and am running into a wall
Code:
Private Sub Command1_Click()
Dim L As String
L = NSXPFrame.BackColor
Call OpenFileColors
Put #FileNum, 1, L
Call CloseFile

Call OpenFileColors
Message = String(15, " ")
Get #FileNum, 1, Message
SentTxt = Message
Call CloseFile

End Sub


I just can't Finger it out on the keyboard
Please help.

Thanks
Travis

Don't Save In VB And VBA Program Settings
I have a program that uses the registry. However, it saves all the registry settings under HKEY_CURRENT_USER - Software - VB and VBA Program Settings - My Program

How can I get it to NOT save under the VB and VBA Program Settings? Why can't I just have HKEY_CURRENT_USER - Software - My Program or something? I partially also need this for trial version purposes in another program of mine.

In What Format And How Could I Save Settings?
I am creating a small program whose window has lots of combobox, optionbutton, checkbox, and textbox, because there are two many inputs (more than 200), so I want to add SAVE and LOAD button. I have connected these two buttons with Common Dialog. So when SAVE button is clicked, the common dialog opens and let the user choose a folder to save, when LOAD button is clicked, user can find his prefiously save file and all previous setting could be automatically put onto the window.

My question are:

what file format should be used? how to save and load?
what data structure should be used inside my code?

I am a newbie, sorry for this basic question, hope you could help me a little, thx a lot.

How To Save Form Settings..................
I want to save the form settings before closing the form. say, if I select an item in a combobox close the form, and open it again, I need to see the item in the combobox... how can i declare a global variable?
thanks

How To Save & Retrieve App Settings Using ADO?
How I can save and retrieve my application settings using ADO?

Any help will be greatly appreciated!

Save CheckBox, TextFile...
When I to write in a TextBox or to select a CheckBox and to close the Form and to open checkbox that he was selected and the TextBox that was written am SAVE

If I to write "TEST" in a TextBox...
If I to select a CheckBox (CheckBox = 1)

It is possible to save without using none .ini, .txt. To save direct in the APP?

Save Checkbox State
I have a form with 4 checkboxes (frmOptions)
I need to be able to click a Command button (Apply) and have the state of the boxes (checked or not) saved to either a config file or registry so the next time my app is started the checkboxe states are the same.

Checkbox Wont Save.. VB6
Hi, im trying to use a checkbox on my vb form to save to my access db, the code im trying to use for the save routine is:


Code:
if check1.value <> "" then .fields("booked1") = check1.value


it keeps saying... type mismatch and highlighting this line... the field in the db is a yes/ no so it should work.. can anyone suggest anything??
sean

Save Checkbox Inputs To INI
Hello again...

I finished my status bar thing and now i need to add a settings part...

I have the GUI done and I have 5 checkboxes and 2 Textfields and i am curious on how i would save that to: data.ini

Like:
FIELD1="FIELD1 DATA"
FIELD2="FIELD2 DATA"
CHECK1=TRUE
CHECK2=FALSE
CHECK3=TRUE
etc...
And when they open the settings part it loads these from the ini file
if blank, then none are filled.

Thanks in advance,
ArticWoof

How Do I Save A Checkbox To File?
'Not sure how to do this I have tried a few different things?
'bottom of code explains

VB Code:
Private Sub cmdSaveRecord_Click()Dim check1 As String   If txtRegNo.Text = "" Then   MsgBox "Registration number must be entered"   txtRegNo.SetFocus   Exit Sub   ElseIf Not IsNumeric(Me.txtRegNo) Then    MsgBox "You have entered a non-numeric value, please enter a number that is 5 digits in length", vbCritical, "input error"    Me.txtRegNo.SetFocusExit Sub   ElseIf Len(Me.txtRegNo) < 5 Then    MsgBox "You have entered a number less than 5 digits. Enter only a 5-digit number", vbCritical, "input error"    Me.txtRegNo.SetFocus    Exit Sub   ElseIf txtAddress.Text = "" Then   MsgBox "Address must be entered"   txtAddress.SetFocus   Exit SubElseIf txtCountry.Text = "" Then   MsgBox "Country must be entered"   txtCountry.SetFocus   Exit SubElseIf txtPhone.Text = "" Then   MsgBox "Phone number must be entered"   txtPhone.SetFocus  Exit SubElseIf Not IsNumeric(Me.txtPhone) Then    MsgBox "You have entered a non-numeric value, please enter a number that is 10 digits in length", vbCritical, "input error"    Me.txtPhone.SetFocus  Exit SubElseIf Len(Me.txtPhone) < 10 Then    MsgBox "You have entered a number less than 10 digits. Enter area code and number", vbCritical, "input error"    Me.txtPhone.SetFocus  Exit SubElseIf txtZipCode.Text = "" Then   MsgBox "Zipcode must be entered"   txtZipCode.SetFocus  Exit SubElseIf Not IsNumeric(Me.txtZipCode) Then    MsgBox "You have entered a non-numeric value, please enter Zip Code that is 5 digits in length", vbCritical, "input error"    Me.txtRegNo.SetFocus  Exit SubElseIf Len(Me.txtZipCode) < 5 Then    MsgBox "You have entered a number less than 5 digits. Enter only a 5-digit Zip Code", vbCritical, "input error"    Me.txtZipCode.SetFocus  Exit Sub  End If'When all data has been entered into text boxes and you press the command button (save record) it will be written and saved to a file for later viewingOpen "C:offdatafile.txt" For Append As #1Write #1, UCase$(txtAddress.Text), UCase$(txtCountry.Text), UCase$(txtPhone.Text), UCase$(txtZipCode.Text), UCase$(txtRegNo.Text), UCase$(cboMonth.Text), UCase$(cboDay.Text), UCase$(cboYear.Text), UCase$(optMale), UCase$(optFemale),txtAddress.Text = ""   'data entered into these text boxes will be saved to a filetxtCountry.Text = ""txtPhone.Text = ""txtZipCode.Text = ""txtRegNo.Text = ""cboMonth.Text = ""cboDay.Text = ""cboYear.Text = ""optMale = "true"optFemale = "true"'right here I want to add check boxes to save to file'But don't know what to put?'like--> check1 = "?"Close #1End Sub

How To Save Checkbox Value After Closing
Hi,

Just wondering how a programme would remmember the value when application closes and has that value when application starts up.

Regards

David        

Save Checkbox State
Hi, I want to save the state of a checkbox ie.. if checked save it and when app restarts the checkbox is checked.

thanks

David

Save Checkbox Values To Ini
I have an ini file that i'm already using for two listboxes, and I want to use it to store the values of two checkboxes (chkA, chkB). I'm not really sure how to code for an ini in the first place (found code), so please explain whats happening.

Thanks for any help.

Struggling To Save Settings To File
Hi im fairly new to VB and having problems saving the settings of the program.

Here is an example:

Form1 = splash screen
Formmain = main menu

I have a checkbox on form1 and an apply button, If the box has been checked the splash screen should not load up on the next startup.

I need the settings for this to be stored in the App.path in a txt/ini or whatever as the registry is locked.

Thanks for any help with this.

Save Excel As Csv Without Regional Settings
Hi all,

I'm pretty new to VBA/Macros.

We have a spreadsheet that we need to save as a csv file. Not problem if you're regional settings are US or UK English. When one of our German users saves the file as a csv, it uses the German field separator (semi-colon) instead of a comma.

Now according to the MS knowledgebase, if I save the file as csv using VB, it should ignore the regional settings and use a comma.

The statement I'm using is

ActiveWorkbook.SaveAs FileFormat:=xlCSVWindows

Unfortunately, it still saves it with the semi-colon instead of a comma.

Any ideas?

Excel is 2000, running on W2K. VB6.08714

TIA,

Rob

HOWTO: Save Settings At Run Time..
Hello to all!


Scenario: (Just an example) I have a combo box, a textbox and a command button.. What I want to do is to put what I've entered in the textbox in the combo box when I press the command button.. So the next time I run the program, the previous entry in the combo box is already there.

The problem is, is it possible to save it without using any file(e.g. text file)?
If yes, how?

Please give me an example.. Thanks..

HowTo (WhereTo) Save App Settings ??
Is there any way to write information in exe file, so apps which
consist of just one exe file without resource files can store their settings?
(not windows registry, because if EXE is moved to another computer, settings are lost)

Save Settings After Exit And Reboot
Everyone,

I know it is possible to save preferences settings so that even if you shut down and restart your computer the preferences are saved. If I want to save the value of a variable so that when the computer is shut down and restarted i could retreive the variable, how could I do this.

I have looked through some threads and it looks like I can write the variables and values to a text file within the program directory but what would the code look like to export and then import the values?

I know this is most likely a very simple thing to do but I just can't seem to get it.

Thanks for your help

Myapp Save Settings Problem
hi, how to save the button caption into settings.dat
then when i run my .exe i want the settings.dat read in my button caption

this is my code


VB Code:
Option Explicit Private Sub Form_Load()Dim strline As StringOpen App.Path & "settings.dat" For Input As #1  Do While Not EOF(1)    Line Input #1, strline    strline = (strline)    txtTest.Text = txtTest.Text & strline  LoopClose #1txtTest.Visible = FalseCall MsgBox("ito ung demo ko sa TapShell... paki test... - monxxx  ", vbOKOnly + vbInformation + vbApplicationModal, "About")End Sub Private Sub cmdShell_Click()On Error GoTo Error:Shell (txtTest.Text), vbNormalFocusExit SubError:Call MsgBox("Can't Find Executable Files, Please Select Manually  ", vbOKOnly + vbInformation + vbApplicationModal, "Information")Call cmdET_ClickEnd Sub Private Sub cmdET_Click()With cdlg     .Filter = "Executable Files (*.exe)|*.exe"     .ShowOpentxtTest.Text = .FileNameEnd WithEnd Sub Private Sub cmdEC_Click()Dim myvalue As Stringmyvalue = InputBox("Edit Caption", "Information", cmdShell.Caption)cmdShell.Caption = myvalueEnd Sub Private Sub cmdSS_Click()Dim ff As Integerff = FreeFileOpen App.Path & "settings.dat" For Output As #ffPrint #ff, txtTest.TextClose #ffEnd Sub

Save/restore Toolbar Settings
Toolbar1( MSComctlLib), how can i save and restore a user settings. after a user customzes a toolbar, am saving the settings using the toolbar save method and restoring using the restore method when the app loads again.but the toolbar is reverting to the degin time status

Auto Save Settings In Program VB 6.0
Hello,

How to I get my program to auto save everything that was change during the time it was running.. Like lets say I have a check box list and the user checks one of the options. How do I make it auto save that setting?

Thank you!

Copyright © 2005-08 www.BigResource.com, All rights reserved