473,699 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Tab control - Changing Page

553 Contributor
I have a Tab control on my form.

Can anyone guide me how to wirte a little code to switch from one page to another.

We can easily click on Page 1, Page, and so on but i need to create a button on each page to move to the next page.

Can anyone help

Thanks
Jul 7 '07 #1
11 6245
Robbie
180 New Member
I have a Tab control on my form.

Can anyone guide me how to wirte a little code to switch from one page to another.

We can easily click on Page 1, Page, and so on but i need to create a button on each page to move to the next page.

Can anyone help

Thanks
Just played around and that found this works for the TabStrip control:
Expand|Select|Wrap|Line Numbers
  1. Dim WantedIndex As Integer
  2.     WantedIndex = TabStrip.SelectedItem.Index
  3. 'Add 1 or subtract 1 from WantedIndex to go forward or behind by one...
  4.     TabStrip.Tabs(WantedIndex).Selected=True
  5.  
You'll then need to call the event which deals with stuff when a user clicks on a tab, because otherwise only the selected tab will change but the visible objects won't.
Jul 7 '07 #2
questionit
553 Contributor
Hi

Thanks

But my compiler gives me error on these:

SelectedItem
Tabs
These methods dont seems to be available in my version of VB.

Any idea why i get "no Sub or Function not defind" error ?


Just played around and that found this works for the TabStrip control:
Expand|Select|Wrap|Line Numbers
  1. Dim WantedIndex As Integer
  2.     WantedIndex = TabStrip.SelectedItem.Index
  3. 'Add 1 or subtract 1 from WantedIndex to go forward or behind by one...
  4.     TabStrip.Tabs(WantedIndex).Selected=True
  5.  
You'll then need to call the event which deals with stuff when a user clicks on a tab, because otherwise only the selected tab will change but the visible objects won't.
Jul 7 '07 #3
Robbie
180 New Member
Hi

Thanks

But my compiler gives me error on these:

SelectedItem
Tabs
These methods dont seems to be available in my version of VB.

Any idea why i get "no Sub or Function not defind" error ?
It says sub/function not defined because of Tabs(WantedInde x). It thinks I'm talking about a sub or a function, which we haven't yet made. I'm actually talking about the array Tabs() which should be part of the TabStrip, but it seems that array doesn't exist either, so...

- What version of VB are you using?
and
- When you click on the tabs object, in the form designer, in ther properties box, does it say "OptionsTab TabStrip"?
(Replacing OptionsTab with whatever you named it)
Or does it not say TabStrip?

Because, I'm using the TabStrip control in VB6.

If it says SSTab, that's the Microsoft Tabbed Dialog Control. That is much easier to set the selected tab of:

Expand|Select|Wrap|Line Numbers
  1. YourTabObject.tab = YourObject.tab + 1
  2. '(or -1 to go back by one tab)
  3.  
Jul 7 '07 #4
questionit
553 Contributor
I have VB 6.3

There is nothing called TabStrip at all.
Here, VB calls is Tab Control instead

and there is nothing like SSTab

Could you figure out the problem now?


It says sub/function not defined because of Tabs(WantedInde x). It thinks I'm talking about a sub or a function, which we haven't yet made. I'm actually talking about the array Tabs() which should be part of the TabStrip, but it seems that array doesn't exist either, so...

- What version of VB are you using?
and
- When you click on the tabs object, in the form designer, in ther properties box, does it say "OptionsTab TabStrip"?
(Replacing OptionsTab with whatever you named it)
Or does it not say TabStrip?

Because, I'm using the TabStrip control in VB6.

If it says SSTab, that's the Microsoft Tabbed Dialog Control. That is much easier to set the selected tab of:

Expand|Select|Wrap|Line Numbers
  1. YourTabObject.tab = YourObject.tab + 1
  2. '(or -1 to go back by one tab)
  3.  
Jul 7 '07 #5
Robbie
180 New Member
I have VB 6.3

There is nothing called TabStrip at all.
Here, VB calls is Tab Control instead

and there is nothing like SSTab

Could you figure out the problem now?
Either I don't have one of the controls in Components which you have (the tab control), or I do and I can't see it when I look for it. >_<

Can you please go to Project -> Components, and on the Controls tab, tell me everything which is ticked?
Jul 7 '07 #6
questionit
553 Contributor
I dont see Project menu.

I think probably i did not mention to you that i am using Ms Access Form and VB at back-end.




Either I don't have one of the controls in Components which you have (the tab control), or I do and I can't see it when I look for it. >_<

Can you please go to Project -> Components, and on the Controls tab, tell me everything which is ticked?
Jul 7 '07 #7
Robbie
180 New Member
I dont see Project menu.

I think probably i did not mention to you that i am using Ms Access Form and VB at back-end.
Ah, well in that case I'm sorry, I have no idea how to help, or even what is going on, really. >_<
Jul 7 '07 #8
questionit
553 Contributor
Can you help me with my other VBA problem :

I have a module called Stack with some code in it.
I have a Form which has some buttons on it.

When i try to compile the module, i get this error:

A module is not a valid type.

and this line is highlighted :
Dim myStack As Stack

any idea?
Jul 7 '07 #9
Robbie
180 New Member
Can you help me with my other VBA problem :

I have a module called Stack with some code in it.
I have a Form which has some buttons on it.

When i try to compile the module, i get this error:

A module is not a valid type.

and this line is highlighted :
Dim myStack As Stack

any idea?
Nope, because I am really only familiar with VB6, sorry...
Jul 7 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3378
by: Jaweed | last post by:
Hi I'm developing an ASP.NET app in Visual studio (using C# for code behind). My question is fairly simple (i think). When I go to the code behind page, the controls in the html page are made "protected" so that it can only be accessed from within that page. I would like to permanently make this "public" for certain controls, so that I can access them from another page (the page that a user control is embedded into for example). If I...
2
2957
by: Herb Stull | last post by:
I need to be able to change the background color of an ASP.NET page on the fly, in code. I see a bgcolor property on the Document and if I change that it does the job nicely, but I cannot find a way to change this in code... say in the Page_Load event. Any help is much appreciated. Thanks, Herb
1
1723
by: msnews.microsoft.com | last post by:
Calendar Control: Changing the Month Display and Navigation Links http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskCustomizingCalendarWebControlAppearance.asp The above link suggests a "Calendar.MonthNameFormat" that can be used to Specify the format of the name of the month (for example, full name or abbreviation) I can't seem to find the property in the Calandar Control!
2
1565
by: Chris Kettenbach | last post by:
Good Morning, I have a user control I dynamically load in the page_init event into a asp:placeholder control. This page also has another placeholder I would like to dynamically load controls into when the user takes an action on my first dynamically loaded control. Control 1 is a couple of asp:button controls. I am able to tap into their events, but in the code behind, I want the click event of one of the buttons to load another user...
4
1244
by: chuckdfoster | last post by:
Can I change the page title from my ASP.NET code? I know you can from classic ASP. Thanks in advance. -- Chuck Foster Programmer Analyst Eclipsys Corporation - St. Vincent Health System
12
4541
by: GaryDean | last post by:
In the original post I failed so indicate that I am using framework 1.1....... I need to be able to change the background color of a page from code. I found an answer to this question in another forum from Peter Huang that said that an id="bg" as follows... <body MS_POSITIONING="GridLayout" runat="server" id="bg"> then we could do the following in our codebehind file....
3
6430
by: ivanpais | last post by:
Hi, I have a Web User Control, Lets say "Foo.ascx", that contains a button "btnFoo". I have a Master Page "Bar.master", that has a label "lblBar". This label is exposed by a public property BarLabelText. I now have a contentpage "FooBar.aspx", where "Bar.master" is the master page and in the content section has the control "Foo.ascx".
3
2128
by: dcassar | last post by:
I am working on a complex server control that dynamically creates an HtmlInputHidden control that stores its value. As far as the postback process is concerned, this hidden input acts as the control itself. So when I render, I generate a proxy HtmlInputHidden like so: protected virtual void Render(HtmlTextWriter writer) { HtmlInputHidden hiddenInput = new HtmlInputHidden(); hiddenInput.ID = ClientID; hiddenInput.Name = UniqueID;
5
4415
by: charli | last post by:
I have a userform in Access/Excel with a Multipage control on. At the bottom of each multipage is a command button that sends you to the next page. When you click these command buttons, it changes which tab has focus at the top of the control, but the other controls on the multipage don't change, they stay as the old page. code to change page: Multipage1.value = multipage1.value + 1 I've tried putting form.repaint at the bottom, but that...
0
9199
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9054
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8943
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6550
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4391
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3075
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2362
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2016
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.