473,383 Members | 1,748 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,383 software developers and data experts.

tabcontrol event called at odd time

Hello
I'm curious as to why the following would happen
I have 4 forms that I'm dealing with. On form4 is a tabcontrol (we'll call it tab1)

When form1 is opened, and OK is pressed, form2 opens, when an item is clicked, form3 opens
On form 3 is a menu, and when file, open, and form4 is selected, the tab1_SelectedIndexChanged event is triggered..
I have code in here to deal with when users select different tabs...but why would opening the form trigger it
Obviously I only notice it when I step through the code...is this normal?

Thanks in advance
ambe

Nov 20 '05 #1
1 1012
Hi
hmm yes its normal

try this if you dont want it to triger on load
------------------------------------
Dim isLoad As Boolean = False
Private Sub Form1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Load
isLoad = True
End Sub
Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged
If isLoad = True Then
MsgBox("ok")
End If
End Sub
-----------------------------------

/Jens

"amber" <an*******@discussions.microsoft.com> wrote in message
news:45**********************************@microsof t.com...
Hello,
I'm curious as to why the following would happen.
I have 4 forms that I'm dealing with. On form4 is a tabcontrol (we'll call it tab1).
When form1 is opened, and OK is pressed, form2 opens, when an item is clicked, form3 opens. On form 3 is a menu, and when file, open, and form4 is selected, the tab1_SelectedIndexChanged event is triggered... I have code in here to deal with when users select different tabs...but why would opening the form trigger it? Obviously I only notice it when I step through the code...is this normal??

Thanks in advance,
amber

Nov 20 '05 #2

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

Similar topics

5
by: Tamir Khason | last post by:
How be able to manage more deeply UI of TabControl and TabPage For example - I want to manage border color, change color of TabPage reef, eliminate spaces from both sides of the reef, so I bould...
2
by: Andreas Fredriksson | last post by:
Hello I am using a TabControl wich includes a ListView on each TabPage. On the click event I use the text on each tab to fill the ListView with data. When the user click on a TabPage a use the...
2
by: Francois Vanderseypen | last post by:
Can someone tell me why you cannot drag something onto a tabcontrol with zero tabpages? I have a kind of 'docking' interface and relies heavily on GDI+, a screenshot is available here: ...
1
by: Keith Smith | last post by:
My layout is like this... tabControl1 contains... ....tabControl2 which contains... .......GroupBox1 which contains... ..........comboBox1. At first there was no tabControl2, but when I...
4
by: Rachel Suddeth | last post by:
I would like to write a designer verb for a class I have that inherits from TabControl. I figure the only way to do that without breaking the special designer stuff that works for TabControl would...
4
by: Oenone | last post by:
I'm using a TabControl to facilitate a wizard-style form, using some of the techniques described here: http://www.codeproject.com/cs/miscctrl/WizardTab.asp For the most part I have this...
9
by: Michael Turner | last post by:
Hi Guys Having problem with the tab control, I need to set the background color to something different than the standard, I have found code on the web and now can redraw the tabpage buttons so...
5
by: Alien2_51 | last post by:
I have a problem with a ListBox control that is on a TabControl, it seems to be forgetting which items are selected in the list when I tab off the current tab, here's my winform code... I even...
2
by: Simon Verona | last post by:
I have a few hundred forms in my application. All are based on a custom base form class. I decided that I wanted to globally change the look and feel of many of the controls in my application -...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...

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.