| 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 |
|
 |
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 |
|
 |
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 |
|
 |
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 |
|
 |
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 |
|
 |
Devilizer Master Cheater
Reputation: 0
Joined: 22 Jun 2007 Posts: 451
|
Posted: Mon Nov 26, 2007 7:17 pm Post subject: |
|
|
Why do i see a Then If..?
| Code: |
If TextBox1.Text = "Jumping" Then
If TextBox2.Text = "beans" Then
MsgBox("Welcome to Outfit Loader")
Form2.Show()
Else
|
Change it to
| Code: |
If TextBox1.Text = "Jumping" And TextBox2.Text = "beans" Then
MsgBox("Welcome to Outfit Loader")
Form2.Show()
Else
|
|
|
| Back to top |
|
 |
PhantomLancer Master Cheater
Reputation: 0
Joined: 11 Nov 2007 Posts: 356
|
Posted: Mon Nov 26, 2007 7:21 pm Post subject: |
|
|
ok ive got it to close form1.... but it also closes form 2... it shows for a split second then vanishes
if anyone knows a way to fix this i would appreciate the help.. and i appreciate all the help im having now..
and i learned the close form1 code by myself.. which is a suprise to me..
incase anyone wants to know for VB8 its
_________________
|
|
| Back to top |
|
 |
Blader I post too much
Reputation: 2
Joined: 19 Jan 2007 Posts: 2049
|
Posted: Mon Nov 26, 2007 7:24 pm Post subject: |
|
|
Lol I was just about to post that, since you can also use me and form commands in vb6
_________________
|
|
| Back to top |
|
 |
PhantomLancer Master Cheater
Reputation: 0
Joined: 11 Nov 2007 Posts: 356
|
Posted: Mon Nov 26, 2007 7:25 pm Post subject: |
|
|
| Blader wrote: | Lol I was just about to post that, since you can also use me and form commands in vb6  |
yea... i looked up at Form2.show and thought about trying Form1.Close and it worked lol
_________________
|
|
| Back to top |
|
 |
|