I have a little utility to show the ADO Data Link Properties dialogue for editing connection strings. I've just moved all the code out of the original WinForms test project into a class library, as my code has nothing to do with any .NET UI, but I've come short with the owner parameter I need to pass to the DataLinks COM object's hWnd property.
My method signature is: static public DialogResult ShowDialog(IWin32Window owner) [1] Then before calling the COM object, I convert the to a handle: dl.hWnd = owner.Handle.ToInt32(); My thing is, I don't like referencing Windows.Forms in this project if I don't really have to. Should I make my owner parameter an int, and document that the caller should pass the Handle.ToInt32 value of the owning Window, or should I just get over it and include Windows.Forms? [1] I also wonder about exposing a ShowDialog method on a class that is technically non-UI. Any suggestions? =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com