Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / December 2005

Tip: Looking for answers? Try searching our database.

Does .net 2.0 have methods to...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David Thielen - 09 Dec 2005 04:37 GMT
Hi;

These were things I had to call managed code for in .net 1.1. Does .net 2.0
now provide a way to:

1) Create a MessageBox with MB_TOPMOST set?

2) do a Form.SetFormOwner(hwnd);

3) do a Form.SetFormParent(hwnd);

4) A way to find a window (hwnd) with a method called that passes in the
class & window.

Signature

thanks - dave

"Peter Huang" [MSFT] - 09 Dec 2005 06:44 GMT
Hi

In .NET 2.0, the MessageBox has four options as below.
MessageBoxOptions Enumeration
DefaultDesktopOnly The message box is displayed on the active desktop.
This constant is the same as ServiceNotification except that the system
displays the message box only on the default desktop of the interactive
window station.

RightAlign The message box text is right-aligned.  
RtlReading Specifies that the message box text is displayed with right to
left reading order.  
ServiceNotification The message box is displayed on the active desktop.
The caller is a service notifying the user of an event. The function
displays a message box on the current active desktop, even if there is no
user logged on to the computer.

So if you want to get the MB_TOPMOST style, you need to MessageBox API.

From the 2.0 MSDN, we have no such methods, we have the parent property but
it is readonly.
Parent   Gets a reference to the server control's parent control in the
page control hierarchy. (Inherited from Control.)  

Also there are methods AddOwnedForm and RemoveOwnedForm , you may take a
look to see if that helps you.

We have some functions may help to do search windows in 2.0 you have a look.
FindForm  
FromHandle  
FromChildHandle  

Best regards,

Peter Huang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.