![]()  | 
 
Unload forms when closing tab | 
 
    Post Reply  
   | 
  
| Author | |
   
   jmvvliet  
   
   Newbie  
   Joined: 03 August 2006 Location: Netherlands Status: Offline Points: 3  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: Unload forms when closing tabPosted: 03 August 2006 at 3:22pm  | 
 
| 
   
    
   Hi all,
 
   
  does anyone know how to unload a form that is hosted in a tab? I've done this to handle the form in the tab: 
tcMain.InsertItem 0, "Users", frmUsers.hWnd, 0 
But when i Remove an item from the tablist, it looks like I'm unable to also unload the form. 
Could anyone help me with that please? 
Thanx in advance 
    | 
 |
| 
   
     
     JMvV
     
   
   | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 03 August 2006 at 3:33pm | 
 
| 
   
    Hi, Add: 
Unload frmUsers 
    | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   jmvvliet  
   
   Newbie  
   Joined: 03 August 2006 Location: Netherlands Status: Offline Points: 3  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 04 August 2006 at 12:27am | 
 
| 
   
    
   Yeah ok, but in what event? I have a 'close' button in the upperright corner of the tab. That fires the NavigateButtonClick (?) event. In that event I want to remove the tab that is currently selected. That is done automatically. Doesn't the tabcontrol have a property like 'HostedObject' or something like that? If not, I'll miss it  
   
   
    | 
 |
| 
   
     
     JMvV
     
   
   | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 04 August 2006 at 9:03am | 
 
| 
   
    
   Hi,
 
   
  yes, NavigateButtonClick is the place. 
In 10.3 we added designer time support for TabControl. Check Toolbox sample orTabManager. It easy than create each page in separate frame and unload them. 
    | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   jmvvliet  
   
   Newbie  
   Joined: 03 August 2006 Location: Netherlands Status: Offline Points: 3  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 07 August 2006 at 2:59am | 
 
| 
   
    
   Ok, but due to the design of my application is set up dynamically, so I need to assign a form handle dynamically to a tab in the tabcontrol. Therefore, I also need to unload the form on the tab I want to close dynamically. It ain't be impossible at the moment...
    
   
   | 
 |
| 
   
     
     JMvV
     
   
   | 
 |
![]()  | 
 |
    Post Reply  
   | 
  |
|       
  
  Tweet   	
    | 
 
| Forum Jump | Forum Permissions  ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum  |