Register | Login | |||||
Main
| Memberlist
| Active users
| ACS
| Commons
| Calendar
| Online users Ranks | FAQ | Color Chart | Photo album | IRC Chat |
| |
0 user currently in Programming. | 3 guests |
Acmlm's Board - I2 Archive - Programming - An interesting problem; keeping track of tabs and arrays. [Visual Basic 6] | | | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
User | Post | ||
Jesper Busy, busy, busy. Level: 69 Posts: 23/2390 EXP: 2856000 For next: 13743 Since: 03-15-04 From: Sweden. Since last post: 176 days Last activity: 79 days |
| ||
So! I got this instant messaging program I made going. What's cool about it is that you just open it up on two computers in the same network and they will appear in a list automatically. No connection setups, no servers, no firewalls to worry about. Anyway, that's not what I needed help with. As this will allow a few people to be online simultaneously, like AIM or ICQ, I'll want you to be able to chat with multiple people at the same time. But, as the topic says, I'm writing this in Visual Basic 6, so I can't create multiple windows from a template (to the best of my knowledge anyway), and thus I'll have to do it in one window with a couple of tabs. I've got the generating tabs stuff working, but I'm going to need some help with wiring down the infrastructure for keeping track of the convo IDs and tab IDs. Right now everything's ruled by the tab index numbers (I -think- this is the only way to do array keys in VB) and so I'll need a few lines of code to make it able to remove a tab anywhere in the array (and subtract the whole bunch of controls at the same time). Any takers? |
|||
HyperLamer <||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people Sesshomaru Tamaranian Level: 118 Posts: 18/8210 EXP: 18171887 For next: 211027 Since: 03-15-04 From: Canada, w00t! LOL FAD Since last post: 2 hours Last activity: 2 hours |
| ||
I could never get tabs working, I had to use a listbox. | |||
Sokarhacd Ball and Chain Trooper Resistance is Futile You Will Be Assimilated Hab SoSlI' Quch Level: 61 Posts: 50/1757 EXP: 1799888 For next: 76708 Since: 03-15-04 Since last post: 6 days Last activity: 4 hours |
| ||
there is other tabs that automatically work, but then if the other person doesnt have the ocx then they need it, if you wanna know which just ask and ill tell you | |||
Tuvai Permanently banned for account hacking. Level: 24 Posts: 27/211 EXP: 74894 For next: 3231 Since: 03-15-04 Since last post: 566 days Last activity: 339 days |
| ||
Originally posted by Chaosflare there is other tabs that automatically work, but then if the other person doesnt have the ocx then they need it That's what setting References and using Package & Deployment wizard is for. |
|||
Jesper Busy, busy, busy. Level: 69 Posts: 25/2390 EXP: 2856000 For next: 13743 Since: 03-15-04 From: Sweden. Since last post: 176 days Last activity: 79 days |
| ||
I don't think you get the problem here. I know how to remove a tab, I just want to turn the other tab IDs down a notch when I do remove one, and do the same for the arrays I have going. Anyway, I'm looking into user-defined types and collections. But still, keep it coming. |
|||
dan Snap Dragon Level: 43 Posts: 4/782 EXP: 534516 For next: 30530 Since: 03-15-04 Since last post: 20 hours Last activity: 14 hours |
| ||
When you delete an index from the tab sheet, you could call a For loop that loops from the number of tabs down to the index, subtracting 1 from each tab's index. I don't know if you already tried it, but that seems the most logical solution. | |||
Jesper Busy, busy, busy. Level: 69 Posts: 38/2390 EXP: 2856000 For next: 13743 Since: 03-15-04 From: Sweden. Since last post: 176 days Last activity: 79 days |
| ||
Originally posted by dan When you delete an index from the tab sheet, you could call a For loop that loops from the number of tabs down to the index, subtracting 1 from each tab's index. I don't know if you already tried it, but that seems the most logical solution. That's what I ended up doing... For i = Index + 1 To TabStrip1.Tabs.CountI still have to sync a few variables to the new i but that's just a few more for-loops for those (in some cases) and embedding them in the above loop (in other cases). |
|||
TFG Level: 5 Posts: 1/7 EXP: 452 For next: 77 Since: 03-15-04 Since last post: 269 days Last activity: 265 days |
| ||
Originally posted by Jesper But, as the topic says, I'm writing this in Visual Basic 6, so I can't create multiple windows from a template (to the best of my knowledge anyway), and thus I'll have to do it in one window with a couple of tabs.
|
|||
Mega-Dog Level: 20 Posts: 17/139 EXP: 40051 For next: 2388 Since: 03-15-04 From: Minnesota Since last post: 8 days Last activity: 4 days |
| ||
I did it at 1 time in my NES Database program...I could look in the source and possibly post it...there is a way just to remove the tab and then I think all of them automaticly move... | |||
Jesper Busy, busy, busy. Level: 69 Posts: 45/2390 EXP: 2856000 For next: 13743 Since: 03-15-04 From: Sweden. Since last post: 176 days Last activity: 79 days |
| ||
Originally posted by TFGI know how to create new instances (how do you think I duplicate the controls inside?) but I'm just not sure if it's gonna work with forms, since I don't think they have the Index property.Originally posted by Jesper (edited by Jesper on 03-16-04 04:26 PM) |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
Acmlm's Board - I2 Archive - Programming - An interesting problem; keeping track of tabs and arrays. [Visual Basic 6] | | | |