[Help]Code Database

Posts 3141 of 41 · Page 3 of 3
Easiest way isn't through string manipulation at all, just rewrites and overwrites the text, or ...Use a database
is there a tut on database?
Plenty of tuts on Databases, and some personal favorites like XML Schema, the information is extensive, but 1000 times more effective and easier to query and maintain
ok i have one more request.

how do u allow the user to create their own checkboxitem?
[php]
Dim checkBox1 As New CheckBox()

'Set appearance don't add this line if you want the appearance to be the standard appearance
' checkBox1.Appearance = Appearance.Button

' Turn off auto Check/ Don't add this if you want the user to be able to check, auto check off will allow it to check programatically , but not by the user.
' checkBox1.AutoCheck = False

'Set the name of the new text box
Checkbox1.text = "New Control"

' Add the checkbox to the form
Controls.Add(checkBox1)

[/php]
I thought I should state you could always use the Object Orientated approach.
Code:
Class HackData
	public string _Name
	Collection Data
End Class
You can add ANY object to a list/tree view, as long as you wrap the ToString() approach to output _Name.

Regards,
-Schyler-
OK, ppl2pass, I got sometime and here's the code you need:

Create a button. Double click it and add the following code:
[php] Dim str As String = My.Computer.FileSystem.ReadAllText("D:\ddd.txt")


If chklist.SelectedIndex = chklist.Items.Count - 1 Then

Dim x1 As Integer = Str.IndexOf(chklist.SelectedItem, 0) + chklist.SelectedItem.ToString.Length + 1
Dim MJ As String = Mid(Str, x1).Trim


Dim NewMJ As String = ""


NewMJ = TextBox1.Text
str = str.Replace(MJ, NewMJ)


My.Computer.FileSystem.WriteAllText("D:\ddd.txt", str, False)


Else

Dim x1 As Integer = str.IndexOf(chklist.SelectedItem, 0) + chklist.SelectedItem.ToString.Length + 1
Dim x2 As Integer = str.IndexOf(chklist.Items(chklist.SelectedIndex + 1), x1) + 1
Dim MJ As String = Mid(str, x1, x2 - x1).Trim
Dim NewMJ As String = ""


NewMJ = TextBox1.Text
str = str.Replace(MJ, NewMJ)


My.Computer.FileSystem.WriteAllText("D:\ddd.txt", str, False)

End If
[/php]

Working: When you have a selected item and you made any changes to the textbox and then press the button, the changes will be saved.

Tested and working perfectly fine !!

I hope this is the same as required And congrats for having a custom database

Regards
@ MJ's code

Does everyone know that all these codes are MSDN standard and come with documentation, Sometimes may be a faster solution then waiting for someone , MSDN Library offers a full list of code and functions (standards) plus (in most cases) Documentation , and samples.

Just pointing out, that if you were waiting for that, you could have grabbed it from MSDN.
Quote Originally Posted by NextGen1 View Post
@ MJ's code

Does everyone know that all these codes are MSDN standard and come with documentation, Sometimes may be a faster solution then waiting for someone , MSDN Library offers a full list of code and functions (standards) plus (in most cases) Documentation , and samples.

Just pointing out, that if you were waiting for that, you could have grabbed it from MSDN.
Ssssssshhhhhhhhhhhhhhhhh Next, Don't tell them the secret of writing such type of string formatting, coz they are polishing my string formatting skills lol
Quote Originally Posted by MJLover View Post
Ssssssshhhhhhhhhhhhhhhhh Next, Don't tell them the secret of writing such type of string formatting, coz they are polishing my string formatting skills lol
Sorry, Shh shh
gonna give everyone a thank :P
Posts 3141 of 41 · Page 3 of 3
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?