-
Feb 17th, 2009, 12:20 AM
#1
Thread Starter
PowerPoster
-
Feb 17th, 2009, 12:52 PM
#2
Re: Tabless Tab Control
Very nice control, it was the basis for my Wizard interface.
I have been toying around with it some more to create interfaces such as the examples you posted (in a single usercontrol) but haven't managed it properly so far. I do have a codebank submission here that basically creates the firefox settings window for you, but it uses a 'dirty workaround' which uses a Tabcontrol during Design time.
-
Feb 19th, 2009, 12:16 AM
#3
Thread Starter
PowerPoster
Re: Tabless Tab Control
Originally Posted by NickThissen
I have been toying around with it some more to create interfaces such as the examples you posted (in a single usercontrol) but haven't managed it properly so far.
Hey.. thanks to appreciate but you have not told me the problem you are having to design the screen like mine.
-
Feb 19th, 2009, 12:25 AM
#4
Banned
Re: Tabless Tab Control
Hi. a blind programming student, and will paste some array exercises that i need help finding. and suing arrays, structures. tried looking on the net, but could not seem to find any thing. so would like your help where i could find sample vb dot net 2005 vb programs. so will paste the project descriptions below. contact me via e-mail off list. cheers Marvin. {Email Removed}. 8.1 Array of a structure. Create a project to analyze an income survey. The
statistics for each home include an identification code, the number of
members in the household, the yearly income, and the state of residence.
A menu will contain File, Reports, and Help. The File menu will contain
Enter Data and Exit. As the data are entered, they should be assigned from
the text boxes to the elements of a structure.
The reports for the project will be sent to the printer and include the
following:
(a) A four-column report displaying the input data.
(b) A listing of the identification number and income for each household
that exceeds the average income.
(c) The percentage of households having incomes below the poverty level.
Test Data
Poverty Guidelines for 2004:
Family Size 48 Contiguous States Alaska Hawaii
1 9310 11630 10700
2 12490 15610 14360
3 15670 19590 18020
4 18850 23570 21680
5 22030 27550 25340
6 25210 35510 32660
7 28390 35510 32660
8 31570 39490 36320
For each additional 3180 3980 3660
person add
bra6215X_ch08.qxd 3/24/05 8:13 AM Page 348
348 V I S U A L B A S I C Arrays
ID Number Number of Persons Annual Income Residence
2497 2 32500 Nevada
3323 5 23000 Illinois
4521 4 38210 Arizona
6789 2 38000 Maine
5476 1 26000 North
Dakota
4423 3 16400 California
6587 4 25000 Alaska
3221 4 20500 Hawaii
5555 2 18000 Alaska
0085 3 19700 Hawaii
3097 8 30000 Washington
4480 5 23400 Florida
0265 2 19700 Texas
8901 3 13000 Michigan
Section Price
Orchestra 40.00
Mezzanine 27.50
General 15.00
Balcony 10.00
8.2 Two-dimensional table. Modify Programming Exercise 8.1 to assign the
data to a multidimensional array rather than use an array of a structure.
8.3 Create a project to keep track of concert ticket sales by your club. Ticket
prices are based on the seating location. Your program should calculate
the price for each sale, accumulate the total number of tickets sold in
each section, display the ticket price schedule, and print a summary of all
sales.
The form should contain a list box of the sections for seating.
Do not allow the user to receive an exception for subscript out-of-
range.
bra6215X_ch08.qxd 3/24/05 8:13 AM Page 349
C H A P T E R 8 349
8.4 Array of a structure. Create a project that will allow a user to look up state
names and their two-letter abbreviations. The user will have the options to
Look up the Abbreviation or Look up the State Name. In the event that a match
cannot be found for the input, display an appropriate error message.
Use radio buttons with a shared event procedure and a Select Case
to determine which text box (state name or abbreviation) should have the
focus and which should be set to ReadOnly.
Data
AL Alabama
MT Montana
AK Alaska
NE Nebraska
AS American Samoa
NV Nevada
AZ Arizona
NH New Hampshire
AR Arkansas
NJ New Jersey
CA California
NM New Mexico
CO Colorado
NY New York
CT Connecticut NC North Carolina
DE Delaware
ND North Dakota
DC District of Columbia
OH Ohio
FL Florida OK Oklahoma
GA Georgia
OR Oregon
GU Guam
PA Pennsylvania
HI Hawaii PR Puerto Rico
ID Idaho RI Rhode Island
IL Illinois SC South Carolina
IN Indiana SD South Dakota
IA Iowa TN Tennessee
KS Kansas TX Texas
KY Kentucky
TT Trust Territories
LA Louisiana UT Utah
ME Maine
VT Vermont
MD Maryland
VA Virginia
MA Massachusetts
VI Virgin Islands
MI Michigan WA Washington
MN Minnesota
WV West Virginia
MS Mississippi
WI Wisconsin
MO Missouri
WY Wyoming
bra6215X_ch08.qxd 3/24/05 8:13 AM Page 350
350 V I S U A L B A S I C Arrays
8.5 Two-dimensional table. Create a project that looks up the driving distance
between two cities. Use two drop-down lists that contain the names of the
cities. Label one list “Departure” and the other “Destination”. Use a Look
Up button to calculate the distance.
Store the distances in a two-dimensional table.
8.6 Two-dimensional table. Create a project in which the user will complete a
10-question survey. Create a form containing labels with each of the
questions and a group of radio buttons for each question with the follow-
ing responses: Always, Usually, Sometimes, Seldom, and Never.
Use a two-dimensional array to accumulate the number of each re-
sponse for each question.
Have a menu or button option that will print an item analysis on the
printer that shows the question number and the count for each response.
Sample of partial output:
Las Los New Washington
Boston Chicago Dallas Vegas Angeles Miami Orleans Toronto Vancouver DC
Boston 0 1004 1753 2752 3017 1520 1507 609 3155 448
Chicago 1004 0 921 1780 2048 1397 919 515 2176 709
Dallas 1753 921 0 1230 1399 1343 517 1435 2234 1307
Las Vegas 2752 1780 1230 0 272 2570 1732 2251 1322 2420
Los Angeles 3017 2048 1399 272 0 2716 1858 2523 1278 2646
Miami 1520 1397 1343 2570 2716 0 860 1494 3447 1057
New Orleans 1507 919 517 1732 1858 860 0 1307 2734 1099
Toronto 609 515 1435 2251 2523 1494 1307 0 2820 571
Vancouver 3155 2176 2234 1322 1278 3447 2734 2820 0 2887
Washington DC 448 709 1307 2420 2646 1057 1099 571 2887 0
Question Always Usually Sometimes Seldom Never
1 5 2 10 4 6
2 2 2 10 2 1
3 17 0 10 0 0
bra6215X_ch08.qxd 3/24/05 8:13 AM Page 351
C H A P T E R 8 351
Create a project that will calculate shipping charges
from a two-dimensional table of rates. The rate de-
pends on the weight of the package and the zone to
which it will be shipped. The Weight column specifies
the maximum weight for that rate. All weights over 10
pounds use the last row.
Case Studies
VB Mail Order
Zone
Weight A B C D
1 1.00 1.50 1.65 1.85
3 1.58 2.00 2.40 3.05
5 1.71 2.52 3.10 4.00
10 2.04 3.12 4.00 5.01
>10 2.52 3.75 5.10 7.25
VB Auto Center
VB Auto sells its own brand of spark plugs. To cross-
reference to major brands, it keeps a table of equiva-
lent part numbers. VB Auto wants to computerize the
process of looking up part numbers in order to im-
prove its customer service.
The user should be able to enter the part number
and brand and look up the corresponding VB Auto
part number. You may allow the user to select the
brand (Brand A, Brand C, or Brand X) from a list or
from radio buttons.
You can choose from two approaches for the look-
up table. Store the part numbers either in a two-
dimensional table or in an array of a structure. In either
case, use the part number and brand entered by the
user; look up and display the VB Auto part number.
VB Auto Brand A Brand C Brand X
PR214 MR43T RBL8 14K22
PR223 R43 RJ6 14K24
PR224 R43N RN4 14K30
PR246 R46N RN8 14K32
PR247 R46TS RBL17Y 14K33
PR248 R46TX RBL12-6 14K35
PR324 S46 J11 14K38
PR326 SR46E XEJ8 14K40
PR444 47L H12 14K44
bra6215X_ch08.qxd 4/8/05 12:32 PM Page 352
352 V I S U A L B A S I C Arrays
Video Bonanza
Create a project that displays the aisle number of a
movie category in a label. The movie categories will be
in a list box. Store the aisle numbers and categories in
an array.
A Search button should locate the correct location
from the array and display it in a label. Make sure that
the user has selected a category from the list and use
the list box SelectedIndex property to find the appro-
priate aisle number.
Table Data
Aisle 1 Comedy
Aisle 2 Drama
Aisle 3 Action
Aisle 4 Sci-Fi
Aisle 5 Horror
Back Wall New Releases
Very Very Boards
Modify your project from Chapter 6 to keep track of
each order in an array. You can then print out the en-
tire order with detail lines for each type of shirt. Con-
vert the event handling for the radio buttons to share
an event procedure. Use a Case structure for selec-
tion.
Create an array of a structure, which holds the
quantity, size, monogram (Boolean), pocket (Boolean),
price, and extended price for each type of shirt or-
dered. As each shirt type is added to an order, store
the information in the array. Add a menu option to
print out the order, which will have the customer name
and order number at the top, and one line for each
shirt type ordered. Use the following layout as a rough
guide for your list. Make sure to align the numeric
columns correctly. For the two Boolean fields (Mono-
gram and Pocket), print Yes or No. Do not allow the
user to print an invoice until the order is complete.
Very Very Boards Shirt Orders
By Your Name
Customer name: xxxxxxxxxxxxxxxxxxxxxx
Order Number: xxxxx
Quantity Size Monogram Pocket Price Extended
Each Price
==================================================
xxx xxx xxx xxx xx x,xxx
Order Total: xx,xxx
-
Feb 19th, 2009, 03:39 AM
#5
Thread Starter
PowerPoster
Re: Tabless Tab Control
This thread is dedicated only to Tabless Tab Control. Please ask your question here so that more people can help you.
-
Mar 10th, 2009, 07:09 PM
#6
Re: Tabless Tab Control
Got any idea on how to achieve the looks of that 2nd image?
-
Mar 11th, 2009, 04:26 AM
#7
Re: Tabless Tab Control
Custom drawn buttons maybe? On a custom drawn panel or just a background image to get the 'slope' at the bottom.
-
Mar 11th, 2009, 11:32 PM
#8
Thread Starter
PowerPoster
-
Mar 12th, 2009, 07:48 PM
#9
Re: Tabless Tab Control
Thanks, will try to expand on that one. Anyone here who happen to know the name of that control? I am trying to search if there are already custom controls out there that mimics that but I am at lost of the keyword.
-
Jun 13th, 2009, 02:36 AM
#10
Hyperactive Member
Re: Tabless Tab Control
How do i fix this tabless control? I have added a reference to System.Design, what to do now?
-
Jun 14th, 2009, 10:27 PM
#11
Thread Starter
PowerPoster
Re: Tabless Tab Control
Originally Posted by Cyb3rH4Xter
How do i fix this tabless control? I have added a reference to System.Design, what to do now?
Press CRTL+SHIFT+B to build the control. Once the control is compiled, it becomes available in Toolbox at the top for use.
-
Jul 29th, 2009, 08:53 AM
#12
New Member
Re: Tabless Tab Control
I am having trouble seeing this Panel Manager Component pop-up in the Toolbox even after I "Press CRTL+SHIFT+B". Do I need to compile it in a new control project or can I simply add the class to an existing project?
-
Jul 29th, 2009, 10:38 AM
#13
Re: Tabless Tab Control
Can should be able to add it to an existing project without any trouble. Where there no Build errors, did the Build succeed?
-
Jul 29th, 2009, 04:10 PM
#14
New Member
Re: Tabless Tab Control
Sorry, I am somewhat of a newbie with this IDE but this would be the perfect solution to what I have in mind. I have tried to use panels and it is an awful mess when you have 20 to 30 panels to manage in the same client area.
Unfortunately, yes, I got several warnings and the class did not show up in the Toolbox.
Warning 1 'Public Overrides Sub OnSetComponentDefaults()' is obsolete: 'This method has been deprecated. Use InitializeNewComponent instead. http://go.microsoft.com/fwlink/?linkid=14202'. C:\Documents and Settings\tnickelsen\My Documents\Development\PDCC\TreeView Plan Test\TreeView Plan Test\PanelManager.vb 394 13 Plan Browser
Warning 2 Unable to apply publish properties for item "microsoft.office.tools.common.v9.0". Plan Browser
Warning 3 Unable to apply publish properties for item "microsoft.office.tools.v9.0". Plan Browser
Warning 4 Unable to apply publish properties for item "microsoft.visualstudio.tools.applications.hosting.v9.0". Plan Browser
Warning 5 Unable to apply publish properties for item "microsoft.visualstudio.tools.applications.runtime.v9.0". Plan Browser
Warning 6 Unable to apply publish properties for item "microsoft.visualstudio.tools.applications.serverdocument.v9.0". Plan Browser
-
Jul 29th, 2009, 04:30 PM
#15
Re: Tabless Tab Control
There's a difference between warnings and errors. An error is critical; your code cannot compile with errors. You can compile your code with warnings, but you are usually advised to fix them first. Warnings should not stop the project from compiling. After you Build, does it say Build succeeded in the lower left corner of the IDE?
How did you add the class to your project?
The first warning is merely due to the fact that the code uses an old method that got a newer version in an update. It shouldn't matter too much I think, and in this case I'm sure it is not the cause of your problem; I've used the exact same code succesfully. If you do want to fix the warning, all you need to do is find the 'OnSetComponentsDefault' method, and rename it to 'InitializeNewComponent'.
The other warnings seem unrelated. Do you get them without this control too?
-
Jul 29th, 2009, 08:04 PM
#16
New Member
Re: Tabless Tab Control
Wow!
I fixed the warnings and voila, the Panel Manager works!
This is great. Thanks so much for all your hard work.
-
Aug 5th, 2009, 11:07 PM
#17
New Member
Re: Tabless Tab Control
There are some problems with the way that child controls are displayed on the designer. For example, when you put a button control on the lower right of a managed panel and anchor it: Bottom Right, then run the app and resize it, the button repositions as expected. However, when you stop the app and go back to the designer, the button disappears from the managed panel. You can find the button in the Properties listbox and after some maneuvering, move it back in position, but this is a real hassle and not the way I would expect a control to work. In a regular panel, the button would maintain its position in the designer regardless of the positioning during runtime with this type of anchor.
Last edited by tlnickelsen; Aug 6th, 2009 at 09:22 PM.
-
Feb 16th, 2010, 07:23 AM
#18
New Member
Re: Tabless Tab Control
It seems that the initial calculations for placement using anchors is done before the managed panel has been sized. I've found the following solution. Add the this to ManagedPanel class:
Code:
protected override void OnLayout(LayoutEventArgs levent)
{
if (Parent!=null) base.OnLayout(levent);
}
-
Feb 16th, 2010, 09:00 AM
#19
Re: Tabless Tab Control
Originally Posted by jensrodi
It seems that the initial calculations for placement using anchors is done before the managed panel has been sized. I've found the following solution. Add the this to ManagedPanel class:
Code:
protected override void OnLayout(LayoutEventArgs levent)
{
if (Parent!=null) base.OnLayout(levent);
}
..... and converted to vb.net since that what language this codebank thread is in:
Code:
Protected Overrides Sub OnLayout(ByVal e As LayoutEventArgs)
If Parent IsNot Nothing Then MyBase.OnLayout(e)
End Sub
-
Feb 16th, 2010, 09:36 AM
#20
New Member
Re: Tabless Tab Control
Sorry about that. I have no experience in VB, only C# and just tried to help others with the same problem.
-
Feb 16th, 2010, 10:21 AM
#21
Re: Tabless Tab Control
Originally Posted by jensrodi
Sorry about that. I have no experience in VB, only C# and just tried to help others with the same problem.
That's not a problem, there's a lot of people here fluent in both languages, however I figured since the thread is in the vb codebank, then it should be converted to vb for those who don't know both languages. So I converted it.
-
Mar 19th, 2010, 12:30 PM
#22
Fanatic Member
Re: Tabless Tab Control
2 questions
how do you add a reference?
How do you add controls to each individual tab like you would do normnally so they toggle with what is selected
-
Apr 19th, 2012, 08:44 AM
#23
Fanatic Member
Re: Tabless Tab Control
2 years later...
I found this in the code bank, and if its what i think it is, i NEEEEED this! I have a form with 15 panels on it, and i have to keep them shrunk and moved out of the way of eachother.. Its a horrible situation, but this could do it! Here's my problem; Project > Add Reference > .NET tab > No System.Design.dll is there? Just for s.... and giggles, i checked the other tabs and its not there.. Searched my comp and found the file here:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Design.dll along with an xml file of the same name...
Any ideas what to do? Once I add the vb file to my project, i have 28 errors and 1 warning... I'm using VB2010
-
Apr 19th, 2012, 09:36 AM
#24
Re: Tabless Tab Control
Originally Posted by kayleigh
2 questions
how do you add a reference?
How do you add controls to each individual tab like you would do normnally so they toggle with what is selected
Go to the project's properties (in solution explorer right click the project name and select properties), then on the reference tab on the left & click the Add, it's on the .Net tab. If you're using VS2010 and targetting the 4.0 FW, it will not show until you change the target FW from the 4.0 Client Profile to the full 4.0 FW. To do that click the Compile tab and click the 'Advanced Compile Options' button, change the FW and VS will prompt to re-load the project. Then add the System.Design reference as described above.
Originally Posted by PMad
2 years later...
I found this in the code bank, and if its what i think it is, i NEEEEED this! I have a form with 15 panels on it, and i have to keep them shrunk and moved out of the way of eachother.. Its a horrible situation, but this could do it! Here's my problem; Project > Add Reference > .NET tab > No System.Design.dll is there? Just for s.... and giggles, i checked the other tabs and its not there.. Searched my comp and found the file here:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Design.dll along with an xml file of the same name...
Any ideas what to do? Once I add the vb file to my project, i have 28 errors and 1 warning... I'm using VB2010
On the compile tab of the project's properties click the 'Advanced Compile Options' button, change the Target FW from "4.0 Client Profile" to just "Framework 4", after VS has reloaded the project go to the References tab and add System.Design
I don't know why MS didn't include System.Design in the Client Profile FW, but I've noticed that even if I target the full blown 4.0 FW and I reference the System.Design dll only from it, my app still runs on computers that only have the 4.0 Client Profile installed, so most of the time you wont actually require end users to install the full FW, the client profile will be fine. But be sure to test your apps on a machine that only has the client profile installed first!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|