Warden Posted July 8, 2011 Author Share Posted July 8, 2011 Hello,im using robin's autoupdater (http://www.touchofdeathforums.com/smf/index.php/topic,58493.0.html) and i want it to open if you open client.exe,then theres a button "connect" and it checks if ur version is updated,if it is then it will open the client and if its not it will update and will open client after that,any help?thank you Link to comment Share on other sites More sharing options...
Rithy58 Posted July 8, 2011 Share Posted July 8, 2011 What you do is, don't tell everyone to open your client first.Make it so everyone open the AutoUpdater.exeNow you can set up the updater normally but you'll have to source edit a bit.Basically, have a button or a method that open the Client. I believe it's "Shell".Shell "Path\Client.exe", vbNormalFocusYou can get fancy with it. I use the If Then Else Statement that already existed during the check if there is a new version and depend on that, the button will show as either Update or Launch.Sincerely,Rtihy Link to comment Share on other sites More sharing options...
Warden Posted July 8, 2011 Author Share Posted July 8, 2011 hmm okay,but how to delete a button?i thought that i should do like that if its up to date or updated it will remove button "lblConnect" and will show the button "lblPlay"edit: i got it thanks :P Link to comment Share on other sites More sharing options...
Rithy58 Posted July 8, 2011 Share Posted July 8, 2011 You don't delete it. You simple "hide it"lblConnect.Visible = FalsePoof, it's gone!lblPlayer.Visible = TruePoof! It magically appear!Sincerely,Rithy Link to comment Share on other sites More sharing options...
Warden Posted July 8, 2011 Author Share Posted July 8, 2011 lol thanks:D but i still dont get it,if i put lblConnect into modMain it says that its not defined but in the other one,frmMain its used many times:S they both are in the autoupdater.vbp Link to comment Share on other sites More sharing options...
Rithy58 Posted July 8, 2011 Share Posted July 8, 2011 If you want to use it outside of frmMain(where the label is), you use this instead :frmMain.lblConnect.Visible = FalseYou see it? Did it clicked?Sincerely,Rithy Link to comment Share on other sites More sharing options...
Warden Posted July 8, 2011 Author Share Posted July 8, 2011 shit your smart,thank you very very much it worked:)btw how to make bold writing on the label button? Link to comment Share on other sites More sharing options...
evilbunnie Posted July 8, 2011 Share Posted July 8, 2011 Rewrite the function inside the updater that checks for updates, place it within EO and call it on client load for example 'CheckUpdates' and then if any updates are avaliable 'Shell "updater.exe"' Link to comment Share on other sites More sharing options...
Warden Posted July 8, 2011 Author Share Posted July 8, 2011 thats too hard for noob like me:Dummh how to change the thing in vb6 if you open the .exe file that what file it opens first,like does it count from name frmMain? Link to comment Share on other sites More sharing options...
Rithy58 Posted July 9, 2011 Share Posted July 9, 2011 You have two choice in VB6\. Either open one of the form first or run Sub Main() first.To go Project > Project Properties > Start Up Object.Sincerely,RithyEDIT : Oh and I love how you used the edit button. I personally myself accidentally double post sometime but I try to avoid doing that much as I can. If only new members can follow the rules like you… Link to comment Share on other sites More sharing options...
Warden Posted July 9, 2011 Author Share Posted July 9, 2011 cool:D now i know how to make it working,thank you very much!:)umm but when i try to open the exe file after compiling it says error number '52' Bad file name or number,what that means? Link to comment Share on other sites More sharing options...
Ruins of Hell Posted July 9, 2011 Share Posted July 9, 2011 There already is a check for outdated versions, that uses the client's project properties and server defined constants (CLIENT_MINOR, CLIENT_MAJOR, CLIENT_REVISION) to make sure the client is up to date. Search for an alert box that comes up starting with "Version Outdated" (no quotes) client-side. Then, after that, add:Shell "updater.exe"Once the updater is done increment the number. Make sure both of them are in sync.Lastly, here's another small thing, make the updater run the client (shell "client.exe") and then put the client in another folder. They'll run your updater first, and then it will update and run the client. Link to comment Share on other sites More sharing options...
Warden Posted July 9, 2011 Author Share Posted July 9, 2011 hmm…but now i did put the autoupdater src files and client ones together and renamed autoupdater's frmMain to frmUpdater,and i wanted it to open the frmUpdater first if you run the exe file but it gives me the error "error number '52' Bad file name or number" Link to comment Share on other sites More sharing options...
Robin Posted July 9, 2011 Share Posted July 9, 2011 Don't overwrite the game's source code you plonker. Link to comment Share on other sites More sharing options...
Warden Posted July 9, 2011 Author Share Posted July 9, 2011 i didnt overwrite i added the autoupdater in it Link to comment Share on other sites More sharing options...
Ruins of Hell Posted July 9, 2011 Share Posted July 9, 2011 Both the updater's form and the client's form are both frmMain. You copied the updater frmMain over the client's frmMain. Link to comment Share on other sites More sharing options...
Warden Posted July 9, 2011 Author Share Posted July 9, 2011 i changed it in the vb6 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now