The online racing simulator
LFS Setup Manager (needs some VB6 pointers)
The `Setup Manager` was an idea I had quite a while back and was reminded of it by Ian.Hs replay manager. So I've decided to give it a bash and see if I could make it work because I need something to sort my setups folder out... What a mess



So far I've got it moving individual setups back and forth. It also moves folders of setups in one go as well. My problem is now I don't know how to use the MultiSelect function of the FileListBox. I've googled around and haven't really found anything that explains it well.

What I want to be able to do is select multiple setups from the left `FileListBox` so they can all be copied in one go without the user having to select them individually. Where I'm stuck is finding out which ones are actually selected, all I have managed to get is the last selected one.

If anyone is wandering where I plan to go with this then here's a little list
  • Remember the last bulk of setups copied to LFS folder so you can restore them all to the manager at a click of a button. So say you copy your Aston sets folder but now need your Fern Bay ones, you can restore them to save your Aston ones getting mixed with your FE ones.
  • I also thought of maybe making it so you can leave a comment in the Manager for each setup and a little description for each folder.
  • Using InSim so you could type something like $sets [folder_name] and it would move the sets in that folder to LFS. To save the hassle of having to minimize LFS everytime you need a new bunch of sets. Although this one, I'm not so sure of as I have no idea on how to construct packets in VB6.
Thanks
Keiran
If I remember correctly, FileListBox returns an array of selected items, soooo;

Dim i
For i = 0 To FileListBox1.ListCount - 1
If FileListBoxList1.Selected(i) Then
Debug.Print FileListBox1.List(i)
End If
Next

the Debug.Print FileListBox1.List(i) should print out every file you have selected

Edit: As a little digression, the word "pointer(s)" and VB6 should never be read together after you've had a marathon C session It only serves to confuse!
#3 - Ian.H
Hi Keiran..

Cool to see you attacking this project

I haven't used VB in donkeys.. but if it's anything like C++, you'll need to access them as an "array". For me, this would be something like:

ListBox->Selected[i]

If I was looping through, this would look something like:

for (int i = 0; i < ListBox->Items->Count; i++) {
if (ListBox->Selected[i]) {
// This item is selected, do something with it here...
}
}

VB maybe nothing like this, so apologies if this just ends up as confusion, but hopefully if nothing else, will give an idea on what sort of things to look for



Regards,

Ian
Quote from the_angry_angel :If I remember correctly, FileListBox returns an array of selected items, soooo;

Dim i
For i = 0 To FileListBox1.ListCount - 1
If FileListBoxList1.Selected(i) = True Then
Debug.Print FileListBox1.List(i)
End If
Next

the Debug.Print FileListBox1.List(i) should print out every file you have selected

Thats it, thanks Didn't realise it retured an array of selected items.
PNG > JPEG
this post isn't all caps
/OT
Quote from keiran :
  • Using InSim so you could type something like $sets [folder_name] and it would move the sets in that folder to LFS. To save the hassle of having to minimize LFS everytime you need a new bunch of sets. Although this one, I'm not so sure of as I have no idea on how to construct packets in VB6.


That's a really good idea!

InSim is not that complicated really. I'm just learning to use it myself for the next version of my LFSPoints program. I am finding it a bit fiddly though, dealing with all those packets and bytes.

FGED GREDG RDFGDR GSFDG