|
-
Nov 4th, 2009, 05:49 PM
#1
Thread Starter
Addicted Member
Ubuntu type Forms!
Well, I have a couple questions to ask:
I can make my window snap to the side of the screen, but when I move the form, it flickers... The form moves, but moves back to the side of the screen. So I see two 'forms'... One very quickly, but I still see it.
Basically, I use the Form_Move event. So, when the form moves, I just check to see if the sides are out of the sceen's bounds and move the form accordingly.
So the first question would be: How to I get the form to 'snap' to the sides of the screen?
Secondly, if you use the most pleasing settings for the forms in Ubuntu, the form almost becomes fluid, and 'swishes' around when you move it. I'm not quite sure how to describe this effect, but I would like to know how to use the setting in my own application.
VBNetDude - Thinking Programmatically
By Silver Seal Software
Don't forget to mark your thread as "Resolved" using the Thread Tools menu on top. And don't forget to rate the answers that help you the most! 
-
Nov 4th, 2009, 06:39 PM
#2
Re: Ubuntu type Forms!
If you want to keep a form at a fixed place momentarily there's a number of things you can do.
The first thing that comes to mind is not using the Form_Move event. That is fired after you have moved the form, and if you snap it back then, you will indeed see some serious flickering.
Instead you should listen to window messages and react to them accordingly. I'm not really sure which messages you need or how to use them exactly (I think the WndProc override is useful) but I'm sure there's many examples online.
I think you can also remove the Move function from the controlbox menu (the menu that shows when you click the icon in the top left of the caption bar), and then you can no longer move the form. There's an example of that in the codebank somewhere on this forum. I'm not sure if you can set it back to moveable again after that though, which you probably want for a 'docking' form.
For the Ubuntu thingy, that's not a 'setting'. Ubuntu is not windows, and a Windows Forms Project can't use ubuntu stuff. I am pretty sure you will find it more or less impossible to replicate the behavior in windows, except if you are willing to completely custom draw the form, and do some serious calculations / image transformations. That is some serious work and I doubt you'll want to do all that to make your form 'wave'.
-
Nov 4th, 2009, 09:51 PM
#3
Thread Starter
Addicted Member
Re: Ubuntu type Forms!
Thanks for your time, Nick!
As of the 'docking', I hadn't thought about making the form immoveable before. I will report as soon as I have access to a computer.
IF I wanted to redraw the form, (that's kind of what I had in mind) what steps could I take? What would I google for?
VBNetDude - Thinking Programmatically
By Silver Seal Software
Don't forget to mark your thread as "Resolved" using the Thread Tools menu on top. And don't forget to rate the answers that help you the most! 
-
Nov 5th, 2009, 06:13 AM
#4
Re: Ubuntu type Forms!
Well you could just make the form background transparent, hide the caption bar + borders (set FormBorderStyle to None), then draw your own caption bar and borders. You may also be able to use regions, but they would be incredibly complex for a 'smooth' flowing shape. I've never this before so I won't be much help to you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|