Quantcast

Jump to content

» «
Photo

Using GTALauncher

9 replies to this topic
jarjar
  • jarjar

    Boss

  • BUSTED!
  • Joined: 07 Aug 2005

#1

Posted 13 January 2006 - 06:12 AM Edited by jarjar, 27 December 2006 - 05:46 AM.

This will be a odd tutorial to many but for some it will properly be very useful. In this tutorial you will learn how you create your own application or program to launch a GTA Game from your computers TaskTray. This is similar to my GTALauncher i made but a lot more simple and basic. But from this you can expand it and make it support all GTA Games and add extras. Enjoy and have fun...If this is your first Application it will be like making your first mod or making your first website. Like all new and hard things it makes you feel good that you have achieved something not many people in the world can do.

<<<<<<Requirements>>>>>>
*Microsoft Visual Basic Express Edition 2005 - It's Free and is very useful.
*About 10 minutes of free time.

<<<<Step One>>>> GETTING STARTED

1. When you have started up Visual Basic Express Edition 2005 go to File -> New Project (or Ctrl+N)
2. Chose Windows Application and call it what ever you want (I used SALauncher).

<<<<Step Two>>>> ADDING THE CONTROLS

1. You will now be presented with a Window called Form1. You can do whatever you want with the window (Place images or something on it if you wish)
2. In VB 2005's Toolbox (Docked on the left side of the screen, simple press it and a menu will pop-up)
3. In this menu find NotifyIcon. Click it and drag it on to Form1. It can be placed anywhere as it auto-hides when dropped.
4. The NotifyIcon text and image will know appear down in a little gray box below the form field.
5. Click on it and you will see a little arrow appear above it, click the arrow and another menu will show up with a link text "Choose Icon on it" Click it and find a icon (.ico file) This will be the icon that will appear in tasktray.

<<<<Step Three>>>> ADDING THE CODE

1. Now open your VB's ToolBar again an choose ContextMenuStrip and drag and drop it on to Form1 like you did before.
2. You will now be able to make a Right-Click menu, add a menu called "Launch SA".
3. Then double click it and you will get a code page to type code for what happens when the user clicks the "Launch SA" menu item.
4. Type the following in here: (edit if your gta_sa.exe is in a different location)
CODE
Dim notepadID As Integer = Shell("C:\Program Files\Rockstar Games\GTA San Andreas\gta_sa.exe", AppWinStyle.NormalFocus)


<<<<Step Four>>>> GETTING THE MENU TO SHOW-UP

1. Now click on the NotifyIcon again and press the Properties tab on the Left Hand Side of your form.
2. Under the tab Behavior it has a area saying ContextMenuStrip and next to it it has drop down menu with the words "(none)" there. Click it and go down to ContextMenuStrip1 and click it. Your done...Go to step five to test it.

<<<<Step Five>>>> TESTING YOUR APPLICATION

1. Now click the menu Debug -> Start Debugging (or F5).
2. Now wait till it builds your applications. Once it does you will see your Form1 and it will be alive like a proper application.
3. Now look at your tasktray and you will see your chosen icon for the notifyicon. Right-Click it and you will see your ContextMenuStrip you made.
4. Click it and GTA SA will load.
5. Your done, you have made your own GTALauncher.

<<<<<<<<<<<<<<<<<<<<<<Downloads:>>>>>>>>>>>>>>>>>>>>>>

Source:
Example:

YeTi
  • YeTi

    S'up Bitches?

  • Andolini Mafia Family
  • Joined: 28 Mar 2005

#2

Posted 15 January 2006 - 08:08 PM

Nice little tutorial. I didn't realise how similar VB6 and VB.net coding was.

You should maybe add the links at the bottom for the source and download wink.gif .

jarjar
  • jarjar

    Boss

  • BUSTED!
  • Joined: 07 Aug 2005

#3

Posted 16 January 2006 - 12:15 PM

QUOTE (YeTi @ Jan 16 2006, 06:08)
Nice little tutorial. I didn't realise how similar VB6 and VB.net coding was.

You should maybe add the links at the bottom for the source and download wink.gif .

Thanks, i will add them as soon as my webserver starts working again. Also you are right about the code. It's Visual Basic 2005, very simalar to VB6 and VB.NET - VB2005 is a mix of both programming lanuages. This tutorial focuses on the .NET Framework but GTALauncher focuses on both VB and .NET. Thankyou for your opinion, also the code in VB2005 has only several changes to the source code...Because of this VB2005 has a converter to convert you VB6 source to VB2005 source.

macarone
  • macarone

    Square Civilian

  • Members
  • Joined: 29 Oct 2004

#4

Posted 16 January 2006 - 01:53 PM

QUOTE (jarjar @ Jan 13 2006, 06:12)
4. Type the following in here: (edit if your gta_sa.exe is in a diffrent location)
CODE
Dim notepadID As Integer = Shell("C:\Program Files\Rockstar Games\GTA San Andreas\gta_sa.exe", AppWinStyle.NormalFocus)

any way to have it load the path from the registry? and how bout making it to remov the slpash screens and movies at start of the game?
could you tell us how to do that?

YeTi
  • YeTi

    S'up Bitches?

  • Andolini Mafia Family
  • Joined: 28 Mar 2005

#5

Posted 16 January 2006 - 04:29 PM

To remove the splash screens you need to know memory editing. Here's a good tutorial wrote by jacob. on the basic's of memory editing in vb.

And here's a topic with alot of known memory adresses, i believe the cut scene one's are in the topic somewere. Here's the same topic but for GTA3 and VC.

Memory editing is pretty advanced and you should have a good knowledge of VB before even attempting it.

Why would you want it to load the path from the registery? It is alot of extra work for the same result as a couple of lines of coding.

macarone
  • macarone

    Square Civilian

  • Members
  • Joined: 29 Oct 2004

#6

Posted 16 January 2006 - 09:17 PM

well, if make an loader, my friends will surly want to use it, and I don't wan't to make one for each of them. they don't have the same game path as me.

DexX
  • DexX

    Black Hat

  • Feroci
  • Joined: 16 May 2002

#7

Posted 16 January 2006 - 09:41 PM

if you want to disable the splash screens, you can do so on 1.01 and 2.00, by running the game with the command line "-skip". Those exe's are also around 8mb, vs the 13 or so for 1.0, so you could get the version number without digging in the exe (if exe filesize > 9mb, then exe version == 1.0, dont do command line param)

Registry is more versatile if distribution is planned because yea, not everyone installs it in the same spot.

jarjar
  • jarjar

    Boss

  • BUSTED!
  • Joined: 07 Aug 2005

#8

Posted 17 January 2006 - 05:15 AM

QUOTE (macarone @ Jan 16 2006, 23:53)
QUOTE (jarjar @ Jan 13 2006, 06:12)
4. Type the following in here: (edit if your gta_sa.exe is in a diffrent location)
CODE
Dim notepadID As Integer = Shell("C:\Program Files\Rockstar Games\GTA San Andreas\gta_sa.exe", AppWinStyle.NormalFocus)

any way to have it load the path from the registry? and how bout making it to remov the slpash screens and movies at start of the game?
could you tell us how to do that?

Loading paths and values from the registry is a lot easier in VB2005 but it still requires a fair bit of work and info. It is a YeTi says
QUOTE
"It is alot of extra work for the same result as a couple of lines of coding."


YeTi: Great work, i am working on hacking SA so these topics will be a great help to myself aswell. Great stuff...

Posted by macarone Posted on Jan 17 2006, 07:17
QUOTE
well, if make an loader, my friends will surly want to use it, and I don't wan't to make one for each of them. they don't have the same game path as me.


If you want a very advanved and more high tech launcher or loader try my GTALauncher...It has password protection, launch capabilities, multilaunch, window launch and many other nifty extras....Be sure to get Version 2.0.3 for the fastest and best launches.

Posted by DexX Posted on Jan 17 2006, 07:41
QUOTE
if you want to disable the splash screens, you can do so on 1.01 and 2.00, by running the game with the command line "-skip". Those exe's are also around 8mb, vs the 13 or so for 1.0, so you could get the version number without digging in the exe (if exe filesize > 9mb, then exe version == 1.0, dont do command line param)

Registry is more versatile if distribution is planned because yea, not everyone installs it in the same spot.


Cool, your my new best friend. So very simple to do. This will help with the next version of GTALauncher. Amazing how simple some stuff is..Great work. Also the registry isn't always the best bet. In VB2005 you can very simple set up settings for users to specife where they have GTA3, VC or SA installed and then change the origanal launch code the one i have below. This is a more advanced way to make the program interact with its user....Here is an example (rememebr this will not work unless you have a setting saver set in your projects properties):

CODE
Dim notepadID As Integer = Shell(My.Settings.gta3exelocation, AppWinStyle.NormalFocus)


Very simple. For this to work correctly you need to have a setting for your app called
CODE
gta3exelocation
and a textbox with a file browser on a form for users to pick there gta3.exe and game folder location. Not very difficult of you have a little bit of experiance. I will expand on this aspect of things later when a have a bit more time.





coin-god
  • coin-god

    High Roller

  • $outh $ide Hoodz
  • Joined: 18 Mar 2007
  • None

#9

Posted 02 May 2007 - 11:29 PM

i need help!, when i test it the menu dont appear!! sad.gif

Maxim
  • Maxim

    Square Civilian

  • Members
  • Joined: 16 Nov 2007

#10

Posted 23 November 2008 - 07:28 PM

yeah ive done everything that it says in this tutorial and it doesn't appear...




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users