» Site Navigation | | | » Advertisement | | | » Recent Threads | | | | | | | | | | | |  |  | [VB] Guide to creating a fully functional gaiaonline program |  |
02-03-2009, 08:07 AM
|
#1 (permalink)
| Banned
Join Date: Feb 2008 Posts: 2,646
GPoints: 1,628 Rep Power: 0 | [VB] Guide to creating a fully functional gaiaonline program Before you begin you'll need this file for later use: http://networkg3.com/tutorial/gaialogin/wrapper.zip or http://g3nation.surf-g3.com/tutorial...in/wrapper.zip ( G3's Host ) Hello all, in this guide I will be teaching you how to make a fully function program in the VB's, both VB.net and VB6. I will teach you how to make a mass pmer. If you prefer to make a neopets program check out the other thread. The mass pmer will include the following: - the ability to pm to multiple users ( a normal pmmer would be just one ) - a gaialogin - text file support Lets start with VB.net ( If you do not have VB.net already click the link ) Firstly, open vb.net and create a new project A new window should come up. Name the project GAIAPM.vb and click OK.
Next you should see a toolbox, and a blank window. You can design how it looks like. First, put 1 button, and two textboxes, then put a groupbox over it. Go over to properties, and make the buttons text "login". Have it look like this. Now you have a auth, but not the auth code.
Double click the login button and we'll begin on the login code.
Now, take a look at this: [vb6] Basics of HTTPwrapper
Now go to your code, in between Code: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click and Follow [VB6] How to make a Gaia Login
Now that you created the login. Make the pm part of the program. Have it look like this: Double Click send and follow this: Code: Dim strHTML as string
It still has no value, but we want the value to be the POST of sending an pm.
So open up Live HTTP Headers and
send a pm to "lol", subject: "lol", message: "lmao".
Now take a look at Your Post Data in Live HTTP Headers.
Use this to understand whats going on: http://img187.imageshack.us/img187/1...31a1tmpdl8.jpg ( what I used when I was learning from Doc )
The code you see is not in vb so don't copy it.
So here strHTML should now be that. Code: strHTML = wrapper.PostWrapper("http://www.gaiaonline.com/profile/privmsg.php
", "username=lol&subject=lol&message=lmao&preview=&post=&mode=post&src=&folder=inbox&id=&area_code=&pn1=&pn2=&selected_options=&btn_send=true", wrapper.LastPage")
You want the user to have power over whom and what it send Code: strHTML = wrapper.PostWrapper("http://www.gaiaonline.com/profile/privmsg.php
", "username="& "notyet" & "&subject=" & txtsubject.text & "&message=" & richtextbox1.text & "&preview=&post=&mode=post&src=&folder=inbox&id=&area_code=&pn1=&pn2=&selected_options=&btn_send=true", wrapper.LastPage") You want the pmmer to go through the listbox, sending from there so you'll need a for loop. Code: For i as integer = 0 to listbox1.items.count - 1 strHTML = wrapper.PostWrapper("http://www.gaiaonline.com/profile/privmsg.php
", "username="& listbox1.items(i) & "&subject=" & txtsubject.text & "&message=" & richtextbox1.text & "&preview=&post=&mode=post&src=&folder=inbox&id=&area_code=&pn1=&pn2=&selected_options=&btn_send=true", wrapper.LastPage") Next i
What this does is it makes it go through the entire listbox.
Now we'll make it so the user can open a txt file into the listbox.
So now you need to double click the open button and follow this: Code: Dim i As Integer
Dim OD as new OpenFileDialog
OD.InitialDirectory = system.AppDomain.CurrentDomain.BaseDirectory()
OD.Title = "Open a Text File"
OD.Filter = "Text Files|*.txt"
OD.ShowDialog()
Dim filen as string filen = OD.FileName
w = New IO.StreamReader(filen)
While (w.Peek() > -1)
ListBox2.Items.Add(r.ReadLine)
End While CONGRATZ! You finished your first fully functional gaia online program. CREDITS Doc ( Doctor , b& ) - for teaching me how to program
Gel ( G3 ) - for helping me when I got stuck in making programs with no complaints PM me for help, or if I missed a step, since it's pretty late here.
Last edited by Checker; 07-20-2009 at 08:33 AM..
| |
| |  |
05-02-2009, 09:27 PM
|
#2 (permalink)
| Junior Member
Join Date: Feb 2009 Location: Japan Age: 14 Posts: 8
GPoints: 399 Rep Power: 0 | Sweet, I was looking for a Vb.Net wrapper | |
| |
06-06-2009, 08:05 PM
|
#3 (permalink)
| Junior Member
Join Date: Jun 2009 Posts: 5
GPoints: 267 Rep Power: 0 | I can't visit that link.. | |
| |
07-20-2009, 08:33 AM
|
#4 (permalink)
| Banned
Join Date: Feb 2008 Posts: 2,646
GPoints: 1,628 Rep Power: 0 | | |
| |
07-21-2009, 04:52 AM
|
#5 (permalink)
| Banned
Join Date: Jul 2009 Posts: 1
GPoints: 25 Rep Power: 0 | It's a great Tutorial and everything however you need to declare what w and r are for. | |
| |
07-21-2009, 09:30 AM
|
#6 (permalink)
| Banned
Join Date: Feb 2008 Posts: 2,646
GPoints: 1,628 Rep Power: 0 | w and r are Strings | |
| |
07-28-2009, 09:44 AM
|
#7 (permalink)
| Full Member
Join Date: Jun 2008 Location: Brooklyn Ny Age: 19 Posts: 150
GPoints: 2,108 Rep Power: 6 | Thanks good guide. | |
| |
09-13-2009, 07:40 PM
|
#8 (permalink)
| Full Member
Join Date: Sep 2009 Posts: 25
GPoints: 431 Rep Power: 2 | :O
thanks!
this looks awesome
-gets started on it- ;D | |
| |
09-22-2009, 04:44 PM
|
#9 (permalink)
| Full Member
Join Date: Apr 2009 Location: Costa Rica Posts: 144
GPoints: 0 Rep Power: 3 | I can't enter in this link [VB6] How to make a Gaia Login but i still want make the program somebody can help me out
__________________ HTML Code: http://ozzy12323.elbruto.es/ | |
| |  | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | |