473,385 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

collection, kind of MDI

I'm a newbee student at VB.net so bear with me,

is it possible to make a collection from a tabpage inside the
tabcontrol so that I can make a new instance containing all the labels
and textboxes and so on ?
it's about a score board for Yahtzee (yes, this is a school exercise
d;p) that I like to copy for each player

thnx
Nov 20 '05 #1
6 1205
Define how you see the game being played in a little bit more detail. And
then illuminate how you are trying to us the UI to this effect.
Regards - OHM#


chriske wrote:
I'm a newbee student at VB.net so bear with me,

is it possible to make a collection from a tabpage inside the
tabcontrol so that I can make a new instance containing all the labels
and textboxes and so on ?
it's about a score board for Yahtzee (yes, this is a school exercise
d;p) that I like to copy for each player

thnx


Regards - OHM# On**********@BTInternet.com
Nov 20 '05 #2
* chriske <mo*@home.home> scripsit:
I'm a newbee student at VB.net so bear with me,

is it possible to make a collection from a tabpage inside the
tabcontrol so that I can make a new instance containing all the labels
and textboxes and so on ?

it's about a score board for Yahtzee (yes, this is a school exercise
d;p) that I like to copy for each player


Create a UserControl with the controls placed on it and instantiate it
when adding a tabpage. Then add the control to the tabpage
('TabPageX.Controls.Add(...)').

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
"Herfried K. Wagner [MVP]" a écrit
* chriske <mo*@home.home> scripsit:
I'm a newbee student at VB.net so bear with me,

is it possible to make a collection from a tabpage inside the
tabcontrol so that I can make a new instance containing all the labels
and textboxes and so on ?

it's about a score board for Yahtzee (yes, this is a school exercise
d;p) that I like to copy for each player


Create a UserControl with the controls placed on it and instantiate it
when adding a tabpage. Then add the control to the tabpage
('TabPageX.Controls.Add(...)').

I've been looking into this "user control" but it seems to far reached
for what I need
as you can create a form with buttons and textboxes and so on and then
make a new instance in the sub main of the project so would I like to
do this with a tabpage
only the difference is that a tabpage is already inside another
container, the tabcontrol, can I create just the one tabpage and simply
make a copy from the first already containing al the existing controls
but with another name on the tab ?

how I loved the control arrays of VB6, now I seem to have to learn
another way to create several instances of the same object and also
looping through this collection seems unnecessary difficult now

thnx
Nov 20 '05 #4
* chriske <mo*@home.home> scripsit:
only the difference is that a tabpage is already inside another
container, the tabcontrol, can I create just the one tabpage and
simply make a copy from the first already containing al the existing
controls but with another name on the tab ?
I still don't understand. Maybe you want to place the controls directly
on the form (not inside a tabpage), then move them over the tabcontrol
and bring them in the foreground this can be done in the IDE by using
commands from the control's context menu or by calling the control'
'BringToFront' method.
how I loved the control arrays of VB6, now I seem to have to learn
another way to create several instances of the same object and also
looping through this collection seems unnecessary difficult now


Which collection do you want to loop through?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #5
"Herfried K. Wagner [MVP]" a écrit
* chriske <mo*@home.home> scripsit:
only the difference is that a tabpage is already inside another
container, the tabcontrol, can I create just the one tabpage and
simply make a copy from the first already containing al the existing
controls but with another name on the tab ?


I still don't understand. Maybe you want to place the controls directly
on the form (not inside a tabpage), then move them over the tabcontrol
and bring them in the foreground this can be done in the IDE by using
commands from the control's context menu or by calling the control'
'BringToFront' method.

I hardly can't place the same controls over and over again on the main
form or on the same tabpage ? it's about kind of a card holding all the
values of each combination of dices, this has to be displayed
separately for each player

has anyone here heard about the dice game Yahtzee ? :D
how I loved the control arrays of VB6, now I seem to have to learn
another way to create several instances of the same object and also
looping through this collection seems unnecessary difficult now


Which collection do you want to loop through?


this was meant as a general remark, I simply loved how I could make an
array of buttons in VB6 and assign events using their index inside a
select statement, how to do this in VB.Net ?

thnx
Nov 20 '05 #6
* chriske <mo*@home.home> scripsit:
only the difference is that a tabpage is already inside another
container, the tabcontrol, can I create just the one tabpage and
simply make a copy from the first already containing al the existing
controls but with another name on the tab ?


I still don't understand. Maybe you want to place the controls directly
on the form (not inside a tabpage), then move them over the tabcontrol
and bring them in the foreground this can be done in the IDE by using
commands from the control's context menu or by calling the control'
'BringToFront' method.

I hardly can't place the same controls over and over again on the main
form or on the same tabpage ? it's about kind of a card holding all
the values of each combination of dices, this has to be displayed
separately for each player


I still don't know what you want to do. Do you want to display the same
data in certain controls regardless of the tab currently selected? Do
you want to "share" certain controls between some tabs?
Which collection do you want to loop through?


this was meant as a general remark, I simply loved how I could make an
array of buttons in VB6 and assign events using their index inside a
select statement, how to do this in VB.Net ?


There is no 1:1 replacement, but this article will describe how to mimic
the behavior in VB.NET:

Creating Control Arrays in Visual Basic .NET and Visual C# .NET
<http://msdn.microsoft.com/library/?url=/library/en-us/dv_vstechart/html/vbtchCreatingControlArraysInVisualBasicNETVisualCN ET.asp>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Vani Murarka | last post by:
Hi Everyone, Does .NET offer any collection class which will give me objects last *accessed* such that I may build a least-recently-used cache that kills off objects that haven't been used for...
34
by: Ville Voipio | last post by:
I would need to make some high-reliability software running on Linux in an embedded system. Performance (or lack of it) is not an issue, reliability is. The piece of software is rather simple,...
8
by: Martin Maat | last post by:
I am puzzled. I have this object that uses a thread. The thread is encapsulated by the object, the object has Start and Stop methods to enable the client to start or stop the thread. I found...
10
by: aa7im | last post by:
I have a similiar thread going about this topic but I decided to break it off into a seperate discussion. Question: What is the best way to determine if an object "IsNew" to a collection? ...
4
by: Benjamin Piorczig | last post by:
Hello list memebers, I'd like to use a C# Collection with from within Visual Basic 6. I have derived a my ComInterface class from IList and implemented those Members. Everything seems to work...
3
by: ad | last post by:
Hi, When I studied CSharp, I am confuse by IList, Collection and Array. What is the relationships between them?
13
by: Scott Meddows | last post by:
I'm writing an NT service to provide security information enterprise wide. I would like to have all of this information cached memory if a previous request loaded it into memory. Then using a...
8
by: mike2036 | last post by:
For some reason it appears that garbage collection is releasing an object that I'm still using. The object is declared in a module and instantiated within a class that is in turn instantiated by...
18
by: Jerry Boone | last post by:
I'm looking for a way to fire a public sub/function when a form is opened and closed - without using form level events. I have already done some extensive form work with instancing, looping...
28
by: Goalie_Ca | last post by:
I have been reading (or at least googling) about the potential addition of optional garbage collection to C++0x. There are numerous myths and whatnot with very little detailed information. Will...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.