| View previous topic :: View next topic |
| Author |
Message |
PhantomLancer Master Cheater
Reputation: 0
Joined: 11 Nov 2007 Posts: 356
|
Posted: Mon Nov 26, 2007 3:09 pm Post subject: Visual Basic 2008 |
|
|
Ok i just downloaded visual basic 2008 and i need some tutorials for NEWBS but i cant find any on google... just a simple click ok and it says hello feature or something...
Or something where you type your user name and password and when you click ok it says Hello (username)
anyone know any tutorials for beginners? _________________
|
|
| Back to top |
|
 |
Blader I post too much
Reputation: 2
Joined: 19 Jan 2007 Posts: 2049
|
Posted: Mon Nov 26, 2007 3:38 pm Post subject: |
|
|
I'm using vb6, but it might be the same of vb8
Use the MsgBox function for that hello thing
For vb6, it would look like
| Code: | | MsgBox "Content goes here", vbMessageBoxType, "Title" |
And that would probably be how far you should go into it
Search in google
"VB8 message box" and you should get some tutorials and how to use it  _________________
|
|
| Back to top |
|
 |
PhantomLancer Master Cheater
Reputation: 0
Joined: 11 Nov 2007 Posts: 356
|
Posted: Mon Nov 26, 2007 3:39 pm Post subject: |
|
|
thanks man... but i was looking for a more in depth tutorial about Hello tutorial... like from starting the program to testing it cause i litterally know nothing.. _________________
|
|
| Back to top |
|
 |
TheIndianGuy Advanced Cheater
Reputation: 102
Joined: 14 Jan 2007 Posts: 88
|
Posted: Mon Nov 26, 2007 5:40 pm Post subject: |
|
|
look up vb 2005 tutorials, code seems to be the same but i'll give you a couple tutorials to start out with.
First Program: Hello World
add a button
double click on the button
add this code: | Code: | | messagebox.show("hello world") |
Second Program: Simple Web Browser
add a button, web browser control, and a textbox
web browser views website, textbox is where you will imput the url, and the button is to tell the web browser to navigate to the website based on the text from your textbox
double click on your button and add this code: | Code: | | webbrowser1.navigate(textbox1.text) |
ok now you know a little i feel comfortable teaching you how to make an auto typer.
Last Program: Auto Typer
add 2 buttons, change one of the textbox text property to "start" and the other to "stop"
add 2 textbox's, one is going to used to hold the typed phrase and the second one will be used to input the number of seconds between each time the text from the first textbox is typed.
add 1 timer (this will be your first time using timers)
now double click on your timer so you can go to the timer code view
input this code: | Code: | sendkeys.send(textbox1.text)
sendkeys.send("{enter}") |
that code tells the timer to send the text in textbox one and to send the key "enter"
lets move onto the start button
the start button will be used to activate the timer so lets input these 2 lines of code: | Code: | | timer1.interval = textbox2.text * 1000 ' we do times 1000 because normally the time goes by milliseconds but if we times by 1000 it will go 1 second at a time and be less confusing to the user |
there is 1 more line of code for the "start" button: | Code: | | timer1.enabled = True ' we do this so that the timer will start |
now for the last line of code this is used to stop the timer which is a very short line of code: | Code: | | timer1.enabled = false |
all very basic stuff, like i said previously just go on google and you will find many tutorials if you look for vb 2005 instead of vb 2008. |
|
| Back to top |
|
 |
PhantomLancer Master Cheater
Reputation: 0
Joined: 11 Nov 2007 Posts: 356
|
Posted: Mon Nov 26, 2007 6:30 pm Post subject: |
|
|
hmm never thought of that but i did the hello world tutorial and a Login Form Tutorial now im trying to find a tutorial that when you login it closes (form1) and opens (form2)
but i dont know how to word it shorter and im sure i wouldn't get much out of google if i typed all that so im asking here..
if anyone knows how to make form 1 close on button_click then display message (welcome to (name of program)) then click ok and bring up (form2) _________________
|
|
| Back to top |
|
 |
Blader I post too much
Reputation: 2
Joined: 19 Jan 2007 Posts: 2049
|
Posted: Mon Nov 26, 2007 6:48 pm Post subject: |
|
|
Ok, someone can convert this to vb8
This is how I would do it
| Code: | Private Sub whatever button...
MsgBox "Welcome to Application", vbOkOnly, "Application"
Form2.show
End Sub |
Then on form 2
| Code: | Form2_load
Unload form1
End Sub |
Although, you MIGHT be able to do this, I'm not sure though
| Code: | Private Sub whatever button...
MsgBox "Welcome to Application", vbOkOnly, "Application"
Form2.show
Unload Me
End Sub |
_________________
|
|
| Back to top |
|
 |
Devilizer Master Cheater
Reputation: 0
Joined: 22 Jun 2007 Posts: 451
|
Posted: Mon Nov 26, 2007 6:52 pm Post subject: |
|
|
If you mean after you've just logged on/logon successful, form2 shows up? If so, it's easy.
| Code: | If TextBox1.Text = (Username) And TextBox2.Text = (Password) Then
msgBox("Login successful!")
Form2.Show()
Else
msgBox("You have just entered an invalid username/password, try again!")
|
Anyway, to add an pin to make it cooler, do this. (lulz)
| Code: |
'Note: (Username) = enter the username you want without the brackets, same goes to password, and pin.
If TextBox1.Text = (Username) And TextBox2.Text = (Password) And TextBox3.Text =(YourDesiredPin) Then
msgBox("Login successful!")
Form2.Show()
Else
msgBox("You have just entered an invalid username/password/pin, try again!")
|
I attached the source i made below; enjoy playing around with it.
Username : devil
Password : devilz
Pin : 123123
@Blader;
Use
to unload/close the proggie/form.
Last edited by Devilizer on Mon Nov 26, 2007 6:54 pm; edited 1 time in total |
|
| Back to top |
|
 |
PhantomLancer Master Cheater
Reputation: 0
Joined: 11 Nov 2007 Posts: 356
|
Posted: Mon Nov 26, 2007 6:52 pm Post subject: |
|
|
| Blader wrote: | Ok, someone can convert this to vb8
This is how I would do it
| Code: | Private Sub whatever button...
MsgBox "Welcome to Application", vbOkOnly, "Application"
Form2.show
End Sub |
Then on form 2
| Code: | Form2_load
Unload form1
End Sub |
Although, you MIGHT be able to do this, I'm not sure though
| Code: | Private Sub whatever button...
MsgBox "Welcome to Application", vbOkOnly, "Application"
Form2.show
Unload Me
End Sub |
|
this will make se sound stupid but vbokonly means what? _________________
|
|
| Back to top |
|
 |
Blader I post too much
Reputation: 2
Joined: 19 Jan 2007 Posts: 2049
|
Posted: Mon Nov 26, 2007 6:54 pm Post subject: |
|
|
It's the type of message box it is, but don't worry, that's in vb6 _________________
|
|
| Back to top |
|
 |
TheIndianGuy Advanced Cheater
Reputation: 102
Joined: 14 Jan 2007 Posts: 88
|
Posted: Mon Nov 26, 2007 6:59 pm Post subject: |
|
|
| PhantomLancer wrote: | Login Form Tutorial now im trying to find a tutorial that when you login it closes (form1) and opens (form2)
but i dont know how to word it shorter and im sure i wouldn't get much out of google if i typed all that so im asking here..
if anyone knows how to make form 1 close on button_click then display message (welcome to (name of program)) then click ok and bring up (form2) |
first make 2 forms and on the first form add a textbox and a button
first we will need to declare some stuff so first
| Code: | const MyPassword as string = "password"
public CorrectPassword as boolean |
then double click on the button and add this
| Code: | if textbox1.text = mypassword then
correctpassword = true
messagebox.show("correct password")
me.close()
form2.visible = true
end if
if textbox1.text <> mypassword then
correctpassword = false
messagebox.show("incorrect password")
end if |
|
|
| Back to top |
|
 |
Devilizer Master Cheater
Reputation: 0
Joined: 22 Jun 2007 Posts: 451
|
Posted: Mon Nov 26, 2007 7:00 pm Post subject: |
|
|
| skate4lifee wrote: | | PhantomLancer wrote: | Login Form Tutorial now im trying to find a tutorial that when you login it closes (form1) and opens (form2)
but i dont know how to word it shorter and im sure i wouldn't get much out of google if i typed all that so im asking here..
if anyone knows how to make form 1 close on button_click then display message (welcome to (name of program)) then click ok and bring up (form2) |
first make 2 forms and on the first form add a textbox and a button
first we will need to declare some stuff so first
| Code: | const MyPassword as string = "password"
public CorrectPassword as boolean |
then double click on the button and add this
| Code: | if textbox1.text = mypassword then
correctpassword = true
messagebox.show("correct password")
me.close()
form2.visible = true
end if
if textbox1.text <> mypassword then
correctpassword = false
messagebox.show("incorrect password")
end if |
|
Not much difference from my way, lol. |
|
| Back to top |
|
 |
TheIndianGuy Advanced Cheater
Reputation: 102
Joined: 14 Jan 2007 Posts: 88
|
Posted: Mon Nov 26, 2007 7:07 pm Post subject: |
|
|
| Devilizer wrote: |
Not much difference from my way, lol. |
i didn't read your way, sorry about that.
Last edited by TheIndianGuy on Mon Nov 26, 2007 7:10 pm; edited 1 time in total |
|
| Back to top |
|
 |
PhantomLancer Master Cheater
Reputation: 0
Joined: 11 Nov 2007 Posts: 356
|
Posted: Mon Nov 26, 2007 7:09 pm Post subject: |
|
|
| Code: | Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = "Jumping" Then
If TextBox2.Text = "beans" Then
MsgBox("Welcome to Outfit Loader")
Form2.Show()
Else
MsgBox("Please Make Sure Your Login Information Is Accurate")
End If
End If
End Sub
End Class |
i have this but now i need a way to close it because the way the one guy says dont work.. _________________
|
|
| Back to top |
|
 |
TheIndianGuy Advanced Cheater
Reputation: 102
Joined: 14 Jan 2007 Posts: 88
|
Posted: Mon Nov 26, 2007 7:11 pm Post subject: |
|
|
| PhantomLancer wrote: |
i have this but now i need a way to close it because the way the one guy says dont work.. |
reread my way.
just add if the password is correct. |
|
| Back to top |
|
 |
PhantomLancer Master Cheater
Reputation: 0
Joined: 11 Nov 2007 Posts: 356
|
Posted: Mon Nov 26, 2007 7:16 pm Post subject: |
|
|
| skate4lifee wrote: | | PhantomLancer wrote: |
i have this but now i need a way to close it because the way the one guy says dont work.. |
reread my way.
just add if the password is correct. |
i read yours and the way to make the passwords confuse me and i used a login tutorial off youtube and it gave me that so if you know to do it with that it would help im gonna try me.close now anyway _________________
|
|
| Back to top |
|
 |
|