Visual Basic 6
[VB6]Using virtual key codes
by pH on Feb.26, 2010, under Articles by pH, Computer Programming / Scripting, Visual Basic 6
I’m surprised I hadn’t already posted this, so I thought I would as it’s extremely useful.
Here is a module for vb6, import it using vb6 by hitting “Project” (up the top) followed by “add module”, then click existing and browse to the location of the extracted .bas file.
Here’s an example of how to use it in your project:
if GetAsyncKeyState (112) < 0 then
call DoStuff()
end if
This will trigger the events of the DoStuff sub when the user presses F1.
To get a list of key codes visit this link and convert them to decimal.
(To do this in ms calc click view up the top > scientific and then click the hex radio button, paste the number from the MSDN page and then click dec. The resulting number is the one you use in VB6.)
Good luck!
[VB6]Basic Web Browser
by pH on Oct.30, 2009, under Articles by pH, Computer Programming / Scripting, Tutorials, Visual Basic 6
Also old, but by me.
There is (was) a growing number of people intrested in making their own web browser these days, but they just don’t know where to start, but never fear! Ph is here!
Making a web browser can be a fun and easy task to do, the basics of a web browser can all be coded up in less than 5 minutes!!
Don’t beleive me?
Read on…
Step One:
Open Visual Basic, Make New .exe, and include the Microsoft Internet Controls Component.
Got that done?
Good.
Step Two:
Place the frame of your web browser on your form, anywhere you like, any size you like.
Do this by Selecting the Globe on the left near your other tools.
Then just click and drag.
Step Three:
Address Bar, Home Page, And Go button.
The next most important part of our web browser is the address bar.
Making an address bar and go button is one of the funnest things for me.
to do it just do the following:
Select a New text box up the top on the left, and place it somewhere on your form, make it resonably big so they’ll be able to keep track of long urls.
Now we’re going to set up the home page, double click on your form and you should be inside the sub “Form_Load”
this is what you should see
Private Sub Form_Load() End Sub
Next, type this in between the beggining and end of the sub:
WebBrowser1.Navigate "http:/ph1012.com" What you should now have is this:Code:Private Sub Form_Load() WebBrowser1.Navigate "http://www.ph1012.com" End SubYou must replace "WebBrowser1" with whatever you named your web browser, but if you didn't name it anything different, the default will be "webbrowser1" (provided that it's the first web browser on your form)
You can of course replace Ph1012s URL with whatever you like.
Now you're probly wondering why the URL isn't appearing in that text box we added, so we're gonna set that up now.
Inside form load, add the following:Code:text1.text = "http://www.ph1012.com"
[VB6] Making an MSN (7.5) Plugin
by pH on Oct.30, 2009, under Articles by pH, Computer Programming / Scripting, Tutorials, Visual Basic 6
Also old as fuck, but by me.
**************************
Visual Basic 6.0 Msn Tutorial.
**************************
By Ph
Ok, lets get started, First of all: what this does;
This Tutorial Is gonna show you how you can make a basic MSN Exploit, Like the one on my site.
***********************
What you will be able to do:
***********************
for this tutorial im gonna keep it BASIC , so everyone gets the hang of it, then ill post more.
- You will Be able to change your status;
- You will be able to make a status Flasher;
- You will be able to Veiw your current nickname in a textbox
**********************
Requirements.
**********************
Visual Basic 6.0 Or later.
Msn Messenger Installed.
***************************
The Beggining h43r:
***************************
Ok First of all , and MOST IMPORTANTLY, open visual basic, File>new>exe
then; Project>References.
Select Messenger API type library, and Messenger API type Library!!!
(these tell vb what your current project will be refering to when you write some code.)
Then up the very top ABOVE Form_load Type this:
Option Explicit Private WithEvents MSN As MessengerAPI.Messenger
This means to trigger VB knowing you’re refering to something in MSN’s API’s in references. by typing “with msn”
[SETTING STATUS]
Step One: Add A combo Box onto your Projects interface.
Step two: Name it cstatus (in the propertys box on the far right)
Step Three: Double click on it and insert this code ;
Private Sub cstatus_Change() If cstatus.Text$ = Empty Then Exit Sub With MSN Select Case cstatus.Text$ Case "Online" .MyStatus = MISTATUS_ONLINE Case "Busy" .MyStatus = MISTATUS_BUSY Case "Be Right Back" .MyStatus = MISTATUS_BE_RIGHT_BACK Case "On The Phone" .MyStatus = MISTATUS_ON_THE_PHONE Case "Out To Lunch" .MyStatus = MISTATUS_OUT_TO_LUNCH Case "Appear Offline" .MyStatus = MISTATUS_INVISIBLE End Select End With
This adds Options in the dropdown menu (eg Case “Online”) and then tells it what they mean (eg. .MyStatus = MISTATUS_ONLINE )
Step Four: in sub “Form_load” add this code
Set MSN = New MessengerAPI.Messenger
With cstatus
Call .AddItem("Online")
Call .AddItem("Busy")
Call .AddItem("Be Right Back")
Call .AddItem("On The Phone")
Call .AddItem("Out To Lunch")
Call .AddItem("Appear Offline")
End With
(this adds the drop down options)
Step Five: Add A new Button onto your projects interface.
Step Six: Name the button “cmdsetstatus” (without quotes) the same way you did with combo box in step two.
Step Seven: Double Click on it and insert this code!!
Private Sub cmdsetstatus_Click() If cstatus.Text$ = Empty Then Exit Sub With MSN Select Case cstatus.Text$ Case "Online" .MyStatus = MISTATUS_ONLINE Case "Busy" .MyStatus = MISTATUS_BUSY Case "Be Right Back" .MyStatus = MISTATUS_BE_RIGHT_BACK Case "On The Phone" .MyStatus = MISTATUS_ON_THE_PHONE Case "Out To Lunch" .MyStatus = MISTATUS_OUT_TO_LUNCH Case "Appear Offline" .MyStatus = MISTATUS_INVISIBLE End Select End With
Step Eight: test your project (with msn open) , if it works right you should be able to open a drop down box and set your status by clicking the button.
Step nine: [The status Flasher] h43r:
(you may stop now and not add this , but its fun to add)
On your project add two timers.
Call the first one : “statusfo”
Call the second one: “statusfonl”
Disable Both The Timers.
Somewhere in your code Not in a sub add this Code
'***************************** 'beggining of status calls '***************************** Public Sub online() With MSN .MyStatus = MISTATUS_ONLINE End With End Sub Public Sub BrB() With MSN .MyStatus = MISTATUS_BE_RIGHT_BACK End With End Sub Public Sub away() With MSN .MyStatus = MISTATUS_AWAY End With End Sub Public Sub busy() With MSN .MyStatus = MISTATUS_BUSY End With End Sub Public Sub onthephone() With MSN .MyStatus = MISTATUS_ON_THE_PHONE End With End Sub Public Sub offline() With MSN .MyStatus = MISTATUS_OFFLINE End With End Sub Public Sub AppearOffline() With MSN .MyStatus = MISTATUS_INVISIBLE End With End Sub Public Sub out2lunch() With MSN .MyStatus = MISTATUS_OUT_TO_LUNCH End With End Sub '******************** 'End of status calls '********************
Then double click insside the first timer.
Type “Call Appearoffline”
Then double click inside the Second timer.
type “call online”
MAKE SURE BOTH TIMERS ARE DISABLED.
Disable them via propertys page where you cahnge name.
or insert this code in the timers
timer 1: statusfo.enabled = false
timer 2: status fonl.enabled = false
Then in timer1 add this : statusfo.interval = 500
in timer2 add this : statusfonl.interval = 800
**************
adding buttons
***************
Create Two New Buttons.
Call the first “on”
and the second “off”
Double Click inside the
First button and add this
Private Sub on_Click() statusfo.Enabled = True statusfonl.Enabled = True End Sub
and put this in the second one:
Private Sub off_Click() statusfo.Enabled = False statusfonl.Enabled = False End Sub
You’ve Now added a status flasher START button and a status flasher STOP button.
Test your Program and it should work.
NOTE: a status flasher is a program that signs on and off over and over again to get ppls attention B)
Thats it, any problems/suggestions PM me or Post!! B) h43r: :smooth:
If you’re ever in doubt of being bothered to read this whole thing just remember
include the msn api
then do
sub with msn
put a dot then itll have various msn api options
then to end it go,
end with end sub (optional)