Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 2 online users. » 0 Member(s) | 1 Guest(s) Google
|
Latest Threads |
Looking for Adventure? Fi...
Forum: Random Discussion
Last Post: iHOMEz
11-16-2024, 09:18 PM
» Replies: 0
» Views: 508
|
Prettys Womans in your to...
Forum: Random Discussion
Last Post: iHOMEz
10-30-2024, 07:45 AM
» Replies: 0
» Views: 805
|
Prettys Womans in your ci...
Forum: Random Discussion
Last Post: iHOMEz
10-26-2024, 10:50 AM
» Replies: 0
» Views: 821
|
Beautiful Womans from you...
Forum: Random Discussion
Last Post: iHOMEz
10-19-2024, 02:48 PM
» Replies: 0
» Views: 919
|
Prettys Womans in your ci...
Forum: Random Discussion
Last Post: iHOMEz
10-06-2024, 05:00 PM
» Replies: 0
» Views: 1,080
|
Womans from your city - V...
Forum: Random Discussion
Last Post: iHOMEz
07-28-2024, 10:26 AM
» Replies: 0
» Views: 1,459
|
Supreme Сasual Dating - A...
Forum: Random Discussion
Last Post: iHOMEz
06-14-2024, 11:28 AM
» Replies: 0
» Views: 1,880
|
Beautiful Womans in your ...
Forum: VB.NET
Last Post: iHOMEz
06-09-2024, 09:23 PM
» Replies: 0
» Views: 1,686
|
Hangman in Rust
Forum: Other
Last Post: brandonio21
02-04-2018, 11:14 AM
» Replies: 2
» Views: 20,697
|
How to: Search files from...
Forum: VB.NET
Last Post: brandonio21
11-25-2017, 12:55 PM
» Replies: 1
» Views: 16,012
|
|
|
Help with IndexOutOfRange Exception |
Posted by: FtDLulz - 04-04-2012, 09:40 PM - Forum: VB.NET (Visual Basic 2010/2008)
- Replies (3)
|
|
I keep getting this error when trying to run my program and click on something in a listbox.
IndexOutOfRangeException was unhandled Index was outside the bounds of the array.
My Code and the part where it errors (Marked with ><):
Code: Dim conn As MySqlConnection
conn = New MySqlConnection("server=db4free.net;port=3306; user id=*******; password=**********; database=*******")
Dim sqlquery As String = "SELECT * FROM UTGAccess"
Dim adapter As New MySqlDataAdapter
Dim data As MySqlDataReader
Dim command As New MySqlCommand
conn.Open()
command.CommandText = sqlquery
command.Connection = conn
adapter.SelectCommand = command
data = command.ExecuteReader
While data.Read()
ListBox1.Items.Add(data(1).ToString)
ListBox3.Items.Add(data(0).ToString)
Dim writer As New System.IO.StreamWriter(My.Application.Info.DirectoryPath + "/" + data(1).ToString + "=" + data(0).ToString + ".txt", False)
writer.Write(data(3).ToString + "=" + data(0).ToString)
writer.Close()
End While
data.Close()
conn.Close()
End Sub
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
ListBox3.SelectedIndex = ListBox1.SelectedIndex
Dim reader As New System.IO.StreamReader(My.Application.Info.DirectoryPath + "/" + ListBox1.SelectedItem.ToString + "=" + ListBox3.SelectedItem.ToString + ".txt")
Dim splitread() As String = reader.ReadToEnd.Split("=")
reader.Close()
>lbl_rank1.Text = "Rank: " + splitread(3).ToString<
lbl_id1.Text = "ID: " + splitread(0).ToString
End Sub
Note that it doesn't error on lbl_id1.text but it does on lbl_rank1.text. The ID is an INT on the site, while the rank is a VARCHAR. Both are numbers.
I tried rank with an INT too.
In the database:
0 = ID
1 = Username
2 = Password
3 = Rank
|
|
|
Creating Custom Events |
Posted by: brandonio21 - 04-03-2012, 12:57 PM - Forum: Code Snippets
- Replies (3)
|
|
This code snippet was made after hours of work on my project QuickClean
To make a custom event, the first thing you are going to do is declare the event for global usage in the global declarations section of your class. For example,
Code: Public Class Modes
Event onModeSwitch()
'Sample method
Public Sub New()
Msgbox(":D")
End Sub
End Class
Then, in order to call this event, you must use the code snippet RaiseEvent
So, using our same example:
Code: Public Class Modes
Event onModeSwitch()
'Sample method
Public Sub New()
Msgbox(":D")
End Sub
'Sample Method to Raise Event
Public Sub SwitchMode()
RaiseEvent onModeSwitch()
End Sub
End Class
Now, every time the SwitchMode method is called, the event onModeSwitch will be called. This event can now be accessed in the code viewer on any new instance of this class.
|
|
|
I am Back |
Posted by: Vinwarez - 04-03-2012, 05:59 AM - Forum: Off-Topic
- Replies (4)
|
|
It has been like 2 weeks since I last visited this forums. [Insert Thread Title Here], just saying.
<!-- m --><a class="postlink" href="http://youtu.be/Q2J9F2sJMT4">http://youtu.be/Q2J9F2sJMT4</a><!-- m -->
|
|
|
How to create a change password Button?? |
Posted by: Himansh - 03-29-2012, 11:45 PM - Forum: VB.NET (Visual Basic 2010/2008)
- Replies (8)
|
|
I have created an application and have added a login form to it so that If you want to access that application you will first need to enter username and password.
Also i have added a button to main application named "Change Password"
But i dont know how to change the real password of form to the password that user types in "change password" dialog box
So can anybody please help me.
Anyway,
Thanks everybody you hv earlier taken interest in my topics!!!!!!!
|
|
|
|