Click here to Skip to main content
15,868,016 members
Home / Discussions / C#
   

C#

 
QuestionRpc Server Unavailable in Excel Com Object Pin
sakthi dasan8-Aug-07 3:49
sakthi dasan8-Aug-07 3:49 
AnswerRe: Rpc Server Unavailable in Excel Com Object Pin
- Pascal -8-Aug-07 18:27
- Pascal -8-Aug-07 18:27 
GeneralRe: Rpc Server Unavailable in Excel Com Object Pin
sakthi dasan8-Aug-07 23:15
sakthi dasan8-Aug-07 23:15 
Questionqueue of string arrays syntax Pin
Lord_Veralix8-Aug-07 3:43
Lord_Veralix8-Aug-07 3:43 
AnswerRe: queue of string arrays syntax Pin
Hessam Jalali8-Aug-07 4:02
Hessam Jalali8-Aug-07 4:02 
GeneralRe: queue of string arrays syntax Pin
Lord_Veralix8-Aug-07 4:07
Lord_Veralix8-Aug-07 4:07 
QuestionDataGridView multi-column sort on bound data Pin
Dana Tov8-Aug-07 3:38
Dana Tov8-Aug-07 3:38 
QuestionForm.Show() and TabControl tab page changed Pin
C-Scharbe8-Aug-07 3:25
C-Scharbe8-Aug-07 3:25 
I have the following problem
-I created a form with an tab control
-I the tab control contains (minimum) 2 tab pages
-In the second (non selected) tab page i have a control
-And there is another formular (irrelevant content)

<br />
            #region PREPERATION<br />
            // instanciate a form<br />
            Form f = new Form();<br />
            // instanciate a tab control<br />
            TabControl t = new TabControl();<br />
            <br />
            // instanciate tab page 1<br />
            TabPage tp1 = new TabPage("page1");<br />
            // instanciate tab page 2<br />
            TabPage tp2 = new TabPage("page2");<br />
<br />
            // instanciate a control (sample: button)<br />
            Button b = new Button();<br />
            b.Size = new Size(100, 20);<br />
            <br />
            // add the control to the tab page<br />
            tp2.Controls.Add(b);<br />
<br />
            // add the tab pages<br />
            t.TabPages.Add(tp1);<br />
            t.TabPages.Add(tp2);<br />
<br />
            // add the tabcontrol<br />
            this.Controls.Add(t);<br />
            t.BringToFront();<br />
            #endregion PREPERATION<br />


When i first open the child-form with Show() and then select the tab page with the control the parent-form is focused again.

// show the form<br />
      f.Show();<br />
      // select the tab with the control<br />
      t.SelectedIndex = 1;


How can i force the child-form to keep its focus, while the parent change the tab page?
I don't want to use ShowDialog() or Show(this).
Is this a bug or a feature of the tab control (tab page)?

(Is the only way to fix it, changing the order of the source code?)
AnswerRe: Form.Show() and TabControl tab page changed Pin
snorkie8-Aug-07 3:34
professionalsnorkie8-Aug-07 3:34 
GeneralRe: Form.Show() and TabControl tab page changed Pin
C-Scharbe8-Aug-07 3:39
C-Scharbe8-Aug-07 3:39 
GeneralRe: Form.Show() and TabControl tab page changed Pin
C-Scharbe9-Aug-07 2:49
C-Scharbe9-Aug-07 2:49 
QuestionHow to generate Random dates in C#.net Pin
Haj8-Aug-07 3:04
Haj8-Aug-07 3:04 
AnswerRe: How to generate Random dates in C#.net Pin
originSH8-Aug-07 3:20
originSH8-Aug-07 3:20 
AnswerRe: How to generate Random dates in C#.net Pin
Hessam Jalali8-Aug-07 3:25
Hessam Jalali8-Aug-07 3:25 
AnswerRe: How to generate Random dates in C#.net Pin
Michael Potter8-Aug-07 4:44
Michael Potter8-Aug-07 4:44 
QuestionHow can I load a chm file in a form? Pin
Zahrashahla8-Aug-07 2:51
Zahrashahla8-Aug-07 2:51 
AnswerRe: How can I load a chm file in a form? Pin
sakthi dasan8-Aug-07 3:52
sakthi dasan8-Aug-07 3:52 
GeneralRe: How can I load a chm file in a form? Pin
Zahrashahla8-Aug-07 4:05
Zahrashahla8-Aug-07 4:05 
AnswerRe: How can I load a chm file in a form? Pin
PIEBALDconsult8-Aug-07 5:40
mvePIEBALDconsult8-Aug-07 5:40 
QuestionSmart Part and User controls Pin
umashankergr88-Aug-07 2:40
umashankergr88-Aug-07 2:40 
QuestionListview ploblem? Pin
abcomp018-Aug-07 2:35
abcomp018-Aug-07 2:35 
AnswerRe: Listview ploblem? Pin
Hessam Jalali8-Aug-07 3:14
Hessam Jalali8-Aug-07 3:14 
GeneralRe: Listview ploblem? Pin
abcomp018-Aug-07 3:41
abcomp018-Aug-07 3:41 
GeneralRe: Listview ploblem? Pin
Hessam Jalali8-Aug-07 4:00
Hessam Jalali8-Aug-07 4:00 
Questionmouse posistion on a control when drag and dropped onto Pin
racing578-Aug-07 2:34
racing578-Aug-07 2:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.