emblem Posted July 7, 2010 Author Share Posted July 7, 2010 There's two problems with the original code.The first one is that it sometimes switches directories, the second one is that the value is not restored properly.This code change fixes both of those:**In frmEditor_MapProperties, in sub Form_Load replace this.****Before:**```' find the music we have set If fMusic.ListIndex >= 0 Then fMusic.ListIndex = 0 For i = 1 To fMusic.ListIndex If fMusic.List(i) = Trim$(Map.Music) Then fMusic.ListIndex = i End If Next End If```**After:**```' find the music we have set fMusic.Path = App.Path & MUSIC_PATH fMusic.ListIndex = -1 For i = 1 To fMusic.ListCount - 1 If fMusic.List(i) = Trim$(Map.Music) Then fMusic.ListIndex = i End If Next``` Link to comment Share on other sites More sharing options...
adr990 Posted July 12, 2010 Share Posted July 12, 2010 Thanks Tylian. I remember this propblem was even in EE.Good stuff, keep it up! Link to comment Share on other sites More sharing options...
erkro1 Posted August 4, 2010 Share Posted August 4, 2010 You forget End if at the end :P Link to comment Share on other sites More sharing options...
Robin Posted August 4, 2010 Share Posted August 4, 2010 @erkro1:> You forget End if at the end :PNo he didn't. Link to comment Share on other sites More sharing options...
erkro1 Posted August 4, 2010 Share Posted August 4, 2010 Sorry, i remove too much :P 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