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

C#

 
GeneralRe: Creating forms on different threads Pin
kourvoisier11-Nov-05 3:45
kourvoisier11-Nov-05 3:45 
GeneralRe: Creating forms on different threads Pin
kourvoisier11-Nov-05 8:54
kourvoisier11-Nov-05 8:54 
GeneralRe: Creating forms on different threads Pin
Curtis Schlak.14-Nov-05 4:04
Curtis Schlak.14-Nov-05 4:04 
GeneralRe: Creating forms on different threads EVEN BETTER Pin
Curtis Schlak.14-Nov-05 4:42
Curtis Schlak.14-Nov-05 4:42 
GeneralRe: Creating forms on different threads EVEN BETTER Pin
kourvoisier14-Nov-05 5:16
kourvoisier14-Nov-05 5:16 
GeneralRe: Creating forms on different threads EVEN BETTER Pin
Curtis Schlak.14-Nov-05 5:51
Curtis Schlak.14-Nov-05 5:51 
GeneralRe: Creating forms on different threads EVEN BETTER Pin
kourvoisier14-Nov-05 12:18
kourvoisier14-Nov-05 12:18 
QuestionSet form's owner to a window outside the application? Pin
MogobuTheFool10-Nov-05 19:45
MogobuTheFool10-Nov-05 19:45 
How can I set a form's owner to be a window outside my application?

I have a form which I want to hover in front of a specific window. The target window is not a form in my application; it is a standard windows window (type "Overlapped.") I have written user32.dll calls to get the target window's handle and position; I position my form in the appropriate place on the screen. However, to ensure that my form stays visibly in front of the target window, I have had to set it to be Always in Front.

This is a kludge, because the form is also in front of any other windows I may open, which is inappropriate. I only want my form to stay in front of the target window.

I can manually play with the z-order to ensure that my form is front of the target window and no other, but it would be more elegant to set the target window to be the owner of my form's window and let the system deal with the rest.

I understand that the user32.dll function CreateWindowEx can only set the owner of a window at creation time. I can provide the handle when I create the form, but I have been unable to divine a way to provide it. SetParent will allow me to change the parent window, but the new parent must belong to the same application.

.Net allows me to change the owner of a form I create, but only lets me change it to another .Net form; I can not find a way to user the window handle I have.

Any suggestions?
AnswerRe: Set form's owner to a window outside the application? Pin
Dave Kreskowiak11-Nov-05 3:57
mveDave Kreskowiak11-Nov-05 3:57 
GeneralRe: Set form's owner to a window outside the application? Pin
MogobuTheFool7-Jul-06 8:32
MogobuTheFool7-Jul-06 8:32 
GeneralRe: Set form's owner to a window outside the application? Pin
Dave Kreskowiak7-Jul-06 10:16
mveDave Kreskowiak7-Jul-06 10:16 
GeneralRe: Set form's owner to a window outside the application? Pin
MogobuTheFool8-Jul-06 4:18
MogobuTheFool8-Jul-06 4:18 
Questionsetting the date format of the calendar in a datetimepicker Pin
microsoc10-Nov-05 19:28
microsoc10-Nov-05 19:28 
AnswerRe: setting the date format of the calendar in a datetimepicker Pin
krario10-Nov-05 20:07
krario10-Nov-05 20:07 
GeneralRe: setting the date format of the calendar in a datetimepicker Pin
microsoc10-Nov-05 20:20
microsoc10-Nov-05 20:20 
QuestionStatic and Dynaminc Assemblies ? Pin
webC#10-Nov-05 19:08
webC#10-Nov-05 19:08 
AnswerRe: Static and Dynaminc Assemblies ? Pin
J4amieC10-Nov-05 21:51
J4amieC10-Nov-05 21:51 
QuestionData Encryption in MySql Pin
Prashant Gadhave10-Nov-05 19:06
Prashant Gadhave10-Nov-05 19:06 
QuestionCapture Voice using DirectSound Pin
pakFari10-Nov-05 18:35
pakFari10-Nov-05 18:35 
Questionsql statement problem Pin
ppp00110-Nov-05 18:32
ppp00110-Nov-05 18:32 
AnswerRe: sql statement problem Pin
jonny511-Nov-05 0:31
jonny511-Nov-05 0:31 
Questionwhat is the complete code for downloading a file using FTP through ASP.NET/C# Pin
v.k.s10-Nov-05 17:26
v.k.s10-Nov-05 17:26 
AnswerRe: what is the complete code for downloading a file using FTP through ASP.NET/C# Pin
Ravi Bhavnani11-Nov-05 5:51
professionalRavi Bhavnani11-Nov-05 5:51 
QuestionC# App Error Pin
nosferatu200010-Nov-05 17:10
nosferatu200010-Nov-05 17:10 
AnswerRe: C# App Error Pin
J4amieC10-Nov-05 21:48
J4amieC10-Nov-05 21:48 

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.