MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides

Homepage Register FAQ Members Mark Forums Read Advertise Marketplace FPSowned


Go Back   MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides > Programming > Programming section > VB
Reload this Page [Guide] Visual Basic 2008 - Login system where everyone can get in.
VB Discussions about VB programming

Reply
 
LinkBack Thread Tools
[Guide] Visual Basic 2008 - Login system where everyone can get in.
(#1)
Old
Caroe's Avatar
Caroe is Offline
Sergeant
Rep Power: 2
Reputation: 14
Caroe is on a distinguished road
 
Posts: 64
Join Date: Jul 2007
Location: H4x0r W0r|d
Legendary [Guide] Visual Basic 2008 - Login system where everyone can get in. - 07-05-2008

Login System
-By Caroe

DESIGN
1. First off all you make you program, new you make a new form (in my case this form is form 2)
2. Now you create 2 labels, called "Username" and "Password" and 2 buttons called "Login" and "Create Account"
3. Now you create 2 Textboxes and place Username over one of them and Password over the other one.
4. Place "Login" Button just under the textboxes and Labels, and "Create Account" button under "Login" button.
5. Under "Create Account" button make a new button called "Delete Account"

CODING

FORM 1

1. go to you normal program (Form 1) and make everything set to "Visible = False"
the make a button called "Login" and write in it
Code:
Form2.show()
also if the login thing is in Form 2 else set it to the form it is

FORM 2

1. Press on "Create Account" button and write
Code:
If Textbox1.text = "" or Textbox2.text = "" Then
MsgBox("Both your Username and Password have to be atleast 1 letter")
Else
My.computer.filesystem.createfile("C:\Username.txt", Textbox1.text, False)
My.computer.filesystem.createfile("C:\Password.txt", Textbox2.text, False)
My.computer.filesystem.createfile("C:\Account.txt", "", False)
2. Press on "Login" button and write
Code:
Dim User$, Pw$
User = My.computer.filesystem.readalltext("C:\Username.txt")
Pw = My.computer.filesystem.readalltext("C:\Password")

if Textbox1.text = User and Textbox2.text = Pw Then
Form1.show()
Form1.button1.visble = True 
The thing in red can be changed. if you also want button 2 to be visible after login then write the same just with button2 instead of button1.

3. Press "Delete Account" button and write
Code:
My.computer.filesystem.DeleteFile("C:\Account.txt")
My.computer.filesystem.DeleteFile("C:\Account.txt")
My.computer.filesystem.DeleteFile("C:\Username.txt")
4. now double click in the program so you can write the "Form2_Load" code and write
Code:
If my.computer.filesystem.fileexists("C:\account.txt") then
Button1.enabled = True
Button2.enabled = False
Button3.enabled = true
Else
Button1.enabled = False
Button2.enabled = true
Button3.enabled = False
Button1 = "Login" Button, else change the code
Button2 = "Create Account" Button, else change the code
Button3 = "Delete Account" Button, else change the code

Other
Else, if you want to see mine you can download it here :
Download : [Only registered and activated users can see links. ]
it has alot more features, and are way better. but you can look at it and see if you can make the same

Enjoy !
Reply With Quote

Donate to remove ads.
(#2)
Old
Fireking300's Avatar
Fireking300 is Offline
Master Sergeant
Rep Power: 2
Reputation: 7
Fireking300 is an unknown quantity at this point
 
Posts: 72
Join Date: Jun 2007
Location: Texas
08-02-2008

I love this thank you for making it! Now I's are smarter with the coding!
I'll give +rep soon as I can
Edit I tested out yours first but there are a couple of errors in the program!
Code:
See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.UnauthorizedAccessException: Access to the path 'C:Username.txt' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at System.IO.StreamWriter.CreateFile(String path, Boolean append)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding)
   at Microsoft.VisualBasic.FileIO.FileSystem.WriteAllText(String file, String text, Boolean append, Encoding encoding)
   at Microsoft.VisualBasic.MyServices.FileSystemProxy.WriteAllText(String file, String text, Boolean append)
   at Login.Form2.Button2_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Login
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Merritt-PC/Desktop/Login.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.1434 (REDBITS.050727-1400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Last edited by Fireking300; 08-02-2008 at 07:05 AM.
Reply With Quote
(#3)
Old
MaiN is Offline
Contributor
Rep Power: 3
Reputation: 114
MaiN will become famous soon enoughMaiN will become famous soon enough
 
Posts: 370
Join Date: Sep 2006
Location: Jaedenar O.o
08-02-2008

Fireking300: If you're on Vista you should right click the exe and run it as administrator.

To all others: If you use this system, you should really encrypt the password before sending it.



I was here. ~
Dragon[Sky] I was here too. ~Kuiren
Reply With Quote
(#4)
Old
Apoc's Avatar
Apoc is Offline
c|_| My care cup is empty
Legendary User
Rep Power: 5
Reputation: 623
Apoc is a name known to allApoc is a name known to allApoc is a name known to allApoc is a name known to allApoc is a name known to allApoc is a name known to all
 
Posts: 637
Join Date: Jan 2008
08-03-2008

You need to escape the \ character in the path string.

C:\\your\\folder\\path

This will create the string: C:\your\folder\path

Without escaping the \ character, you end up with C:yourfolderpath, which obviously isn't correct.


[Only registered and activated users can see links. ]
Reply With Quote
(#5)
Old
Fireking300's Avatar
Fireking300 is Offline
Master Sergeant
Rep Power: 2
Reputation: 7
Fireking300 is an unknown quantity at this point
 
Posts: 72
Join Date: Jun 2007
Location: Texas
08-24-2008

Need help with code for creating files
If UsernameTextBox.Text = "" Then
MsgBox("Please enter a valid Username")
Else
My.Computer.FileSystem.CreateFile("C:\Random\random.txt")
My.computer.filesystem.createfile doesnt work the .createfile is not a member of that group it says.
Reply With Quote
(#6)
Old
Gothian's Avatar
Gothian is Offline
Contributor
Rep Power: 4
Reputation: 249
Gothian has a spectacular aura aboutGothian has a spectacular aura aboutGothian has a spectacular aura about
 
Posts: 500
Join Date: Jul 2006
Location: root
08-25-2008

You don't need the ".Createfile" at all, just use a StreamWriter. It will create the file for you once you write some lines.

This is how I manage files with VB.NET

Just make sure that you

Code:
Imports System.IO
Writing:
Code:
    Private Sub WriteSomething(ByVal filename As String)
        If File.Exists(filename) Then
            File.Delete(filename)
        End If
        Dim filewriter As New StreamWriter(filename)
        filewriter.WriteLine("line 1")
        filewriter.WriteLine("line 2")
        filewriter.Flush()
        filewriter.Close()
    End Sub
Reading:
Code:
    Private Sub ReadStuff(ByVal filename As String)
        Dim tempstring As String = ""
        Dim temparray(0) As String
        If File.Exists(filename) Then
            Dim filereader As New StreamReader(filename)
            Do Until filereader.EndOfStream = True
                tempstring = filereader.ReadLine
                If tempstring Is Nothing Then
                    Exit Do
                Else
                    temparray(UBound(temparray)) = tempstring
                    ReDim Preserve temparray(temparray.Length)
                End If
            Loop
            filereader.Close()
        End If
    End Sub



Soon you can find my projects at: www.termight.info

Last edited by Gothian; 08-25-2008 at 12:36 AM.
Reply With Quote
(#7)
Old
ReidE96's Avatar
ReidE96 is Offline
Contributor
Rep Power: 3
Reputation: 262
ReidE96 is a jewel in the roughReidE96 is a jewel in the roughReidE96 is a jewel in the rough
 
Posts: 733
Join Date: Dec 2006
Location: Scotland
08-25-2008

The CreateFile command doesn't actually exist, as far as I'm aware. Gothian posted the correct way to do things - FileStreams!


Reply With Quote
Reply

Donate to remove ads.

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
Trackbacks are Off
Pingbacks are Off
Refbacks are On



Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346