Page 1 of 1

Programming: VB Programming Tutorial #3

Posted: Wed Oct 27, 2004 7:10 pm
by Locke
This one will be more Halo orientated.I will explain how to make a simple program like this.
http://files.halomods.com/viewtopic.php?t=18487
Just got it moved to utilities,people spammed last one.

Im going to again asume you have read the previous tuts.

To start off make a form.Name it frmmain
Change caption to Halo Dedicated Server Program

Make a textbox on the form,and name it txt1.Go down to text and delete it.Go to Multiline,and say True(makes it type on more than 1 line)
Image

Now that you have that,lets create some labels
Drag out a label and place it on screen.Change caption to
Server Name

Make a new label and change caption to Maxplayers

Make a new label and change caption to Maps

Make a new label and change caption to gametypes

And creat a command button called submit
cmdsubmit
Caption=Submit
Image
Now create a txtbox,name it txtname,and delte the text from it.Place it next to the label that says Server Name

Create another textbox and name it txtmaxplayers,and delete all text,And place by label Maxplayers

Create another textbox and name it txtmap,and delete all text,And place by label Map

Create another textbox and name it txtgametype,and delete all text,And place by label Gametype
Image
Now for some coding
type
txt1.text="sv_name "+""""+txtname+""""
'That says,type sv_name then add a space,and put "" around the name the user typed in.
So txt1 will say
sv_name "Test"

go down a line anf type
txt1.text=txt1.text+vbcrlf+"sv_maxplayers "+txtmaxplayers
You dont need the "" around it cause its a number
txt1.text=txt1.text,that means add this to the current txt1(otherwise,it would delete what you said,and qrtie new text)
vbcrlf just makes it go to next line

now go to next line and type
txt1.text=txt1.text+vbcrlf+"sv_mapcycle_add "+txtmap+" "+txtgametype
Longer code there,cause it combines txtmap,and gametype together
Image
Now run and type Name,maxplayers,map,and gametype.
Image

And thats the basics of my program.Youll have to mess around a bit to put in more stuff.

All the dl's for vb trial have disapered and I cant find them.Search google for
Visual Basic 5.0 Control Edition

if you find a link please post it here
Any suggestions for another tut?

Posted: Wed Oct 27, 2004 7:14 pm
by [CL]9mm-Man
Sweet tutorial there, Im going to try adding more things like FF and stuff (yeah, I know you did it, but I wanna try figure it out myself) Good job, nice and easy to follow.

Posted: Wed Oct 27, 2004 7:20 pm
by Locke
The problem is if its not easy then people wont readSo I want to make better tuts,but there harder.So Im limited to what people can understand

Posted: Wed Oct 27, 2004 9:41 pm
by Danke
Do you know how to make a prog that can actively edit and read a text file in VB? That's what I need to know how to do.

Posted: Wed Oct 27, 2004 9:54 pm
by Locke
You mean like it scans the file for specific words and lines,and you can edit them?Btw did you find vb trial?Where

Posted: Wed Oct 27, 2004 10:56 pm
by Danke
No I didn't.

But yes, scanning would be great, but editing is pretty important too. I really just want it to find the <filename> in the xml and give me what's inside it.

Basically, here is what I want the program to do, possibly in different inner windows: I want it to start in the extracted map's folder. Then I want it to load all the xml files' names in that directory and it's sub directories. I want it to list them, and then I want to click on indivindual ones and be able to open them in a different inner window. This window will just list the dependencies mentioned in this xml file, starting with the ID stuff (obje, proj, the yyyy thing). You click one and there'll be an edit box with a browse button. You choose a different xml file and the one you selected is replaced by the new one and the ID stuff is set (predetermined by filename: proj.xml would make it jorpejboyyyy). Maybe even have an open button next to it to change that one's dependencies.

Here's a concept: (blue is double click, red is single click)
Image

It's actually not that complicated. Oh, and if it's easier I might just go with one window, the main window, and it changes into the other ones and a little bottom would put it back at the main window.

Posted: Wed Oct 27, 2004 11:04 pm
by [CL]9mm-Man
Wow, cool idea, very usefull... Idk how to do any of that im just here to tell you what I think of it :D.. Its cool..Could be hard to make tho

Posted: Thu Oct 28, 2004 7:00 am
by Locke
Ill see what I can do.Ill work on it after school

Posted: Wed Nov 17, 2004 5:00 pm
by Thebirthdayhat
Nice tut, real easy to follow, but can u tell me the code to make txt 1(the one wit all the text for init text) pop up in a wordpad doc named init. or watever the initial text name is plz.



-hat

Posted: Tue Jan 04, 2005 4:38 pm
by halo-sniper
Yomama Wrote:
txt1.text="sv_name "+""""+txtname+""""
'That says,type sv_name then add a space,and put "" around the name the user typed in.
why is their so much "'s shouldn't their only be one after the "+" before the "txtname"

Posted: Fri Feb 18, 2005 3:56 pm
by sparkicks
one thing. how do you actually host the game... i dont see ne code there that actually makes the game unless i missed something

Posted: Fri Feb 18, 2005 3:59 pm
by Cheech|N|Chong
uh...he didnt go that far in the tutorial yet... :roll:

hey

Posted: Wed Aug 01, 2007 10:34 pm
by [Spawn]
Hey I moved onto Final Fantasy XI and decided to make a macro maker for people who don't know how to do extended macros, I used this as a base but I made multiple add buttons, I.e. add for head gear neck gear, etc all throughout the inventory but I can't get them to add one by one, can you help me?

Posted: Wed Aug 01, 2007 10:58 pm
by Tural
Two year bump and a ridiculously large image. >_<

re

Posted: Tue Jan 08, 2008 7:37 pm
by DirtJumper
This is very helpful, I am actually getting somewhere. THanx

Posted: Wed Jan 09, 2008 7:16 am
by [Spawn]
I never knew you could bump a stickied thread.

Posted: Wed Jan 09, 2008 7:32 am
by Tural
That post was clearly necessary.

So tell me, does it, or does it not, bring the topic to the top of the stickied threads? It does. Making a post in a thread that's been dead for two years is a bump, and you're just going out of your way to instigate an issue and argue about trivial semantics.

Posted: Wed Jan 09, 2008 9:21 am
by [Spawn]
I'm clearly going out of my way? I responded to your post like you just did to mine, are you going out of your way also?

Posted: Wed Jan 09, 2008 9:31 am
by Tural
That was months ago. If you wanted to respond, you could have done it then. The situation is over now, and you are reviving it.

Posted: Wed Jan 09, 2008 11:08 am
by kornman00
Image

owait, this is VB isn't it? nvm, worst. thread. ever.