On Aug 11, 4:32 pm, dreeschkind
<dreeschk...@discussions.microsoft.com> wrote:
> $form.FormBorderStyle = [Windows.Forms.FormBorderStyle]::SizableToolWindow
>
> See:
> [Windows.Forms.FormBorderStyle] | get-member -static
>
> --
> greetings
> dreeschkind
>
>
>
> "Luke" wrote:
> > Another question: how do you create a window with thin title bars (ex.
> >http://www.mathcs.richmond.edu/~caud...mathscreen.jpg. Notice
> > the titlebar with the smaller "x" for the close button on the palette to the
> > right.)
>
> > "Luke" wrote:
>
> > > 1. Is it possible to create a new window with system.windows.form while
> > > allowing the script to continue operations? If so, how?
>
> > > 2. How do you create keyboard shortcuts from within a form (ex. have ctrl +
> > > w close the window)?- Hide quoted text -
>
> - Show quoted text -
To answer 1:
in short, no. In the longer term, I'm thinking hard about how to solve
this one and have a few tricks up the old sleeve. The problem stems
from Windows Forms components requiring the same thread that created
them be the same on to service them. Each time you run a command in
posh, you end up with a different thread from a pool running your
pipeline. If you're on the wrong thread to manipulate the forms
object, the object's InvokeRequired property will return $true. This
means you are effectively screwed from this point onwards.
- Oisin