Hi all,

I'd appreciate if somebody could shed some light on the following;

I have a tabbed container, each tab has the same controls but for a different target.

I am using a timer to control when to fire each event from the 5 different tabbed controls, my problem is this.

The event only fires when the focus is on that specific tab.

So when an event on tab2 should fire, if i am looking at tab1 then tab2 event does not fire.

BUT if i am looking at tab2 when the event should fire, then it does happen.

I can't seem to find any information on what exactly i am overlooking.

Cheers,
Carl.

Could you show us your code and what events you are talking about?

Hi,

This is the code that fires a click event on buttons;

If Website1ImpactWhenListBox.Items.Contains(DaySecondsTimer) = DaySecondsTimer.ToString() Then
            Website1overideButton.PerformClick()
        End If
        If Website2ImpactWhenListBox.Items.Contains(DaySecondsTimer) = DaySecondsTimer.ToString() Then
            Website2overideButton.PerformClick()
        End If

Website1overideButton is located onTabPage1
Website2overideButton is located on TabPage2

If you need any further code to assist in your diagnosis please let me know.

Ok i was stupid!

I forgot to focus() on the tab i wanted.

TabPage1.Show()
            TabPage1.Focus()
            Website1overideButton.PerformClick()
            currentTab.Show()
            currentTab.Refresh()

Thank you for your assistance.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.