Sir Topham Hatt Posted March 21, 2012 Author Share Posted March 21, 2012 Hello everyone I've been trying to figure out just what am I doing wrong? I'm trying to make the auto updater run the client when you press the exit button.Source:```Private Sub lblExit_Click() ' call the game destroy sub and start the game Dim Res Dim Filename Filename = "client.exe" Res = Shell("start.exe " & Filename, vbHide) DestroyUpdaterEnd Sub``` Link to comment Share on other sites More sharing options...
Ruins of Hell Posted March 21, 2012 Share Posted March 21, 2012 Use code tags.```Private Sub lblExit_Click() ' call the game destroy sub and start the game Shell("client.exe", vbNormalFocus) DestroyUpdaterEnd Sub```Things to note:* I assumed your client is titled "client.exe".* I use vbNormalFocus to start the client normally and give it focus. Link to comment Share on other sites More sharing options...
Sir Topham Hatt Posted March 21, 2012 Author Share Posted March 21, 2012 Thanks, I'll try it out when I get home after school. Link to comment Share on other sites More sharing options...
Sir Topham Hatt Posted March 21, 2012 Author Share Posted March 21, 2012 Error,Compile Error:Syntax errordid I misplace it?```Private Sub lblExit_Click() ' Start the game and call the game destroy sub Shell("client.exe", vbNormalFocus) DestroyUpdaterEnd Sub``` Link to comment Share on other sites More sharing options...
Ruins of Hell Posted March 22, 2012 Share Posted March 22, 2012 Wow, my fault. I made a little mistake.```Private Sub lblExit_Click() ' call the game destroy sub and start the game Call Shell("client.exe", vbNormalFocus) DestroyUpdaterEnd Sub```That should work. Link to comment Share on other sites More sharing options...
Sir Topham Hatt Posted March 22, 2012 Author Share Posted March 22, 2012 That did the trick. Many thanks. 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