Hi guys!
First of all i'm sorry if there is some topic about this already but i couldn't find it because i didn't discovered correct words for it.
Here is issue about ini file function. I'm trying to do function which check do Textbox.text match any text under specific section in ini file. If one of those Key's are matching Textbox.text, then it will put it to Label.text. I wonder is there any easy way to do this and is there any way to do this without opening it and activating it.
I appreciate every comment which i get.
problem with finding matching text from textfile
Page 1 of 15 Replies - 3321 Views - Last Post: 30 November 2012 - 10:26 AM
#1
problem with finding matching text from textfile
Posted 29 November 2012 - 09:45 AM
Replies To: problem with finding matching text from textfile
#2
Re: problem with finding matching text from textfile
Posted 30 November 2012 - 01:07 AM
OK, If you've already tried, then please post your code and explain the problems you have with it, for two reasons.
1. It shows you've made an attempt.
2. It stops people going over things you've already done.
I'm slightly confused about your comment on searching the text file (or INI file) without opening it?
Have a look here in regards to reading INI files. Take a look at the underlying code, not just the function wrappers for a better understanding and see if you can make use of it for what you need.
1. It shows you've made an attempt.
2. It stops people going over things you've already done.
I'm slightly confused about your comment on searching the text file (or INI file) without opening it?
Have a look here in regards to reading INI files. Take a look at the underlying code, not just the function wrappers for a better understanding and see if you can make use of it for what you need.
#3
Re: problem with finding matching text from textfile
Posted 30 November 2012 - 08:54 AM
Hi maj3091, i'm using INIControl.dll to write and read more easier to ini. Here's my code which i would like to change:
The idea is that when i press button1, it will check do that combobox1.text exist on ini and if yes, then it will write it to label1 which doesnt exist. The problem is that i cant find any solution which helps me with this since i'm pretty new with visual basic but i have used 2-3 months to this program.
P.S. I can post whole source from this form(i have 5 forms on this program) or i could link site where you could download exe which show that i have used time to this. This isnt any homework, this is connection program for my clan mates. I hope i answered to your question. Thanks.
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click SelectINI(Application.StartupPath & "\UGconfig.ini") If ComboBox1.Text = "TDM 50,000xp" Then Connect("63.143.46.162:28970") ElseIf ComboBox1.Text = "FFA 50,000xp" Then Connect("63.143.46.162:28958") ElseIf ComboBox1.Text = "Highrise 24/7" Then Connect("63.143.46.162:28957") ElseIf ComboBox1.Text = "Terminal 24/7" Then Connect("63.143.46.162:28954") ElseIf ComboBox1.Text = "Rust/Skidrow" Then Connect("63.143.46.162:28953") ElseIf ComboBox1.Text = "iSnipe" Then Connect("63.143.46.162:28952") ElseIf ComboBox1.Text = "Zombies 1" Then Connect("63.143.46.162:28950") End If End Sub
The idea is that when i press button1, it will check do that combobox1.text exist on ini and if yes, then it will write it to label1 which doesnt exist. The problem is that i cant find any solution which helps me with this since i'm pretty new with visual basic but i have used 2-3 months to this program.
P.S. I can post whole source from this form(i have 5 forms on this program) or i could link site where you could download exe which show that i have used time to this. This isnt any homework, this is connection program for my clan mates. I hope i answered to your question. Thanks.
#4
Re: problem with finding matching text from textfile
Posted 30 November 2012 - 09:44 AM
This is VB.Net code, so you should ask a mod to move it to the correct section.
I have no idea what INIControl.dll is, but maybe somebody else does and they can offer you more advice specifically related to your issue.
I have no idea what INIControl.dll is, but maybe somebody else does and they can offer you more advice specifically related to your issue.
#5
Re: problem with finding matching text from textfile
Posted 30 November 2012 - 10:13 AM
vb.net, i believe its just visual basic cos i cant find anywhere .net from my studio.
check that link which is on that inicontrol.dll and you will see what it is.
check that link which is on that inicontrol.dll and you will see what it is.
#6
Re: problem with finding matching text from textfile
Posted 30 November 2012 - 10:26 AM
oops, i just noticed that this is vb.net, sry, my bad.
Page 1 of 1