Forum Rules Today's Posts Mark Forums Read Social Groups Donate
Go Back   PinoyXtreme > PX Technology > Programming Related > Visual Basic 6/VB.NET
 

Reminders on Coding Sections





REPLY
 
Thread Tools
Old 07-07-2012, 12:41 PM   #1
help - advance login system
fullmetal94 fullmetal94 is offline 07-07-2012, 12:41 PM

hi guys

i nid your help in something..

im using vb.net 2010 express

i nid your help on how to code login system na gumagana as login as in ung may username and password tapos pwedeng magcreate ng username at password tapos masesave sa isang directory somewhere sa pc. tapos pwede din i delete. .

pa help guys

 
fullmetal94's Avatar
fullmetal94
Elite Member
Join Date: Jun 2010
Location: jan jan lang :>
Posts: 172




Views: 591
Reply With Quote

 Re: help - advance login system
Old 07-07-2012, 02:01 PM   #2
 
CodeWarrior's Avatar

CodeWarrior
5th Division Elite-Hacker
CodeWarrior is offline
Posts: 3,863
PX Cash: 17,422
CodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond repute
Rep Power: 396
Default Re: help - advance login system

What do you mean sa ===> login system na gumagana as login.

Login what for operating system? or login for application
  Reply With Quote
The Following User Says Thank You to CodeWarrior For This Useful Post:
 

 Re: help - advance login system
Old 07-07-2012, 09:41 PM   #3
 
fullmetal94's Avatar

fullmetal94
Elite Member
fullmetal94 is offline
Posts: 172
PX Cash: 5,856
fullmetal94 will become famous soon enough
Rep Power: 230
Default Re: help - advance login system

login for application po within vb.net 2010 express. program lang
  Reply With Quote
 

 Re: help - advance login system
Old 07-08-2012, 12:11 AM   #4
 
CodeWarrior's Avatar

CodeWarrior
5th Division Elite-Hacker
CodeWarrior is offline
Posts: 3,863
PX Cash: 17,422
CodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond repute
Rep Power: 396
Default Re: help - advance login system

san mo ba e se save sa database or gagamit ka ng split text through note pad or save settings
Pake linaw po ng maayos... pag kaka sabi mo lang kc na pede ma delete san mo d delete sa database or sa note pad

  Reply With Quote
 

 Re: help - advance login system
Old 07-08-2012, 11:14 AM   #5
 
CodeWarrior's Avatar

CodeWarrior
5th Division Elite-Hacker
CodeWarrior is offline
Posts: 3,863
PX Cash: 17,422
CodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond reputeCodeWarrior has a reputation beyond repute
Rep Power: 396
Default Re: help - advance login system

Ok this is the two way of mine how to create login system form

First login code is using a database of microsoft access 2007

vbnet Code:
Imports System.Data.OleDb Public Class Form1     Dim conn As New OleDb.OleDbConnection     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load         conn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Login.accdb;JET OLEDB:Database Password=passworddatabase;"     End Sub         Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click                 If LoginTrue() = True Then                          MessageBox.Show("Login Successfully", "LOGIN SUCCESS", MessageBoxButtons.OK, MessageBoxIcon.Information)                       ' Do any thing you want if login success         Else             MessageBox.Show("Access Denied Not Authorized", "ACCESS DENIED", MessageBoxButtons.OK, MessageBoxIcon.Warning)         End If     End Sub         Public Function LoginTrue()         Dim dt As New DataTable         Dim ds As New DataSet         ds.Tables.Add(dt)         conn.Open()         Dim da As New OleDbDataAdapter("Select * From tblUser", conn)         da.Fill(dt)         For Each datarow In dt.Rows             If TextBox1.Text = datarow.Item(0) And TextBox2.Text = datarow(1) Then                 conn.Close()                 Return True             End If         Next         conn.Close()         Return False     End Function     Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click         conn.Close()         End     End Sub End Class  


Second code is using note pad for user and password, you can add as many as you want for the user and password

vbnet Code:
Public Class Form1 ' Write to user.text     Private Sub UserSave()         Dim i As Integer         Dim SW As IO.StreamWriter         SW = New IO.StreamWriter(Application.StartupPath & "\user.txt")  ' You can set any location directory         For i = 0 To ListBox1.Items.Count - 1             SW.WriteLine(ListBox1.Items.Item(i))         Next         SW.Close()     End Sub  'Read from the location     Private Sub LoadUser()         On Error GoTo Fuck         Dim SR As IO.StreamReader         SR = New IO.StreamReader(Application.StartupPath & "\user.txt")         While (SR.Peek() > -1)             ListBox1.Items.Add(SR.ReadLine)         End While         SR.Close() Fuck: ' If file is not written error trap do the action to write file  to the directory         Dim i As Integer         Dim SW As IO.StreamWriter         SW = New IO.StreamWriter(Application.StartupPath & "\user.txt")         For i = 0 To ListBox1.Items.Count - 1             SW.WriteLine(ListBox1.Items.Item(i))         Next         SW.Close()     End Sub ' Splitting text user and password     Sub SplitText()         Dim strItems(ListBox1.SelectedItems.Count - 1) As String         Dim splitten As String         Dim sepsplit() As String         For intItem As Integer = 0 To ListBox1.SelectedItems.Count - 1             strItems(intItem) = ListBox1.SelectedItems.Item(intItem).ToString         Next         For intItem As Integer = 0 To strItems.Length - 1             splitten = strItems(intItem)             sepsplit = splitten.Split(",")             TextBox3.Text = sepsplit(1)             TextBox4.Text = sepsplit(0)         Next     End Sub     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load         LoadUser()         ListBox1.SelectedIndex = ListBox1.SelectedIndex + 1     End Sub     Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged         SplitText()     End Sub     Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick ' Search string for user name         Dim searchString As String         searchString = TextBox1.Text         Dim index As Integer = ListBox1.FindString(searchString)         If index <> -1 Then             ListBox1.SetSelected(index, True)         End If     End Sub     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click         If TextBox1.Text = TextBox4.Text Then             If TextBox2.Text = TextBox3.Text Then                 MessageBox.Show("Login Successfully", "LOGIN SUCCESS", MessageBoxButtons.OK, MessageBoxIcon.Information)                 Button3.Top = 64                 Button4.Top = 99                 Me.Height = 163                 TextBox1.Text = Nothing                 TextBox2.Text = Nothing                 Button1.Enabled = False                 Button2.Enabled = False                 TextBox2.PasswordChar = Nothing                 Me.Text = "ADD USER"             Else                 MessageBox.Show("Access Denied Not Authorized", "ACCESS DENIED", MessageBoxButtons.OK, MessageBoxIcon.Warning)             End If         Else             MessageBox.Show("Access Denied Not Authorized", "ACCESS DENIED", MessageBoxButtons.OK, MessageBoxIcon.Warning)         End If     End Sub     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click         End     End Sub     Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click         If TextBox1.Text = Nothing Then MsgBox("User fields is empty!", MsgBoxStyle.Critical, "EMPTY FIELDS") : TextBox1.Focus() : Exit Sub         If TextBox2.Text = Nothing Then MsgBox("Password fields is empty!", MsgBoxStyle.Critical, "EMPTY FIELDS") : TextBox2.Focus() : Exit Sub         ListBox1.Items.Add(TextBox1.Text & "," & TextBox2.Text)         UserSave()         MsgBox("User And Password Successfully Save!", MsgBoxStyle.Information, "SAVE SUCCESS")         TextBox1.Text = Nothing         TextBox2.Text = Nothing     End Sub     Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click         End     End Sub End Class  


Hope this Help..... good luck for coding
  Reply With Quote
The Following User Says Thank You to CodeWarrior For This Useful Post:
 
Reply

Bookmarks


Facebook Comments

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +8. The time now is 05:39 PM.

Powered by: vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

Disclaimer: None of the files shown here are hosted or transmitted by this server. The links are provided solely by this site’s users. All references are copyright to their respective owners. Pinoyxtreme.com is not responsible for what its users post, or any other actions of its users. Pinoyxtreme.com is not responsible for the accuracy, compliance, copyright, legality, decency, or any other aspect of the content of other linked sites. You may not use this site to distribute or download any material when you do not have the legal rights to do so. It is your own responsibility to adhere to these terms.