
scare crow
Member

Nov 3, 2005, 4:50 PM
Post #1 of 12
(901 views)
Shortcut
|
|
Easy World Switching
|
Can't Post
|
|
Ok, in this tutorial, i will be telling you how to make a really easy, and fast world switcher. For this, you will need Two Textboxes One Command Button And a Webbroswer 1.Start off by making a Standard EXE. 2.Press Ctrl T, and go down to Microsoft Internet Controls, and then click ok. Now you will see a new icon on the left toolbar, double click it, and enlarge it. 3.Make a two text boxes, and name them each Textbox1 Textbox2 4.Now make a command button, and name it Go 5.Change text box 2 visibility to False. 6.Add the following code to your command button
Private Sub Go_Click() If Text1.Text = "1" Then Text2.Text = "ul2" End If If Text1.Text = "2" Then Text2.Text = "ul4" End If If Text1.Text = "3" Then Text2.Text = "po3" End If If Text1.Text = "4" Then Text2.Text = "po4" End If If Text1.Text = "5" Then Text2.Text = "po5" End If If Text1.Text = "6" Then Text2.Text = "po6" End If If Text1.Text = "7" Then Text2.Text = "above2" End If If Text1.Text = "8" Then Text2.Text = "above3" End If If Text1.Text = "9" Then Text2.Text = "above4" End If If Text1.Text = "10" Then Text2.Text = "jolt7" End If If Text1.Text = "11" Then Text2.Text = "jolt8" End If If Text1.Text = "12" Then Text2.Text = "jolt9" End If If Text1.Text = "13" Then Text2.Text = "nl3" End If If Text1.Text = "14" Then Text2.Text = "nl4" End If If Text1.Text = "15" Then Text2.Text = "uk2" End If If Text1.Text = "16" Then Text2.Text = "uk3" End If If Text1.Text = "17" Then Text2.Text = "tor1" End If If Text1.Text = "18" Then Text2.Text = "tor2" End If If Text1.Text = "19" Then Text2.Text = "cet1" End If If Text1.Text = "20" Then Text2.Text = "cet2" End If If Text1.Text = "21" Then Text2.Text = "cet5" End If If Text1.Text = "22" Then Text2.Text = "nl1" End If If Text1.Text = "23" Then Text2.Text = "uk4" End If If Text1.Text = "24" Then Text2.Text = "uk5" End If If Text1.Text = "25" Then Text2.Text = "cet6" End If If Text1.Text = "26" Then Text2.Text = "ul5" End If If Text1.Text = "27" Then Text2.Text = "nl5" End If If Text1.Text = "28" Then Text2.Text = "nl6" End If If Text1.Text = "29" Then Text2.Text = "ul6" End If If Text1.Text = "30" Then Text2.Text = "po7" End If If Text1.Text = "31" Then Text2.Text = "po8" End If If Text1.Text = "32" Then Text2.Text = "ul1" End If If Text1.Text = "33" Then Text2.Text = "at1" End If If Text1.Text = "34" Then Text2.Text = "at2" End If If Text1.Text = "35" Then Text2.Text = "at3" End If If Text1.Text = "36" Then Text2.Text = "at4" End If If Text1.Text = "37" Then Text2.Text = "tor2" End If If Text1.Text = "38" Then Text2.Text = "planet1" End If If Text1.Text = "39" Then Text2.Text = "planet2" End If If Text1.Text = "40" Then Text2.Text = "planet3" End If If Text1.Text = "41" Then Text2.Text = "planet4" End If If Text1.Text = "42" Then Text2.Text = "po2" End If If Text1.Text = "43" Then Text2.Text = "sl11" End If If Text1.Text = "44" Then Text2.Text = "at6" End If If Text1.Text = "45" Then Text2.Text = "planet5" End If If Text1.Text = "46" Then Text2.Text = "planet6" End If If Text1.Text = "47" Then Text2.Text = "above5" End If If Text1.Text = "48" Then Text2.Text = "above6" End If If Text1.Text = "49" Then Text2.Text = "ams1" End If If Text1.Text = "50" Then Text2.Text = "ams2" End If If Text1.Text = "51" Then Text2.Text = "ams3" End If If Text1.Text = "52" Then Text2.Text = "ams4" End If If Text1.Text = "53" Then Text2.Text = "ams5" End If If Text1.Text = "54" Then Text2.Text = "ams6" End If If Text1.Text = "55" Then Text2.Text = "ch1" End If If Text1.Text = "56" Then Text2.Text = "cet4" End If If Text1.Text = "57" Then Text2.Text = "ch3" End If If Text1.Text = "58" Then Text2.Text = "ch4" End If If Text1.Text = "59" Then Text2.Text = "ch5" End If If Text1.Text = "61" Then Text2.Text = "se1" End If If Text1.Text = "62" Then Text2.Text = "se2" End If If Text1.Text = "63" Then Text2.Text = "se3" End If If Text1.Text = "64" Then Text2.Text = "se4" End If If Text1.Text = "66" Then Text2.Text = "se6" End If If Text1.Text = "67" Then Text2.Text = "jolt10" End If If Text1.Text = "68" Then Text2.Text = "jolt11" End If If Text1.Text = "69" Then Text2.Text = "jolt12" End If If Text1.Text = "70" Then Text2.Text = "sl10" End If If Text1.Text = "71" Then Text2.Text = "uk7" End If If Text1.Text = "72" Then Text2.Text = "sl1" End If If Text1.Text = "73" Then Text2.Text = "sl2" End If If Text1.Text = "74" Then Text2.Text = "sl3" End If If Text1.Text = "75" Then Text2.Text = "sl4" End If If Text1.Text = "76" Then Text2.Text = "sl5" End If If Text1.Text = "77" Then Text2.Text = "sl6" End If If Text1.Text = "78" Then Text2.Text = "sl7" End If If Text1.Text = "79" Then Text2.Text = "sl8" End If If Text1.Text = "80" Then Text2.Text = "jolt1" End If If Text1.Text = "81" Then Text2.Text = "jolt2" End If If Text1.Text = "82" Then Text2.Text = "jolt3" End If If Text1.Text = "83" Then Text2.Text = "jolt4" End If If Text1.Text = "84" Then Text2.Text = "jolt5" End If WebBrowser1.Navigate "http://" + Text2.Text + ".runescape.com/rs2.cgi?plugin=0&lowmem=0" End Sub And there you have it... Here are some other things you might need. Prevent Runescape Redirection
Private Sub WebBrowser1_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, Cancel As Boolean) On Error Resume Next If URL = "http://www.runescape.com/" Then Cancel = True End Sub Steal Rs Add the following code into a module
Public Const SWP_NOSIZE = &H1 Public Const HWND_TOP = 0 Public Const SWP_NOOWNERZORDER = &H200 Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long Declare Function SetWindowPos Lib "user32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long Sub StealRS(Frm As Form) On Error Resume Next thunderformdc& = Frm.hWnd shellembedding& = FindWindowEx(thunderformdc&, 0&, "shell embedding", vbNullString) shelldocobjectview& = FindWindowEx(shellembedding&, 0&, "shell docobject view", vbNullString) internetexplorerserver& = FindWindowEx(shelldocobjectview&, 0&, "internet explorer_server", vbNullString) microsoftvmforjavatmhostwindowclass& = FindWindowEx(internetexplorerserver&, 0&, "microsoft vm for java(tm) host window class", vbNullString) RSHwnd& = FindWindowEx(microsoftvmforjavatmhostwindowclass&, 0&, "msawt_comp_class", vbNullString) SetParent RSHwnd, Frm.hWnd DoEvents RSHwnd& = FindWindowEx(Frm.hWnd, 0&, "msawt_comp_class", vbNullString) If RSHwnd = 0 Then Exit Sub Call SetWindowPos(RSHwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOOWNERZORDER Or SWP_NOSIZE) End Sub Now, add the following code to your form.
Private Sub WebBrowser1_ProgressChange(ByVal Progress As Long, ByVal ProgressMax As Long) On Error Resume Next StealRS Me End Sub Ok, i hope i didnt miss anything, if i did, please tell me!!!
|