Click here to Skip to main content
15,913,055 members
Home / Discussions / C#
   

C#

 
GeneralRe: ShowDialog() issue Pin
Harvey Saayman15-Feb-08 2:12
Harvey Saayman15-Feb-08 2:12 
GeneralRe: ShowDialog() issue Pin
darkelv15-Feb-08 2:29
darkelv15-Feb-08 2:29 
GeneralRe: ShowDialog() issue Pin
Harvey Saayman15-Feb-08 2:32
Harvey Saayman15-Feb-08 2:32 
GeneralRe: ShowDialog() issue [modified] Pin
DaveyM6915-Feb-08 2:43
professionalDaveyM6915-Feb-08 2:43 
GeneralRe: ShowDialog() issue Pin
Harvey Saayman15-Feb-08 3:24
Harvey Saayman15-Feb-08 3:24 
GeneralRe: ShowDialog() issue Pin
Matt12315-Feb-08 11:58
Matt12315-Feb-08 11:58 
GeneralRe: ShowDialog() issue Pin
DaveyM6919-Feb-08 11:43
professionalDaveyM6919-Feb-08 11:43 
GeneralRe: ShowDialog() issue Pin
Harvey Saayman19-Feb-08 21:51
Harvey Saayman19-Feb-08 21:51 
Hey dave

Thanx again for that article, ive alredy implemented it in my app!!

i came across a strange bug tho, or maybe im just missing something

there is a difference between your demo and my app. i have FrmMain which is my mdiContainer, on that i have a menuStripItem "users", it shows FrmUsers (this is basicly a list of all the users registered for that application - this is not the dialog). On FrmUsers i have btnAddUser which shows FrmAdduser(this is the dialog window where i implemented your code).

so with your initial code the dialog window was confined within the rectangle of FrmUser which isnt even an mdiContainer, but the problem was FrmAddUser often is bigger than FrmUser (this depends on how many users are registered cuz FrmUser Resizes itself depending on how many rows in the DataGridView).

in an atempt to rectify this i did the following in FrmUsers...

foreach (Control thisControl in this.MdiParent.Controls)
{
    if (thisControl is MdiClient)
    {
        //i left this as is
    }
}


this is where i found the bug, the rectangle that FrmAddUser is restricted to is in the wrong place! The X axis point is correct but the Y axis point is too low. in other words the rectangle is about 100 pixels(rough guess) below FrmMain

any idea sa to why this happens?

i could e-mail you a demo of this problem if it will help

thanx

Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)

GeneralRe: ShowDialog() issue Solved Pin
DaveyM6919-Feb-08 23:11
professionalDaveyM6919-Feb-08 23:11 
GeneralRe: ShowDialog() issue Pin
darkelv15-Feb-08 2:37
darkelv15-Feb-08 2:37 
GeneralRe: ShowDialog() issue Pin
Harvey Saayman15-Feb-08 3:22
Harvey Saayman15-Feb-08 3:22 
GeneralProblem to Dial a number from COM port in C#.Net Pin
lgauri15-Feb-08 1:49
lgauri15-Feb-08 1:49 
GeneralRe: Problem to Dial a number from COM port in C#.Net Pin
DaveyM6915-Feb-08 2:14
professionalDaveyM6915-Feb-08 2:14 
GeneralRe: Problem to Dial a number from COM port in C#.Net Pin
Manoj Kumar Rai15-Feb-08 3:14
professionalManoj Kumar Rai15-Feb-08 3:14 
Generalreduce precision Pin
Xmen Real 15-Feb-08 1:21
professional Xmen Real 15-Feb-08 1:21 
GeneralRe: reduce precision Pin
phannon8615-Feb-08 1:30
professionalphannon8615-Feb-08 1:30 
GeneralRe: reduce precision Pin
Xmen Real 15-Feb-08 1:34
professional Xmen Real 15-Feb-08 1:34 
GeneralRe: reduce precision Pin
DaveyM6915-Feb-08 1:41
professionalDaveyM6915-Feb-08 1:41 
GeneralRe: reduce precision Pin
Xmen Real 15-Feb-08 1:48
professional Xmen Real 15-Feb-08 1:48 
GeneralRe: reduce precision Pin
Guffa15-Feb-08 10:33
Guffa15-Feb-08 10:33 
GeneralRe: reduce precision Pin
DaveyM6915-Feb-08 10:50
professionalDaveyM6915-Feb-08 10:50 
GeneralRe: reduce precision Pin
Luc Pattyn15-Feb-08 5:31
sitebuilderLuc Pattyn15-Feb-08 5:31 
GeneralRe: reduce precision Pin
Xmen Real 15-Feb-08 5:36
professional Xmen Real 15-Feb-08 5:36 
GeneralRe: reduce precision Pin
Luc Pattyn15-Feb-08 5:58
sitebuilderLuc Pattyn15-Feb-08 5:58 
GeneralRe: reduce precision Pin
Xmen Real 15-Feb-08 6:10
professional Xmen Real 15-Feb-08 6:10 

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.