Print Page | Close Window

Multiple events invoked in TabControl

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=4170
Printed Date: 17 November 2024 at 7:39am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Multiple events invoked in TabControl
Posted By: Toma
Subject: Multiple events invoked in TabControl
Date Posted: 08 May 2006 at 12:20pm

Hi !

I have used tabcontrol  of codejock, and I used usercontrol for every tab page of the tab contorl. I saw that when the form with tabcontrol is loaded, the load event of the forms that are used from the tabpages are invoked twice !?!?!

The constructor of the form is executed only one time, but the form_load event is invoked twice...This with vb.net (2005)...

And another thing -  I saw that one event DobuleClick in DataGridView in usercontrol that is used in tabpage is invoked 3 times, when i only one time double clicked on datagridview...

Where is the problem ?




Replies:
Posted By: Oleg
Date Posted: 09 May 2006 at 10:21am
Hello,
You must first add control to TabControl.Controls collection:

See code:

  Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim uc As New UserControl1
    AxTabControl1.Controls.Add(uc)
    AxTabControl1.InsertItem(0, "Item", uc.Handle.ToInt32(), -1)
  End Sub


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net