Click here to Skip to main content
15,911,476 members
Home / Discussions / C#
   

C#

 
AnswerRe: iterating dictionaries Pin
Daniel Grunwald10-May-08 5:11
Daniel Grunwald10-May-08 5:11 
GeneralRe: iterating dictionaries Pin
invictus310-May-08 5:15
invictus310-May-08 5:15 
GeneralRe: iterating dictionaries Pin
invictus310-May-08 5:54
invictus310-May-08 5:54 
Questionlistbox_indexchanged read from MySQL Pin
Privilegue9-May-08 8:24
Privilegue9-May-08 8:24 
AnswerRe: listbox_indexchanged read from MySQL Pin
CodingYoshi9-May-08 11:33
CodingYoshi9-May-08 11:33 
QuestionWeird focus problem Pin
kensai9-May-08 3:34
kensai9-May-08 3:34 
AnswerRe: Weird focus problem Pin
CodingYoshi9-May-08 11:35
CodingYoshi9-May-08 11:35 
GeneralRe: Weird focus problem Pin
kensai10-May-08 2:50
kensai10-May-08 2:50 
Thanks CodingYoshi. Here's the code I could think of maybe relevant to this. I don't know what else to paste.

Main parent form and how it opens mdi child form:
this.mdiChildForm = new MdiChildForm();<br />
mdiChildForm.MdiParent = this;<br />
mdiChildForm.Size = CalculateAvailableClientSize();<br />
mdiChildForm.Show();<br />
mdiChildForm.Start(i.Size);<br />
mdiChildForm.Location = new Point(0, 0);


Load event of mdi form which has usercontrol in it:
private void MDIChildForm_Load(object sender, EventArgs e)<br />
{<br />
     this.userControl = new UserControl();<br />
     userControl.Location = new Point(0, this.toolStrip.Height);<br />
<br />
     this.Controls.Add(this.userControl);<br />
}


Start function
<br />
internal void Start(Size size)<br />
{<br />
     this.userControl.Size = new Size(size.Width / Settings.Ratio, size.Height / Settings.Ratio);<br />
     this.userControl.DrawBackgroundImage(this.imageFile);<br />
     this.toolStrip.Focus(); //added to make toolstrip visible when first loaded. if not it starts with usercontrol focused, hence the problem<br />
}<br />


There're no more events in both parent form and mdi form. UserControl has mouse down/up/move and paint events but they only has drawing functions like Graphics.DrawImage and Graphics.DrawRectangle and such. Also this problem is happening even when I don't click on the usercontrol but on the toolbar, form titlebar etc..

I'm completely confused over this D'Oh! | :doh:
GeneralRe: Weird focus problem Pin
CodingYoshi10-May-08 9:41
CodingYoshi10-May-08 9:41 
GeneralRe: Weird focus problem Pin
kensai10-May-08 12:53
kensai10-May-08 12:53 
AnswerRe: Weird focus problem Pin
Dave Sexton10-May-08 0:30
Dave Sexton10-May-08 0:30 
GeneralRe: Weird focus problem Pin
kensai10-May-08 2:35
kensai10-May-08 2:35 
QuestionI need help starting multiple and communicating between application domains [modified] Pin
Togakangaroo9-May-08 3:15
Togakangaroo9-May-08 3:15 
AnswerRe: I need help starting multiple and communicating between application domains Pin
CodingYoshi9-May-08 11:44
CodingYoshi9-May-08 11:44 
GeneralRe: I need help starting multiple and communicating between application domains Pin
Togakangaroo9-May-08 14:37
Togakangaroo9-May-08 14:37 
GeneralRe: I need help starting multiple and communicating between application domains Pin
CodingYoshi9-May-08 17:10
CodingYoshi9-May-08 17:10 
GeneralRe: I need help starting multiple and communicating between application domains Pin
Togakangaroo10-May-08 8:44
Togakangaroo10-May-08 8:44 
GeneralRe: I need help starting multiple and communicating between application domains Pin
CodingYoshi10-May-08 9:45
CodingYoshi10-May-08 9:45 
QuestionBinding WebService to DataSet Pin
Aggressor9-May-08 2:26
Aggressor9-May-08 2:26 
AnswerRe: Binding WebService to DataSet Pin
CodingYoshi9-May-08 11:49
CodingYoshi9-May-08 11:49 
QuestionRemoving the parent node in an xml document Pin
dangquoctrang9-May-08 1:29
dangquoctrang9-May-08 1:29 
AnswerRe: Removing the parent node in an xml document [modified] Pin
webtips9-May-08 4:12
webtips9-May-08 4:12 
QuestionKeeping constant strings Pin
N a v a n e e t h9-May-08 1:04
N a v a n e e t h9-May-08 1:04 
AnswerRe: Keeping constant strings Pin
Christian Graus9-May-08 1:08
protectorChristian Graus9-May-08 1:08 
GeneralRe: Keeping constant strings Pin
N a v a n e e t h9-May-08 1:15
N a v a n e e t h9-May-08 1:15 

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.