|  | 
| tabcontrol in modal form will let parent form .. | 
| Post Reply   | 
| Author | |
| progame   Newbie   Joined: 15 July 2004 Location: China Status: Offline Points: 20 |  Post Options  Thanks(0)  Quote  Reply  Topic: tabcontrol in modal form will let parent form .. Posted: 27 September 2006 at 6:30am | 
| 
   Form1
  button_click: showmodal form2 Form2   has tabcontrol, and this control insert one child form as tabitem close form2 form1 can't get focus | |
|  | |
| progame   Newbie   Joined: 15 July 2004 Location: China Status: Offline Points: 20 |  Post Options  Thanks(0)  Quote  Reply  Posted: 27 September 2006 at 6:33am | 
| 
   http://www.progame.org/tabcontrol.rar 
pls download this sample to reproduce bug
    | |
|  | |
| progame   Newbie   Joined: 15 July 2004 Location: China Status: Offline Points: 20 |  Post Options  Thanks(0)  Quote  Reply  Posted: 27 September 2006 at 10:47am | 
| 
   i movei "nsertitem" to form_activate method, it's ok when form1 show as modaless, 
 but if form1 showmodal, and call form2 modal,  when close form2, form1 can get focus, but it have a flash. tabcontrol brings too many troubles to us.  | |
|  | |
| Oleg   Senior Member   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |  Post Options  Thanks(0)  Quote  Reply  Posted: 27 September 2006 at 11:01am | 
| 
   Hi,
 It is VB thing :( Please instead Forms for TabControl use PictureBoxes on form. In 10.3 we added Design time feature for TabControl - you will be able add controls/tabs in design time ajdn switch them. | |
| 
     Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS | |
|  | |
| progame   Newbie   Joined: 15 July 2004 Location: China Status: Offline Points: 20 |  Post Options  Thanks(0)  Quote  Reply  Posted: 27 September 2006 at 11:11am | 
| 
   but i must use form instead of picturebox, because that can make us seperate function to difference forms, and those child forms can be reusable, if use picturebox, we can't do it.
 | |
|  | |
| gaudetm   Senior Member     Joined: 23 September 2006 Location: Canada Status: Offline Points: 134 |  Post Options  Thanks(0)  Quote  Reply  Posted: 27 September 2006 at 5:20pm | 
| yes you can use picturebox and use a empty form for when you need it in a form and in the form_load event add api function setparent for the picturebox on the other form 
 | |
|  | |
| Oleg   Senior Member   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |  Post Options  Thanks(0)  Quote  Reply  Posted: 28 September 2006 at 9:03am | 
| 
   Hi,
 If you want separate each tab in oun file - create usercontrol for each tab instead form. | |
| 
     Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS | |
|  | |
| progame   Newbie   Joined: 15 July 2004 Location: China Status: Offline Points: 20 |  Post Options  Thanks(0)  Quote  Reply  Posted: 29 September 2006 at 9:13am | 
| 
   although usercontrol  is also container, but it has many shortcoming. form can easily traverse controls, set font... 
 but usercontrol must wrapper so many properties, otherwise can't visit it's child controls. | |
|  | |
| 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 |