Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - Closing Tabs on Tabcontrol
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Closing Tabs on Tabcontrol

 Post Reply Post Reply
Author
Message
nando_uy View Drop Down
Newbie
Newbie


Joined: 26 February 2005
Location: Uruguay
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote nando_uy Quote  Post ReplyReply Direct Link To This Post Topic: Closing Tabs on Tabcontrol
    Posted: 27 October 2008 at 11:12pm

I have a Tabcontrol with no tabs at all. They create at runtime attaching forms at these newly created tabs.

IE:
Private Sub NewReport()
Set pageReport = New frmReport
l_Index = TabControl.ItemCount
Set oTabItem = TabControl.InsertItem(l_Index + 1,"Report", pageReport.hwnd, 0)
TabControl.Item(l_Index).Selected = True
End Sub
 
How can I close /destroy/unload all the instances of pageReports before unload the form?
The app not ended if don't!!!
Or, directly CRASH?
Any help???
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 28 October 2008 at 3:10am
Hi,
Move pageReport  as form variable and in Unload event add
Unload pageReport
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
nando_uy View Drop Down
Newbie
Newbie


Joined: 26 February 2005
Location: Uruguay
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote nando_uy Quote  Post ReplyReply Direct Link To This Post Posted: 28 October 2008 at 5:05am

Can you show me an example?

In your Docking Pane sample folder, there's something like you suggest me. So I can't figure how can I implements this for my specific case, because I haven't an form array.

And, I need to remove all the instances of pageReport
Any Example?
 
Many, many thanks Oleg, you're the man!
Back to Top
Mr.Den View Drop Down
Groupie
Groupie
Avatar

Joined: 26 August 2007
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mr.Den Quote  Post ReplyReply Direct Link To This Post Posted: 31 October 2008 at 8:56pm
Have you tried this in the main form's form_queryunload sub:
 
dim iCtr as integer
 
for iCtr = Forms.count -1 To 0 Step -1
    Unload Forms(iCtr)
Next iCtr
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.