Click here to Skip to main content
15,922,584 members
Home / Discussions / C#
   

C#

 
AnswerRe: Help creating "always-on-top" tool windows? Pin
Mr. Accident11-Sep-06 18:14
Mr. Accident11-Sep-06 18:14 
QuestionStore image in SQL database with specific size Pin
mrkeivan11-Sep-06 15:11
mrkeivan11-Sep-06 15:11 
AnswerRe: Store image in SQL database with specific size Pin
Nader Elshehabi11-Sep-06 19:13
Nader Elshehabi11-Sep-06 19:13 
QuestionTransparency problem! Please help. Pin
Rojan Gh.11-Sep-06 14:20
professionalRojan Gh.11-Sep-06 14:20 
AnswerRe: Transparency problem! Please help. Pin
Nader Elshehabi11-Sep-06 19:04
Nader Elshehabi11-Sep-06 19:04 
GeneralRe: Transparency problem! Please help. Pin
Rojan Gh.11-Sep-06 22:57
professionalRojan Gh.11-Sep-06 22:57 
QuestionMDI child issues [modified] Pin
Alaric_11-Sep-06 12:27
professionalAlaric_11-Sep-06 12:27 
AnswerRe: MDI child issues Pin
Nader Elshehabi11-Sep-06 18:32
Nader Elshehabi11-Sep-06 18:32 
Hello

Well, I didn't want to reply hoping that someone would grap a better idea!! One lousy way of doing it is capturing the mouse by the parent form to prevent the user from further movement:

if(MDIChild.Location.x < MinX)
{
    MDIChild.Location = new Point(MinX, MDIChild.Location.y);
    this.Capture = true;
}
else if(MDIChild.Location.y < MinY)
{
    MDIChild.Location = new Point(MinX, MDIChild.Location.y);
    this.Capture = true;
}


You can put the above code in the parent -if you keep a track of the child forms-, or in the child. The idea is to check the current position, and resetting it if necessary, then capturing the mouse from the child form to stop further moving.

One stupid drawback is that you have to click somewhere before the mouse returns to normal -ie. release the capture-. I didn't figure out a workaround, but I'm sure you can make it.Smile | :)

RegardsRose | [Rose]

GeneralRe: MDI child issues Pin
Alaric_11-Sep-06 18:46
professionalAlaric_11-Sep-06 18:46 
AnswerRe: MDI child issues Pin
Nader Elshehabi11-Sep-06 19:00
Nader Elshehabi11-Sep-06 19:00 
AnswerRe: MDI child issues (update) Pin
Alaric_11-Sep-06 18:55
professionalAlaric_11-Sep-06 18:55 
JokeRe: MDI child issues (update) Pin
Nader Elshehabi11-Sep-06 19:07
Nader Elshehabi11-Sep-06 19:07 
Questionhelp Pin
941549611-Sep-06 10:32
941549611-Sep-06 10:32 
AnswerRe: help Pin
Drew McGhie11-Sep-06 10:43
Drew McGhie11-Sep-06 10:43 
AnswerRe: help Pin
Nader Elshehabi11-Sep-06 10:50
Nader Elshehabi11-Sep-06 10:50 
AnswerRe: help Pin
Professor Sharada Ulhas11-Sep-06 11:10
Professor Sharada Ulhas11-Sep-06 11:10 
GeneralRe: help Pin
led mike11-Sep-06 11:48
led mike11-Sep-06 11:48 
QuestionHaving a small issue with typed dataset Pin
Shriniwasan Viswanathan11-Sep-06 9:29
Shriniwasan Viswanathan11-Sep-06 9:29 
AnswerRe: Having a small issue with typed dataset Pin
gus_br11-Sep-06 11:37
gus_br11-Sep-06 11:37 
QuestionHow to use array list in a recursive function:(pls help) Pin
aynka200011-Sep-06 8:51
aynka200011-Sep-06 8:51 
AnswerRe: How to use array list in a recursive function:(pls help) Pin
Guffa11-Sep-06 8:58
Guffa11-Sep-06 8:58 
AnswerRe: How to use array list in a recursive function:(pls help) Pin
Nader Elshehabi11-Sep-06 9:03
Nader Elshehabi11-Sep-06 9:03 
QuestionHow to create a resizable Windows.Forms.Control object? [modified] Pin
ystl11-Sep-06 8:04
ystl11-Sep-06 8:04 
AnswerRe: How to create a resizable Windows.Forms.Control object? Pin
Nader Elshehabi11-Sep-06 8:21
Nader Elshehabi11-Sep-06 8:21 
GeneralRe: How to create a resizable Windows.Forms.Control object? Pin
ystl14-Sep-06 6:10
ystl14-Sep-06 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.