Archive for myfreeforum.org Before posting please check the "stickies" in the support forums.
Please ask questions in real English and not "txt". You will get a better response.
Please do not ask support questions via PMs.
 

The free forums are now under new ownership, a full announcement will be made shortly

       myfreeforum.org Forum Index -> Off Topic
CodyT07

Wrote my first Visual Basic program

Must say, I love it. Cuts down a tedious task of making .res files for maps. Screen shot below


Click to see full size image
Only problem is the placement of the echo text back block, some reason I couldn't move it again so I left it there   but I'm the only one thats probably going to use it. (as for right now)

I have it coded to save to a spot specifically on my computer which is why it is made for my computer, When I get more time I would love to add a 'to save where' function instead of hard coding it in. But as of right now, it is one less step I have to do of having to click  Wink
But surely the way I wrote the 'What to save' has to have a more efficient way of writing it

Spoiler:

Code:
Public Class Form1

    Private Sub myInput_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles textInput.TextChanged
        myLabel.Text = textInput.Text
    End Sub


    Private Sub myButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles myButton.Click
        Dim fso, MyFile
        fso = CreateObject("Scripting.FileSystemObject")
        MyFile = fso.CreateTextFile("C:\Documents and Settings\Cody\Desktop\Tf2\res\" + textInput.Text + ".res", True)
        MyFile.WriteLine("""resources""")
        MyFile.WriteLine("{")
        MyFile.WriteLine(Chr(34) & textInput.Text + ".bsp""   ""file""")
        MyFile.WriteLine("}")
        MsgBox("Saved", _
        vbExclamation, _
        "Save Successful!")
        MyFile.Close()
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class

Daniel(u1bd2005)

Congrats on your first vb program, i have a few vb programs that im currently making, i tend to lose interest for a while and start a new project then go back to older projects later to finish them lol.

I have 3 games ongoing at the moment (just 2d/text based games though)

Anyway, congrats on your first program, as long as it works properly then it doesn't matter how long the code is in my opinion. (as long as it's not way too long.)
CodyT07

Daniel(u1bd2005) wrote:
Congrats on your first vb program, i have a few vb programs that im currently making, i tend to lose interest for a while and start a new project then go back to older projects later to finish them lol.

I have 3 games ongoing at the moment (just 2d/text based games though)

Anyway, congrats on your first program, as long as it works properly then it doesn't matter how long the code is in my opinion. (as long as it's not way too long.)

I was actually suppose to learn C++  , its for a program we have at school we need work on. Still a few things I would want to try with my opinion just to fulfill my ego.
Define where to save the file in a text file (less clicking)
Add loops (o fun)/
Thanks Ub

       myfreeforum.org Forum Index -> Off Topic
Page 1 of 1
Create your own free forum | Buy a domain to use with your forum