MessageBox positioning?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I want to position my MessageBox in the center of the parent form and not in
the center of the entire desktop as seems to be the default.

How would I accomplish that?

Best regards
 
Torben Philippsen said:
I want to position my MessageBox in the center of the parent form and not
in
the center of the entire desktop as seems to be the default.

This can be accomplished using a Win32 dialog hook. I feel sorry, but I
don't have a working .NET sample.
 
Herfried K. Wagner said:
This can be accomplished using a Win32 dialog hook. I feel sorry, but I
don't have a working .NET sample.


Thank you for the quick reply!

Could please go into a little more details on using the win32 dialog hook.
I've never heard about that before. What should I look for?

Best regards Torben
 
Hi,

I have the same question. Do you have sample codes that I can follow?

I looked at the article for windows hooks and tried to get it to work
without much luck.

Sample codes will be really helpful.

Thanks.

Stoitcho Goutsev (100) said:
Hi Torben,

There are wonderfull article hou-to-hook-messagbe box in MSDN. The author,
Dino Esposito it is not for positioning per se, but with a liitle change of
the code it can be done, I believe.

For the article follow the link below
http://msdn.microsoft.com/msdnmag/issues/02/11/cuttingedge/

The next is another article from the same author talking about windos hooks
and .NET
http://msdn.microsoft.com/msdnmag/issues/02/10/CuttingEdge/

--
HTH
Stoitcho Goutsev (100) [C# MVP]


Torben Jensen said:
"Herfried K. Wagner [MVP]" <[email protected]> skrev i en
meddelelse



Thank you for the quick reply!

Could please go into a little more details on using the win32 dialog hook.
I've never heard about that before. What should I look for?

Best regards Torben
 
Hi David,
I don't have such a sample myself, but the articles I gave you have pretty
good working samples.


--
Stoitcho Goutsev (100) [C# MVP]

David Shen said:
Hi,

I have the same question. Do you have sample codes that I can follow?

I looked at the article for windows hooks and tried to get it to work
without much luck.

Sample codes will be really helpful.

Thanks.

Stoitcho Goutsev (100) said:
Hi Torben,

There are wonderfull article hou-to-hook-messagbe box in MSDN. The
author,
Dino Esposito it is not for positioning per se, but with a liitle change
of
the code it can be done, I believe.

For the article follow the link below
http://msdn.microsoft.com/msdnmag/issues/02/11/cuttingedge/

The next is another article from the same author talking about windos
hooks
and .NET
http://msdn.microsoft.com/msdnmag/issues/02/10/CuttingEdge/

--
HTH
Stoitcho Goutsev (100) [C# MVP]


Torben Jensen said:
"Herfried K. Wagner [MVP]" <[email protected]> skrev i en
meddelelse
This can be accomplished using a Win32 dialog hook. I feel sorry, but
I
don't have a working .NET sample.


Thank you for the quick reply!

Could please go into a little more details on using the win32 dialog
hook.
I've never heard about that before. What should I look for?

Best regards Torben
 
Back
Top