Tridia Online Posted November 24, 2011 Author Share Posted November 24, 2011 I searched and did not see any status on it so I decided to create one, let go to it.Work only in the Client1 Go and create a PictureBox frmMain and set the amount of Visible = false and named : picAlert.2 ° Within of the PictureBox and create two CommandButton named: one cmdLogout and the other cmdCancel.3: Double click on the button cmdCancel and put this:Private Sub cmdCancel_Click() If Not picCharacter.Visible Then picCharacter.Visible = True picAlert.Visible = False End IfEnd SubIn a 4 ° Double click cmdCancel and put this:If Map.Moral = 1 Then logoutGame Else AddText "You cannot logout into the battle zone!", BrightRed picCharacter.Visible = True picAlert.Visible = False End IfGo 5 ° in frmMain code and find:Cancel = True logoutGameput this in place:Cancel = True picAlert.Visible = TrueThis makes the player click the [x] to close the window you see a warning window for logging or cancel (Note: The player can only log in safe zone.)I hope this helps.Sorry my bad English Link to comment Share on other sites More sharing options...
lexkymbeth Posted November 24, 2011 Share Posted November 24, 2011 i suggest using code tags Link to comment Share on other sites More sharing options...
mrmiguu Posted November 24, 2011 Share Posted November 24, 2011 @lexkymbeth:> i suggest using code tagsCode tags don't communicate well with the VB6 IDE; they space the sections of code out by tabs instead of newlines. They only really work with a language(s) like C/C++/C#/Java; anything that basically closes a line of code with some sort of character (e.g. ';', etc.). Link to comment Share on other sites More sharing options...
lexkymbeth Posted November 25, 2011 Share Posted November 25, 2011 i ment```This``` Link to comment Share on other sites More sharing options...
Likestodraw Posted November 27, 2011 Share Posted November 27, 2011 Sorry, I have been saying this to everybody lately, but could you put some screenshots of the results? Link to comment Share on other sites More sharing options...
erkro1 Posted November 27, 2011 Share Posted November 27, 2011 @Likestodraw:> Sorry, I have been saying this to everybody lately, but could you put some screenshots of the results?Its just a button which let you log out Link to comment Share on other sites More sharing options...
Robin Posted November 27, 2011 Share Posted November 27, 2011 @Likestodraw:> Sorry, I have been saying this to everybody lately, but could you put some screenshots of the results?You press the button and you go back to the main menu. Why would you need a screenshot for that? Link to comment Share on other sites More sharing options...
Whackeddie99 Posted December 4, 2011 Share Posted December 4, 2011 If the map moral is not safe zone, theres a x at the top right lol. Link to comment Share on other sites More sharing options...
Muffen Posted December 4, 2011 Share Posted December 4, 2011 @Robin:> You press the button and you go back to the main menu. Why would you need a screenshot for that?We need a like button for replys. Cause I would like this.About the button. Yeah I guess it could be useful. It's fairly easy to do though. I'm no programmer but I think I would have been able to figure this out by my own. Link to comment Share on other sites More sharing options...
Whackeddie99 Posted January 1, 2012 Share Posted January 1, 2012 This button requires a few edits to work properly.```Private Sub cmdCancel_Click() If Not picCharacter.Visible Then picCharacter.Visible = True picAlert.Visible = False End IfEnd Sub```delete the If Not code and End If, and the piccharacter.visible = true part. They are unneeded.and please, just change this:```If Map.Moral = 1 Then logoutGame Else AddText "You cannot logout into the battle zone!", BrightRed picCharacter.Visible = True picAlert.Visible = False End If```to this:```If Map.Moral = 1 Then picAlert.Visible = False logoutGame Else AddText "You cannot logout in a PvP area!", BrightRed picAlert.Visible = False End If```If you don't, this box will not close when you logout, so if you relog in, it will be there still. Also, you don't need picCharacter to be visible.d Sub Link to comment Share on other sites More sharing options...
handsomenicor Posted January 12, 2012 Share Posted January 12, 2012 Can I just make a button and change name into cmdLogout and change caption Log Out double-click it and add this code.Private Sub cmdLogout_Click() frmMain.Visible = True Unload meEnd SubIs that Ok? Link to comment Share on other sites More sharing options...
erkro1 Posted January 12, 2012 Share Posted January 12, 2012 Nvm, @Joyce:> No, because that will not ACTUALLY close down the connection. You're still connected, and the client still thinks you're in-game. You just hide your game screen. Link to comment Share on other sites More sharing options...
Joyce Posted January 12, 2012 Share Posted January 12, 2012 No, because that will not ACTUALLY close down the connection. You're still connected, and the client still thinks you're in-game. You just hide your game screen. Link to comment Share on other sites More sharing options...
erkro1 Posted January 12, 2012 Share Posted January 12, 2012 Use this instead:```Private Sub cmdLogout_Click() logoutgame frmMain.Visible = True Unload meEnd Sub``` Link to comment Share on other sites More sharing options...
handsomenicor Posted January 14, 2012 Share Posted January 14, 2012 Ok tnx!!! Link to comment Share on other sites More sharing options...
Ryochi Posted March 13, 2012 Share Posted March 13, 2012 this tutorial is useless. When you click the red "X" it takes you back to the main menu. Why go through all that trouble when it is already there. And on top of that u messed up your clients or servers for nothing. Link to comment Share on other sites More sharing options...
waseemk Posted May 9, 2012 Share Posted May 9, 2012 Where do I put this:```picAlert.visible = False``` 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