I'm trying to run an nunitforms test directly instead of through nunit but I can't get the form to display on the hiddendesktop. Instead its always visible. I haven't overridden UseHidden or DisplayHidden, I can see that the Hidden desktop is being created when I call Init(). I create an instance of the form after calling Init(). Is there some other magic needed to get the form onto the HiddenDesktop?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In Desktop the call to SetThreadDesktop is returning zero. When I print the error by changing it to:
if (Win32.SetThreadDesktop( handle ).Equals(0))
throw new Win32Exception();
It says: 'The requested resource is in use'. I'm running this as a console application and there have been no other forms opened. Maybe some of my earlier crashes are leaving hidden desktops open?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm also having trouble getting my tests to run in a hidden desktop. I don't know if it has to do with the fact that I'm using Resharper, but when I check the UseHidden property it says false. I tried overriding it to return true, but even though it now says true my tests are still not running hidden.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to run an nunitforms test directly instead of through nunit but I can't get the form to display on the hiddendesktop. Instead its always visible. I haven't overridden UseHidden or DisplayHidden, I can see that the Hidden desktop is being created when I call Init(). I create an instance of the form after calling Init(). Is there some other magic needed to get the form onto the HiddenDesktop?
In Desktop the call to SetThreadDesktop is returning zero. When I print the error by changing it to:
if (Win32.SetThreadDesktop( handle ).Equals(0))
throw new Win32Exception();
It says: 'The requested resource is in use'. I'm running this as a console application and there have been no other forms opened. Maybe some of my earlier crashes are leaving hidden desktops open?
Is there a [STAThread] attribute on your main method? That will not work with hidden desktop.
I'm also having trouble getting my tests to run in a hidden desktop. I don't know if it has to do with the fact that I'm using Resharper, but when I check the UseHidden property it says false. I tried overriding it to return true, but even though it now says true my tests are still not running hidden.