Page 1 of 1

form move with mouse

Posted: Tue Feb 09, 2016 4:57 am
by Eplerro
Product, version and build: PowerShell Studio 2015
32 or 64 bit version of product: 64bit
Operating system: Windows 7 Enterprise
32 or 64 bit OS: 64bit

Hello,
I have a form that has "formborderstyle" set to NONE. How to make that it can be moved with the mouse around the screen.

Janusz Biel

Re: form move with mouse

Posted: Tue Feb 09, 2016 8:21 am
by davidc
[POST MOVED TO THE POWERSHELL GUI FORUM BY MODERATOR]

The Form movement is handled by the Window's frame, there for if you want to move the form you will have to implement the code using the MouseMove event or create some C# code to interface with the Windows API.

Please refer to the following link:

http://stackoverflow.com/questions/1592 ... rm-movable

David

Re: form move with mouse

Posted: Tue Feb 09, 2016 9:42 pm
by Eplerro
Thank you for having responded to my question.

Janusz Biel

Re: form move with mouse

Posted: Fri Feb 12, 2016 3:23 pm
by jvierra
The attached psf file will demo how to make any form or control moveable via mouse capture.

Re: form move with mouse

Posted: Sun Feb 21, 2016 11:32 pm
by Eplerro
You are Great. Very, very thanks.

Re: form move with mouse

Posted: Sun Mar 06, 2016 4:56 pm
by rmckay9969
jvierra wrote:The attached psf file will demo how to make any form or control moveable via mouse capture.
Very cool stuff there, your examples never fail to amaze me.

Re: form move with mouse

Posted: Sun Mar 06, 2016 5:13 pm
by jvierra
rmckay9969 wrote:
jvierra wrote:The attached psf file will demo how to make any form or control moveable via mouse capture.
Very cool stuff there, your examples never fail to amaze me.
Thank you. My good friend, Gandalf,taught me well.

On the serious side ... a good book on the Windows Forms will do wonders:

Exhibit 'A' - http://www.amazon.com/Professional-Wind ... 1861005547
Exhibit 'B' - http://www.amazon.com/Programming-Micro ... 0735621535

Re: form move with mouse

Posted: Sun Mar 06, 2016 8:26 pm
by rmckay9969
jvierra wrote:
rmckay9969 wrote:
jvierra wrote:The attached psf file will demo how to make any form or control moveable via mouse capture.
Very cool stuff there, your examples never fail to amaze me.
Thank you. My good friend, Gandalf,taught me well.

On the serious side ... a good book on the Windows Forms will do wonders:

Exhibit 'A' - http://www.amazon.com/Professional-Wind ... 1861005547
Exhibit 'B' - http://www.amazon.com/Programming-Micro ... 0735621535
Well, I was not disappointed with the last bit of reading advice you gave me. I will check these suggestions out as well.