Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
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
Posted on 03-15-04 10:20 PM Link | Quote
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
Posted on 03-15-04 10:22 PM Link | Quote
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
Posted on 03-15-04 10:39 PM Link | Quote
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
Posted on 03-15-04 10:41 PM Link | Quote
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
Posted on 03-15-04 10:45 PM Link | Quote
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
Posted on 03-16-04 01:39 AM Link | Quote
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
Posted on 03-16-04 02:14 AM Link | Quote
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.Count
TabStrip1.Tabs.Item(i - 1) = TabStrip1.Tabs.Item(i)
Next i
I 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
Posted on 03-16-04 04:46 AM Link | Quote
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.



You can create multiple instances of any object/control/window in Visual Basic like this:

Dim newForm as Form

Set newForm = New Form1
newForm.Show

Each new form will have the same functionality as its base/parent form.

I prefer tabs over multiple windows. Take FireFox as an example

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
Posted on 03-16-04 01:35 PM Link | Quote
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
Posted on 03-17-04 01:25 AM Link | Quote
Originally posted by TFG
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.



You can create multiple instances of any object/control/window in Visual Basic like this:

Dim newForm as Form

Set newForm = New Form1
newForm.Show

Each new form will have the same functionality as its base/parent form.

I prefer tabs over multiple windows. Take FireFox as an example


I 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.


(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] | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.012 seconds.