| View previous topic :: View next topic |
| Author |
Message |
killar456 Master Cheater
Reputation: 0
Joined: 30 Mar 2007 Posts: 415
|
Posted: Wed Feb 06, 2008 10:54 am Post subject: VB6 autoupdater |
|
|
| i need a auto updater, but i don't know how to make one....can someone help me please?
|
|
| Back to top |
|
 |
killar456 Master Cheater
Reputation: 0
Joined: 30 Mar 2007 Posts: 415
|
Posted: Wed Feb 06, 2008 11:04 am Post subject: |
|
|
| wtf? i cant see what he wrote.....
|
|
| Back to top |
|
 |
AtheistCrusader Grandmaster Cheater
Reputation: 6
Joined: 23 Sep 2006 Posts: 681
|
Posted: Wed Feb 06, 2008 11:23 am Post subject: |
|
|
you are about to get warned!!!
Anyway, put version.ini in app.path and
dim ver as integer
ver = readversion.ini here
and put a webpage with version eg: something.com/version
Then add INet control onto ur form.
dim ver2 as int
ver2 = Inet1.openurl("sometyhinf.com/versiobn")
if ver < ver2 then
aaand... download the update file then.
|
|
| Back to top |
|
 |
killar456 Master Cheater
Reputation: 0
Joined: 30 Mar 2007 Posts: 415
|
Posted: Wed Feb 06, 2008 11:56 am Post subject: |
|
|
| ok...can you also tell me how i make something stay on top so it doesn't minimize? with like a check box, when its checked its enabled, when its unchecked, is disabled?
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Wed Feb 06, 2008 12:55 pm Post subject: |
|
|
| Convert your value to array of bytes (or just insert it as array of bytes) and ReadProcessMemory, see what matches.
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Wed Feb 06, 2008 1:07 pm Post subject: |
|
|
| killar456 wrote: | | ok...can you also tell me how i make something stay on top so it doesn't minimize? with like a check box, when its checked its enabled, when its unchecked, is disabled? |
If CheckBox1.Checked = true Then
TopMost = true
Else
TopMost = false
End If
i dont know VB btw, but u get the picture
_________________
|
|
| Back to top |
|
 |
killar456 Master Cheater
Reputation: 0
Joined: 30 Mar 2007 Posts: 415
|
Posted: Wed Feb 06, 2008 1:15 pm Post subject: |
|
|
that wont work because checked is not a variable, ive tried already, but thanks for trying to help
|
|
| Back to top |
|
 |
Blader I post too much
Reputation: 2
Joined: 19 Jan 2007 Posts: 2049
|
Posted: Wed Feb 06, 2008 1:17 pm Post subject: |
|
|
Use the value property
0 - Unchecked
1 - Checked
2 - Disabled
If Check1.Value = _ Then
(Code)
_________________
|
|
| Back to top |
|
 |
killar456 Master Cheater
Reputation: 0
Joined: 30 Mar 2007 Posts: 415
|
Posted: Wed Feb 06, 2008 1:34 pm Post subject: |
|
|
| oh, that would work, didnt think about that, thanks blader, but....i still dont know how to make the window stay on top...cause topmost doesnt work...
|
|
| Back to top |
|
 |
Blader I post too much
Reputation: 2
Joined: 19 Jan 2007 Posts: 2049
|
Posted: Wed Feb 06, 2008 1:36 pm Post subject: |
|
|
Yes it does, let me try and find the code I used...
_________________
|
|
| Back to top |
|
 |
killar456 Master Cheater
Reputation: 0
Joined: 30 Mar 2007 Posts: 415
|
Posted: Wed Feb 06, 2008 1:41 pm Post subject: |
|
|
| ok would it be like form1.topmost?
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Wed Feb 06, 2008 1:41 pm Post subject: |
|
|
Isn't 2 is the 3rd state that square?
"Indeterminate".
Last edited by Symbol on Wed Feb 06, 2008 1:42 pm; edited 1 time in total |
|
| Back to top |
|
 |
Blader I post too much
Reputation: 2
Joined: 19 Jan 2007 Posts: 2049
|
Posted: Wed Feb 06, 2008 1:42 pm Post subject: |
|
|
Ok I found it
Add this to your code:
| Code: | Private Declare Function SetWindowPos Lib "user32" (ByVal _
hWnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, _
ByVal y As Long, ByVal cx As Long, ByVal cy As Long, _
ByVal wFlags As Long) As Long
Sub SetTopmostWindow(ByVal hWnd As Long, Optional topmost As Boolean = True)
Const HWND_NOTOPMOST = -2
Const HWND_TOPMOST = -1
Const SWP_NOMOVE = &H2
Const SWP_NOSIZE = &H1
SetWindowPos hWnd, IIf(topmost, HWND_TOPMOST, HWND_NOTOPMOST), 0, 0, 0, 0, _
SWP_NOMOVE + SWP_NOSIZE
End Sub |
Now in your button code/form loading code, use this:
| Code: | | SetTopmostWindow Me.hWnd |
To turn it off, use:
| Code: | | SetTopmostWindow Me.hWnd, False |
_________________
|
|
| Back to top |
|
 |
killar456 Master Cheater
Reputation: 0
Joined: 30 Mar 2007 Posts: 415
|
Posted: Wed Feb 06, 2008 1:48 pm Post subject: |
|
|
| Thank you! glad to have people like you in this section +rep for you blader
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8588 Location: 127.0.0.1
|
Posted: Wed Feb 06, 2008 2:03 pm Post subject: |
|
|
| killar456 wrote: | | wtf? i cant see what he wrote..... |
You can't see what he wrote because he is banned. His response would have gotten him warned if he wasn't anyway.
As for auto-updating, there are a few ways you can do things. Firstly the easiest is detecting the version by either storing it in a file (ini, xml, cfg, or registry) and compare it to one on a remote server.
You can also read the version from the exe itself if you keep it updated or just turn on auto-increments in the properties.
Then for the outline, use MS Winsock to make the connect to the server, download the file that contains the following info:
- Current Updated Version
- Current Updated Version Download Link
- News/updates, etc other info you want to show or what ever.
Compare the version of the one on the persons system to the one downloaded from the file on the net. If the users version is not the same (you will need to do some extensive checking to make sure they have the most recent due to sub versions and revisions.) inform them theres a new version and either let them download it or have the program open a new socket/stream to download the file.
That would be the basic outline of how to do it.
You can probably find some examples on www.pscode.com
_________________
- Retired. |
|
| Back to top |
|
 |
|