Print Page | Close Window

Tabbed MDI and controls created in run-time

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=7028
Printed Date: 18 June 2025 at 9:20pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Tabbed MDI and controls created in run-time
Posted By: chvs
Subject: Tabbed MDI and controls created in run-time
Date Posted: 02 May 2007 at 10:43am
I open a form (form A), then create controls in run-time (like textbox),

If i click on tab to go on another form (form B),
when i return to form A, the controls created in run-time is invisible.

How i can resolve this?






Replies:
Posted By: Oleg
Date Posted: 02 May 2007 at 12:41pm
Hello,
 
Show code you use to create controls.


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


Posted By: chvs
Date Posted: 02 May 2007 at 12:47pm
In form load.
 
 
    qtEtapas = rs.RecordCount
    For i = 1 To qtEtapas - 1 
        Load txtMed(i)
        txtMed(i).Left = txtMed(i - 1).Left + txtMed(i - 1).Width + 200
        txtMed(i).Visible = True
    Next i


Posted By: Oleg
Date Posted: 02 May 2007 at 1:13pm
Hi,
 
It works for me.
 
In our MDI sample I inserted
 
Option Explicit
Public fMain As frmMain

Private Sub Form_Load()
Dim i As Long
  For i = 1 To 5
        Load txtMed(i)
        txtMed(i).Left = txtMed(i - 1).Left + txtMed(i - 1).Width + 200
        txtMed(i).Visible = True
    Next i
End Sub
 
and don't see any problems.
 
Please attach sample project that show error.


-------------
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