10 Replies - 2697 Views - Last Post: 05 July 2009 - 08:07 PM Rate Topic: -----

#1 koolazngy94  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 121
  • Joined: 29-July 08

How do I make a patcher?

Posted 05 July 2009 - 02:51 PM

I was wondering how do I make a patcher like for example. I make a listbox, textbox, and a button. The listbox has nothing yet and someone who downloaded has nothing too. I add "Hi" and click the button. My listbox will now have "Hi". How do I make it when someone who downloaded has the word "Hi" without downloading again?
Is This A Good Question/Topic? 0
  • +

Replies To: How do I make a patcher?

#2 unlimited24  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 45
  • Joined: 28-August 08

Re: How do I make a patcher?

Posted 05 July 2009 - 03:01 PM

View Postkoolazngy94, on 5 Jul, 2009 - 01:51 PM, said:

I was wondering how do I make a patcher like for example. I make a listbox, textbox, and a button. The listbox has nothing yet and someone who downloaded has nothing too. I add "Hi" and click the button. My listbox will now have "Hi". How do I make it when someone who downloaded has the word "Hi" without downloading again?


download ? are you downloading the text? or who ever has this app, when oppened, it shows hi as a item in the listbox?
Was This Post Helpful? 0
  • +
  • -

#3 koolazngy94  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 121
  • Joined: 29-July 08

Re: How do I make a patcher?

Posted 05 July 2009 - 03:04 PM

Is like I updated my program. When someone open it, it will automatically update for them with the new list.
Was This Post Helpful? 0
  • +
  • -

#4 unlimited24  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 45
  • Joined: 28-August 08

Re: How do I make a patcher?

Posted 05 July 2009 - 03:54 PM

i get it.

the way I would do it is I would create a text file and then tell the application to display the text on open...

in you're form.load even try this
 If My.Computer.FileSystem.FileExists(My.Computer.FileSystem.SpecialDirectories.MyDocuments & "/list.txt") Then
			Me.Refresh()
		Else
			My.Computer.Network.DownloadFile("http://yoursitehere/list.txt", _
											 My.Computer.FileSystem.SpecialDirectories.MyDocuments & "/list.txt")
		End If

		If My.Computer.FileSystem.FileExists(My.Computer.FileSystem.SpecialDirectories.MyDocuments & "/list.txt") Then
			ListBox1.Items.Add(My.Computer.FileSystem.ReadAllText(My.Computer.FileSystem.SpecialDirectories.MyDocuments & "/list.txt"))

		End If






so when you load you're form it will check for that, download, then display... the last line might actually read all text in the file and not place it in items per text line...

but I am new to programming and this is what I came up for one of my apps and it works for me. good luck

This post has been edited by unlimited24: 05 July 2009 - 03:56 PM

Was This Post Helpful? 0
  • +
  • -

#5 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1642
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: How do I make a patcher?

Posted 05 July 2009 - 04:11 PM

@unlimited24 Can you please stay within the rules of the forum and show no code unless the OP has shown at least a token effort in solving their problem :)
Was This Post Helpful? 0
  • +
  • -

#6 unlimited24  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 45
  • Joined: 28-August 08

Re: How do I make a patcher?

Posted 05 July 2009 - 04:15 PM

oh so sorry PsychoCoder... was eager to help my first person in a language that I'm studying I guess I forgot :)
Was This Post Helpful? 0
  • +
  • -

#7 koolazngy94  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 121
  • Joined: 29-July 08

Re: How do I make a patcher?

Posted 05 July 2009 - 05:02 PM

Well I think I got it now. Thanks unlimited. But right now, I'm reinstalling my VB.NET so I can fix that one error.
Was This Post Helpful? 0
  • +
  • -

#8 koolazngy94  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 121
  • Joined: 29-July 08

Re: How do I make a patcher?

Posted 05 July 2009 - 06:52 PM

There another problem. How do I make it automatically add the file to the website without me uploading it?

--EDIT--
wait can we just use mysql?

This post has been edited by koolazngy94: 05 July 2009 - 06:59 PM

Was This Post Helpful? 0
  • +
  • -

#9 BetaWar  Icon User is online

  • #include "soul.h"
  • member icon

Reputation: 1199
  • View blog
  • Posts: 7,309
  • Joined: 07-September 06

Re: How do I make a patcher?

Posted 05 July 2009 - 07:43 PM

Quote

wait can we just use mysql?

Yes, I believe you could. It would likely be easier than having to upload files every so often.
Was This Post Helpful? 0
  • +
  • -

#10 LoveIsNull  Icon User is offline

  • Recovering D.I.C Addict
  • member icon

Reputation: 52
  • View blog
  • Posts: 646
  • Joined: 10-March 09

Re: How do I make a patcher?

Posted 05 July 2009 - 07:53 PM

That isn't particularly what I would consider a "patch" though.
If your program is just using a text file (or database) to load data for internal purposes or whatever that would be a start, but if you are talking as in physically updating your executable you could look at this video.
Was This Post Helpful? 0
  • +
  • -

#11 koolazngy94  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 121
  • Joined: 29-July 08

Re: How do I make a patcher?

Posted 05 July 2009 - 08:07 PM

Ok, so I decided to go with unlimited idea but I what I want is if the file exist, it will be deleted and will be redownloaded.

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
		If ComboBox1.Text = "Call of Duty 5" Then
			My.Computer.Network.DownloadFile("http://havocpc.110mb.com/COD5.txt", _
				My.Computer.FileSystem.SpecialDirectories.MyDocuments & "/COD5.txt")
		End If


Full Code
Public Class Form1

	Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
		Me.Close()
	End Sub

	Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
		If ComboBox1.Text = "Call of Duty 5" Then
			My.Computer.Network.DownloadFile("http://havocpc.110mb.com/COD5.txt", _
				My.Computer.FileSystem.SpecialDirectories.MyDocuments & "/COD5.txt")
		End If
		If My.Computer.FileSystem.FileExists(My.Computer.FileSystem.SpecialDirectories.MyDocuments & "/COD5.txt") Then
			ListBox1.Items.Add(My.Computer.FileSystem.ReadAllText(My.Computer.FileSystem.SpecialDirectories.MyDocuments & "/list.txt"))
		End If

		If ComboBox1.Text = "The Conduit" Then
			My.Computer.Network.DownloadFile("http://havocpc.110mb.com/Conduit.txt", _
				My.Computer.FileSystem.SpecialDirectories.MyDocuments & "/Conduit.txt")
		End If
		If My.Computer.FileSystem.FileExists(My.Computer.FileSystem.SpecialDirectories.MyDocuments & "/Conduit.txt") Then
			ListBox1.Items.Add(My.Computer.FileSystem.ReadAllText(My.Computer.FileSystem.SpecialDirectories.MyDocuments & "/list.txt"))
		End If

		If ComboBox1.Text = "Soldat" Then
			My.Computer.Network.DownloadFile("http://havocpc.110mb.com/Soldat.txt", _
				My.Computer.FileSystem.SpecialDirectories.MyDocuments & "/Soldat.txt")
		End If
		If My.Computer.FileSystem.FileExists(My.Computer.FileSystem.SpecialDirectories.MyDocuments & "/list.txt") Then
			ListBox1.Items.Add(My.Computer.FileSystem.ReadAllText(My.Computer.FileSystem.SpecialDirectories.MyDocuments & "/list.txt"))
		End If

	End Sub
End Class


This post has been edited by koolazngy94: 05 July 2009 - 08:09 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1