2. How do you create keyboard shortcuts from within a form (ex. have ctrl +
w close the window)?
See:
[Windows.Forms.FormBorderStyle] | get-member -static
--
greetings
dreeschkind
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
That would be really nice. The other day I wrote little graphing
class to plot some simple parabolas, and had to create some text-box
controls to get the co-efficients and rate into the model. It
would've been easier to hook up the paint handler to a timer, and then
just manipulate the values at the posh prompt and see the results
directly (a little like smalltalk), but I figured it couldn't be done
in posh v1. Hopefully in a later version.
Regards,
Duncan