HELP PLEASE PEOPLE

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
15 posts Page 2 of 2
Contributors
User avatar
muttley1968
Hardcore Programmer
Hardcore Programmer
Posts: 622
Joined: Thu Jun 17, 2010 11:54 pm

Re: HELP PLEASE PEOPLE
muttley1968
Sorry for double post i am really stuck and dont want to tern to dad as it usually means me doing a Huge job or something liek that
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Re: HELP PLEASE PEOPLE
MrAksel
Make sure the file isn't open.
Code: Select all
System.IO.File.Copy(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\RARFile.rar", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\.minecraft\texturepacks\RARFile.rar")
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
muttley1968
Hardcore Programmer
Hardcore Programmer
Posts: 622
Joined: Thu Jun 17, 2010 11:54 pm

Re: HELP PLEASE PEOPLE
muttley1968
The file isnt open and your code didnt work ones it had been edited to the point were textbox is the location same errors as before i have posted a link on the other topic about this though and there is all my code soo if you can fix it please tell me code :P
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Re: HELP PLEASE PEOPLE
MrAksel
Replace Button2 code with this:
Code: Select all
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        On Error GoTo x
        System.IO.File.Copy(Textbox1.Text, Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\.minecraft\texturepacks\" + System.IO.Path.GetFileName(TextBox1.Text)) 
        Messagebox.TextBox1.Text = ("Texture pack has been updated")
        Messagebox.Show()
        Return
x:      Messagebox.TextBox1.Text = ("Error loading texturpack please try again")
        Messagebox.Show()
    End Sub
Or this
Code: Select all
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Try
            System.IO.File.Copy(Textbox1.Text, Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\.minecraft\texturepacks\" + System.IO.Path.GetFileName(TextBox1.Text)) 
            Messagebox.TextBox1.Text = "Texture pack has been updated"
            Messagebox.Show()
        Catch ex As Exception
            Messagebox.TextBox1.Text = "Error loading texturpack please try again"
            Messagebox.Show()
        End Try
    End Sub
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
muttley1968
Hardcore Programmer
Hardcore Programmer
Posts: 622
Joined: Thu Jun 17, 2010 11:54 pm

Re: HELP PLEASE PEOPLE
muttley1968
YAY Thank you soo mutch works great when i have finished it i will put it up on here thanks soo mutch
15 posts Page 2 of 2
Return to “Coding Help & Support”