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) Bing
|
Latest Threads |
Hangman in Rust
Forum: Other
Last Post: brandonio21
02-04-2018, 11:14 AM
» Replies: 2
» Views: 18,437
|
How to: Search files from...
Forum: VB.NET
Last Post: brandonio21
11-25-2017, 12:55 PM
» Replies: 1
» Views: 14,074
|
Database error anyone hel...
Forum: VB.NET
Last Post: brandonio21
11-25-2017, 12:46 PM
» Replies: 2
» Views: 15,892
|
Character ammount
Forum: Java
Last Post: brandonio21
04-28-2016, 02:13 PM
» Replies: 1
» Views: 17,806
|
RunAsAdmin
Forum: VB.NET
Last Post: brandonio21
04-15-2016, 11:11 AM
» Replies: 2
» Views: 20,168
|
Krypton Toolkit Download
Forum: VB.NET
Last Post: brandonio21
03-28-2016, 07:55 PM
» Replies: 0
» Views: 10,885
|
Adding backgroundcolor to...
Forum: Java
Last Post: brandonio21
09-01-2015, 10:09 PM
» Replies: 1
» Views: 14,507
|
Using a string as an alia...
Forum: VB.NET
Last Post: brandonio21
06-20-2015, 09:00 PM
» Replies: 1
» Views: 13,420
|
Read all lines from multi...
Forum: VB.NET
Last Post: strawman83
06-04-2015, 08:54 AM
» Replies: 2
» Views: 17,513
|
Filter each cell in dgv
Forum: VB.NET
Last Post: brco900033
05-08-2015, 09:51 AM
» Replies: 4
» Views: 22,477
|
|
|
Mobile Development |
Posted by: dmarks2061 - 04-07-2013, 06:48 AM - Forum: Programming Help
- No Replies
|
|
I want to do some 'droid development and I'm looking for the best way to get up to speed quickly. Everybody says Java is the way to go, but I'd like to find a 'trail' that will get me there. "There's an app for that," right? I want to write some of those apps and publish them in the Play Store. Any suggestions?
|
|
|
Adjustable Screen Shot Taker |
Posted by: Wannabeprogramer - 04-04-2013, 07:39 AM - Forum: Request a Video
- Replies (1)
|
|
I have been wanting to find out how to make a screen shot program. Please make a video about how one could make a screen shot program that doesn't show the program while you take the picture. If you would that would be great man... I LOVE YOUR VIDEOS!!!! <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
|
|
I am getting problem with brandonio's registration form... |
Posted by: mnxford - 03-26-2013, 11:55 AM - Forum: Programming Help
- Replies (1)
|
|
hello guys,
Following the tutorials of brandonio i made a registration form and tried to give some additional features to it.
Here the code of the registration form:
[code2=vbnet]Imports System.Windows.Forms
Imports MySql.Data.MySqlClient
Public Class registrationForm
Public conn As MySqlConnection
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
conn = New MySqlConnection(ServerString)
'/ Username existing verification
If tbx_username.Text = Nothing Or tbx_password.Text = Nothing Or tbx_conPassword.Text = Nothing Or tbx_email.Text = Nothing Or tbx_realname.Text = Nothing Then
MsgBox("Please fill up all the fields.", MsgBoxStyle.Information, "Error")
Else
Dim Username As Boolean = True
Dim Email As Boolean = True
conn.Open()
Dim sqlquery As String = "SELECT * FROM reg_members WHERE Username = '" & tbx_username.Text & "';"
Dim data As MySqlDataReader
Dim adapter As New MySqlDataAdapter
Dim command As New MySqlCommand
command.CommandText = sqlquery
command.Connection = conn
adapter.SelectCommand = command
data = command.ExecuteReader
While data.Read()
If data.HasRows() = True Then
MsgBox("Username is already in use!", MsgBoxStyle.Exclamation, "Error")
Username = False
data.Close()
Else
data.Close()
Username = True
End If
End While
data.Close()
'/ Email existing verification
Dim sqlquery2 As String = "SELECT * FROM reg_members WHERE Email = '" & tbx_email.Text & "';"
Dim data2 As MySqlDataReader
Dim adapter2 As New MySqlDataAdapter
Dim command2 As New MySqlCommand
command2.CommandText = sqlquery2
command2.Connection = conn
adapter2.SelectCommand = command2
data2 = command2.ExecuteReader
While data2.Read()
If data2.HasRows() = True Then
MsgBox("Email is already in use!", MsgBoxStyle.Exclamation, "Error")
Email = False
data2.Close()
Else
data2.Close()
Email = True
End If
End While
data2.Close()
'/ Data entry section
If Not tbx_conPassword.Text = tbx_password.Text Then
MsgBox("Password doesn't match!", MsgBoxStyle.Critical, "Error")
Else
If Username = True And Email = True Then
Dim sqlquery3 As String = "INSERT INTO reg_members (Username, Password, Email, FullName)VALUES ('" & tbx_username.Text & "','" & tbx_password.Text & "','" & tbx_email.Text & "','" & tbx_realname.Text & "')"
Dim data3 As MySqlDataReader
Dim adapter3 As New MySqlDataAdapter
Dim command3 As New MySqlCommand
command3.CommandText = sqlquery3
command3.Connection = conn
adapter3.SelectCommand = command3
data3 = command3.ExecuteReader
MsgBox("You have successfully registered! Now you can log in.", MsgBoxStyle.Information, "Registration Successful")
Me.Close()
loginForm.Show()
End If
End If
End If
End Sub
Private Sub tbx_conPassword_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tbx_conPassword.TextChanged
If Not tbx_conPassword.Text = tbx_password.Text Then
Label8.Text = "Password doesn't match."
Else
Label8.Text = ""
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
tbx_username.Clear()
tbx_password.Clear()
tbx_conPassword.Clear()
tbx_email.Clear()
tbx_realname.Clear()
End Sub
End Class[/code2]
I have added the features to say email already exist as the login form already says that username already exist...but it works only for the username but not for the email address....after trying the code it gives an error of db conn close needed or open neeede or already opened such type of errors...
Please help me how can I solve this problem and what is the solved code.Please provide me the correction of this code...
Brandonio bro needs your help.....
Thanks in advance.......
|
|
|
i am getting a problem with brandonio's login form |
Posted by: mnxford - 03-26-2013, 11:51 AM - Forum: Programming Help
- Replies (1)
|
|
hello guys,
Following the tutorials of brandonio i made a login form and tried to give some additional features to it.
Here the code of the login form:
Code: Imports MySql.Data.MySqlClient
Public Class loginForm
Public conn As MySqlConnection
Private Sub loginButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles loginButton.Click
conn = New MySqlConnection(ServerString)
Select Case ComboBox1.Text
Case "Normal Member"
If txtUsername.Text = Nothing Or txtPassword.Text = Nothing Then
MsgBox("Please fill up all the fields.", MsgBoxStyle.Information, "Error")
Else
Me.Cursor = Cursors.AppStarting
Try
conn.Open()
Dim sqlquery As String = "SELECT * FROM reg_members"
Dim data As MySqlDataReader
Dim adapter As New MySqlDataAdapter
Dim command As New MySqlCommand
command.CommandText = sqlquery
command.Connection = conn
adapter.SelectCommand = command
data = command.ExecuteReader
While data.Read()
If data.HasRows() = True Then
If Not data(1).ToString = txtUsername.Text Then
MsgBox("Login Failed. Account doesn't exist. Please register to log in.", MsgBoxStyle.Critical, "Error")
Else
If data(2).ToString = txtPassword.Text Then
MsgBox("You have successfully logged in.", MsgBoxStyle.Information, "Login Successful")
Me.Close()
normalMemberForm.Show()
Else
MsgBox("Login Failed. Incorrect password. Please try again.", MsgBoxStyle.Critical, "Error")
End If
End If
Else
MsgBox("Login Failed. Incorrect password. Please try again.", MsgBoxStyle.Critical, "Error")
End If
End While
Catch ex As Exception
End Try
End If
Case "Official Member"
If txtUsername.Text = Nothing Or txtPassword.Text = Nothing Then
MsgBox("Please fill up all the fields.", MsgBoxStyle.Information, "Error")
Else
Me.Cursor = Cursors.AppStarting
Try
conn.Open()
Dim sqlquery As String = "SELECT * FROM off_members"
Dim data As MySqlDataReader
Dim adapter As New MySqlDataAdapter
Dim command As New MySqlCommand
command.CommandText = sqlquery
command.Connection = conn
adapter.SelectCommand = command
data = command.ExecuteReader
While data.Read()
If data.HasRows() = True Then
If Not data(1).ToString = txtUsername.Text Then
MsgBox("Login Failed. Account doesn't exist. Please register to log in.", MsgBoxStyle.Critical, "Error")
Else
If data(2).ToString = txtPassword.Text Then
MsgBox("You have successfully logged in.", MsgBoxStyle.Information, "Login Successful")
Me.Close()
officialMemberForm.Show()
Else
MsgBox("Login Failed. Incorrect password. Please try again.", MsgBoxStyle.Critical, "Error")
End If
End If
Else
MsgBox("Login Failed. Incorrect password. Please try again.", MsgBoxStyle.Critical, "Error")
End If
End While
Catch ex As Exception
End Try
End If
End Select
End Sub
Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click
Me.Close()
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
loginButton.Enabled = True
loginButton.Select()
End Sub
End Class
I have added the features to say the user doesn't exist in the login form....but it works great with the off_members but when using the reg_members after login i get the error of user doesn't exist many times....
Please help me how can I solve this problem and what is the solved code.....
Brandonio bro needs your help.....
|
|
|
How can I get the server status??? |
Posted by: mnxford - 03-25-2013, 11:44 AM - Forum: Programming Help
- Replies (5)
|
|
Hello guys,
I want my software that it will contain a server status dialog. When a user will click on the server status then a dialog will open in which they will be able to see if the MySQL server with this software in online or offline.
I need a code that will open a db connection and if connection open the show a circle with green color and say green color Online and if db connection timeout then they will get a the circle red and red Offline text and this will happen if their internet connection is not available....and if their internet connection available but my MySQL server is down then they will get a yellow color on the circle and will say server offline...
Please provide me the code by which I can do this...
Thanks in advance.....
|
|
|
Loading and Displaying Images |
Posted by: brandonio21 - 03-21-2013, 03:44 PM - Forum: Code Snippets
- No Replies
|
|
This is the source code for my Java tutorial discussing how to load and display images in a Java applet.
Here's the video:
<!-- m --><a class="postlink" href="http://www.youtube.com/watch?v=oXmUp4ZTW2Q">http://www.youtube.com/watch?v=oXmUp4ZTW2Q</a><!-- m -->
Source code:
[code2=java]import java.applet.Applet;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Toolkit;
import java.net.URL;
public class ImageLoadingTutorial extends Applet
{
private Image spiral = null;
public void paint(Graphics g)
{
this.setSize(640, 480);
if (spiral == null)
spiral = getImage("spiral.png");
Graphics2D g2 = (Graphics2D)g;
g2.drawImage(spiral, 25, 50, 25, 25, this);
}
public Image getImage(String path)
{
Image tempImage = null;
try
{
URL imageURL = ImageLoadingTutorial.class.getResource(path);
tempImage = Toolkit.getDefaultToolkit().getImage(imageURL);
}
catch (Exception e)
{
System.out.println("An error occured - " + e.getMessage());
}
return tempImage;
}
}[/code2]
Pastebin link: <!-- m --><a class="postlink" href="http://pastebin.com/sdBqqdxK">http://pastebin.com/sdBqqdxK</a><!-- m -->
|
|
|
How can I set profile for a user??? |
Posted by: mnxford - 03-19-2013, 11:32 AM - Forum: Programming Help
- Replies (5)
|
|
Hello,
I watched all the brandonio's video tutorials on youtube..
I worked according to his video tutorials. And now I have some problem. I did every single user login,registration etc seeing brandonio's videos...now how can I set a profile for my user...
As for example when a user will log in and will get his profile..only his profile...he will not see other's profile...andhow can he set up his avater which will be connected with the database...profile will also retrieve info from db....
Please help me...
Thanks in advance.....
|
|
|
|