Welcome to AC Web.
Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1


    Join Date
    Jul 2010
    Location
    DBC Modding, SQL, C#
    Posts
    520

    [How To] Make A Game Launcher For Your Server (VB.Net 2010)


    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    *The following tutorial is for people who have experience and knowledge of how to use
    Visual Basics 2010. However if you have not used Visual Basics before please feel
    free to add my on skype egamaton420. If you need any help understanding how
    something works or if you need help in general.

    If you need VB.Net 2010 you can download it here. You will also need to download the
    LauncherGUI.


    Lets Get Started!

    Start Visual Basics and start a new project. Select "Windows Form Application" and
    name it Launcher then click okay. Once the project loads right click Launcher in the
    "Solution Explorer" and click "Properties". When the next window opens click the
    "Application" tab and set the icon to LauncherIcon.ico. Then open
    "Resources" tab. At the top click "Add Resources" then "Add Existing File". Select
    all the images from the LauncherGUI folder. Click Ok.




    Click the Form1 image in the "Form1.vb [Design] tab". Got to the "Properties" box
    and change the form size to 657, 516. Change the form text to say "Launcher".
    Change is Start Position to Center Screen and set its Icon to the LancherIcon.ico
    that was included in the LauncherGUI. Set the form background to the
    FormBG.png that was included in the LauncherGUI


    Add a PictureBox to the form and change its size to 95, 53 its location to 529, 413
    and it's image to PlayLeave.png. Add another PictureBox to the form and change
    its size to 103, 25 its location to 132, 437 and set its image to SupportLeave.png.
    Add a third PictureBox to the form and change its size to 103, 25 its location to
    16, 437 and set its image to OptionsLeave.


    Time For Some Coding! [Basic Launcher]

    Press F7 to open the source code of our application.

    We need to add a import so the application can read and write to files. to do this
    enter "Imports System.IO" at the very top.

    In the source code add a new "General" for PictureBox1 and add a "Declaration"
    as MouseEnter. When the mouse enters PictureBox1 we want the image to
    change to show that something is happening. To do this add this code to
    PictureBox1_MouseEnter.
    Code:
    PictureBox1.Image = My.Resources.PlayEnter 
    REM This tells the PictureBox image to change to PlayEnter.png
    Add a new "General" for PictureBox1 and add a "Declaration"
    as MouseLeave. When the mouse leaves PictureBox1 we want the image to
    change to show that something is happening. To do this add this code to
    PictureBox1_MouseLeave.
    Code:
    PictureBox1.Image = My.Resources.PlayLeave 
    REMThis tells the PictureBox image to change to PlayLeave.png
    Add a new "General" for PictureBox1 and add a "Declaration" as MouseClick.
    When the mouse clicks PictureBox1 we want the image to change to show
    that something is happening and we want to start World of Warcraft.
    To do this add this code to PictureBox1_MouseClick.
    Code:
    PictureBox1.Image = My.Resources.PlayClick
            If File.Exists(My.Computer.FileSystem.CurrentDirectory & "/Wow.exe") Then
            REM This tells the launcher to check the current directory for Wow.exe
                Shell(My.Computer.FileSystem.CurrentDirectory & "/Wow.exe")
                REM If Wow.exe is found this tells the launcher to start Wow.exe
                Me.Close()
                REM This tells the launcher to close after it start Wow.exe
            Else
                MsgBox("Could not start Wow.exe", MsgBoxStyle.Critical, "Application Not Found")
                REM If Wow.exe is not found this tells the launcher to show an error message
            End If
    Add a new "General" for PictureBox2 and add a "Declaration"
    as MouseEnter. When the mouse enters PictureBox2 we want the image to
    change to show that something is happening. To do this add this code to
    PictureBox2_MouseEnter.
    Code:
    PictureBox2.Image = My.Resources.SupportEnter 
    REM This tells the PictureBox2 image to change to SupportEnter.png
    Add a new "General" for PictureBox2 and add a "Declaration"
    as MouseLeave. When the mouse leaves PictureBox2 we want the image to
    change to show that something is happening. To do this add this code to
    PictureBox2_MouseLeave.
    Code:
    PictureBox2.Image = My.Resources.SupportLeave 
    REM This tells the PictureBox2 image to change to SupportLeave.png
    Add a new "General" for PictureBox2 and add a "Declaration" as MouseClick.
    When the mouse clicks PictureBox2 we want the image to change to show
    that something is happening and we want to launch you website in a browser.
    To do this add this code to PictureBox2_MouseClick.
    Code:
    PictureBox2.Image = My.Resources.SupportClick
    REM This tells the PictureBox2 image to change to SupportClick.png
    Process.Start("http://YOUR WEBSITE HERE")
    REM This tells the launcher to open your servers website
    Add a new "General" for PictureBox3 and add a "Declaration"
    as MouseEnter. When the mouse enters PictureBox3 we want the image to
    change to show that something is happening. To do this add this code to
    PictureBox3_MouseEnter.
    Code:
    PictureBox3.Image = My.Resources.OptionsEnter
    REM This tells the PictureBox3 image to change to OptionsEnter.png
    Add a new "General" for PictureBox3 and add a "Declaration"
    as MouseLeave. When the mouse leaves PictureBox3 we want the image to
    change to show that something is happening. To do this add this code to
    PictureBox3_MouseLeave.
    Code:
    PictureBox3.Image = My.Resources.OptionsLeave 
    REM This tells the PictureBox3 image to change to OptionsLeave.png
    Add a new "General" for PictureBox3 and add a "Declaration" as MouseClick.
    When the mouse clicks PictureBox3 we want the image to change to show
    that something is happening and we want to clear the wow/cache folder.
    To do this add this code to PictureBox3_MouseClick.
    Code:
    PictureBox3.Image = My.Resources.OptionsClick
    REM This tells the PictureBox3 image to change to OptionsClick.png
            If Directory.Exists(My.Computer.FileSystem.CurrentDirectory & "/Cache") Then
            REM This tells the launcher to check its current directory for a folder named "Cache"
                Dim Cache As String = (My.Computer.FileSystem.CurrentDirectory & "/Cache")
                REM This tells the launcher to turn the directory location of the cache folder into a string.
                Select Case MsgBox("Do you want to delete the Cache folder?", MsgBoxStyle.Critical + MsgBoxStyle.YesNo, "WARNING")
                REM This tells the launcher to display a message box with a yes and no button
                    Case MsgBoxResult.Yes
                    REM What happens when you press the yes button
                        Directory.Delete(Cache, True)
                        REM Deletes the cache folder
                    Case MsgBoxResult.No
                    REM Tells the launcher to do nothing if the no button is pressed
                    End Select
             End If
    Time For Some Coding! [Advanced Launcher]
    *To do this part of the launcher you will need to download this.

    In the source code above "Public Class Form1" We need to do some imports
    Enter these imports.
    Code:
    Imports System.Net
    Imports System.Net.Sockets
    Now we will add the Server News to the launcher to do this add a WebBrowser to the form.
    Change its size to 395, 269 and its location to 123, 106 and its visibility to false. Add a
    label and set its text to "Could not connect to the News Server. Please check the network
    and try again later." Set the labels visibility to true its location to 184, 224 and it background
    color to transparent.


    Add a label and set its text to "Server Status:" and its location to 344, 435. Add another
    label and set its text to "OFFLINE" and its location to 445, 435. And set its
    forecolor to red. Set both as background color transparent.

    Now for the coding
    press F7.

    Under Public Class Form1 add these Dims.
    Code:
     Dim Apache As New TcpClient
    Dim World As New TcpClient
    Add a new "General" for Form1 Events and add a "Declaration" as Load.
    When the form loads we want it to check a connection to your servers website
    along with a connection to your world server.
    To do this add this code to Form1_Load.
    Code:
            Try
            REM Tells the launcher to try to do the following
                Apache.Connect("Your Servers IP Address", (80))
            REM Tells the launcher to connect to your servers IP address on port 80
            Catch ex As Exception
            REM Tells the launcher what to do if a connection is not made
                Label1.Visible = True
                REM Tells the launcher to make label1 visible
            End Try
            REM Tells the launcher to stop trying the above
            Try
            REM Tell the launcher to try the following
                World.Connect("Your Servers IP Address", (8085))
                REM Tells the launcher to connect to your server IP address on port 8085
            Catch ex As Exception
            REM Tells the launcher what to do if a connection is not made
                Label3.Text = "OFFLINE"
                REM Tells the launcher to set label3's text to "OFFLINE'
                Label3.ForeColor = Color.Red
                REM Tells the launcher to set label3's forecolor to red
            End Try
            REM Tells the launcher to stop trying the above
    
            If Apache.Connected Then
            REM Checks if Apache is connected
                WebBrowser1.Visible = True
                REM Makes the web browser visible if Apache is connected
                WebBrowser1.Navigate("http://Your Website Here/launcher/news.html")
                REM Navigates the web browser to http://Your Website Here/launcher/news.html
                Label1.Hide()
                REM Hides label1 from view
                Apache.Close()
                REM Closes the socket Apache was using *ALWAYS CLOSE YOUR SOCKETS
            End If
            REM Ends the above IF statement
    
            If World.Connected Then
            REM Checks if World is connected
                Label3.Text = "ONLINE"
                REM Changes lebel3's text to "ONLINE" if World is connected
                Label3.ForeColor = Color.Green
                REM Changes label3's fore color to green if World is connected
                World.Close()
                REM Closes the socket World was using *ALWAYS CLOSE YOUR SOCKETS
            End If
            Rem Ends the above if statement
    And Your Done!

    Now that you are done its time to check out the kick ass launcher you just made.
    At the top of Visual Basics 2010 locate "Debug" on the menu bar. Click it and
    select "Build Launcher". Now travel to "Documents/Visual Studio 2010/Projects/Launcher/Launcher/bin/Release".
    Inside you will find your "Launcher.exe' place it within your wow folder and start it up. Pretty awesome yea!

    But What About Server News?
    To show the server news simply place the launcher folder you downloaded in
    the root folder of your website. Inside you will find two images and an html
    document. The images are displayed as the background of the news server. The
    html document is used to display the news. Edit this to say anything you like.
    Last edited by The5thelement; 08-27-2013 at 05:38 PM. Reason: Add some pics.

  2. #2
    Retired from Emulation

    Join Date
    Aug 2010
    Location
    youtube.com/ProTazzerHD
    Posts
    952
    Nice tut, Maybe some images would been nice as well +rep

  3. #3


    Join Date
    May 2012
    Location
    Developing in SQL
    Posts
    29
    I did all the steps,copyed all the codes but still they are mistakes in the codes that my visual basic shows me.But nice tut!Good luck

  4. #4
    running amongst ghouls ..

    Join Date
    Feb 2010
    Location
    Thinking in assembly, dreaming in symbols, talking in API, living in real time.
    Posts
    11,133
    Amazing tutorial! + rep

  5. #5


    Join Date
    Jul 2010
    Location
    DBC Modding, SQL, C#
    Posts
    520
    <Baldo>
    I did all the steps,copyed all the codes but still they are mistakes in the codes that my visual basic shows me.But nice tut!Good luck
    You are using VB.Net 2010? Also what errors is it showing?

    AwkwardDev
    Amazing tutorial! + rep
    Thank you very much! I know many do not like VB.Net but I am a starting programer and
    find this a great way to start out.

  6. #6


    Join Date
    Aug 2012
    Location
    Denmark http://wow.nssgaming.com/
    Posts
    40

    Smile pictures

    pls where did you funde the wow pictures

  7. #7


    Join Date
    Jul 2010
    Location
    DBC Modding, SQL, C#
    Posts
    520
    Quote Originally Posted by kris914g View Post
    pls where did you funde the wow pictures
    They are inside
    Code:
    WoW\Data\enUS(Or whatever you use)\base-enUS.MPQ\World of Warcraft Launcher.app\Contents\Resources\launcher.MPQ

  8. #8
    Could you add the download link to mediafire instead of filebeam? I don't know why but I have never been able to download from filebeam

  9. #9


    Join Date
    Jul 2011
    Location
    Icarus Gaming Inc
    Posts
    499
    Getting some build errors...

    Here is the code I have if you hit F7 http://pastebin.com/DzVBS1ja And here is the errors when I try to build... http://pastebin.com/UaEmYWBD

    I'm sure I musta done something wrong, but no clue...

  10. #10
    Am I able to do all of this just using Visual Studio 2010 Ultimate, or must I use Visual Basic as well?

  11. #11


    Join Date
    Jul 2010
    Location
    DBC Modding, SQL, C#
    Posts
    520
    Quote Originally Posted by mferrill View Post
    Getting some build errors...

    Here is the code I have if you hit F7 http://pastebin.com/DzVBS1ja And here is the errors when I try to build... http://pastebin.com/UaEmYWBD

    I'm sure I musta done something wrong, but no clue...

    At the top of the code type "Imports System.IO"

    As for error 2 you need to go to the line and add an "End If" on the next line.
    As for error 5 you need to go to the line and add an "End Select" on the next line.

    Quote Originally Posted by Korrigal View Post
    Am I able to do all of this just using Visual Studio 2010 Ultimate, or must I use Visual Basic as well?
    Visual Basics is apart of the Visual Studio suite. So I would say yes.
    Last edited by The5thelement; 08-26-2012 at 07:12 AM.

  12. #12
    nice work

    <-bump->

  13. #13
    Awesome tutorial!

  14. #14
    AintNobodyGotTimeFoDat

    Join Date
    Oct 2009
    Location
    United Kingdom
    Posts
    1,842
    Great tutorial

  15. #15

    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    bump

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •