473,385 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Making a form resizable with FormBorderStyle = None?

Hi,
I've really been struggling with this. How do I make a form resizable
with FormBorderStyle = None? I've had problems trying to get the form
to start resizing by following the mouse position(after the mouse is
at the edge of the form and starts to move out of the form with the
mouse button down)

Any ideas anybody? There's got to be an easier and more effective way
right?

Thank you for your time
Nov 16 '05 #1
4 6350
Not an elegant workaround, but...

How about a transparent border?

-Converger
On 6/10/04 7:24 AM, in article sh********************************@4ax.com,
"harrylmh" <mi******@hotpop.com> wrote:
Hi,
I've really been struggling with this. How do I make a form resizable
with FormBorderStyle = None? I've had problems trying to get the form
to start resizing by following the mouse position(after the mouse is
at the edge of the form and starts to move out of the form with the
mouse button down)

Any ideas anybody? There's got to be an easier and more effective way
right?

Thank you for your time


Nov 16 '05 #2
You need to override WndProc and listen for the message WM_NCHITTEST

(I'd advise you to look up WM_NCHITTEST on MSDN)

And depending on where the cursor is, you can return HTLEFT, HTRIGHT,
HTBOTTOMLEFT, etc.

HTH

-vJ

"harrylmh" <mi******@hotpop.com> wrote in message
news:sh********************************@4ax.com...
Hi,
I've really been struggling with this. How do I make a form resizable
with FormBorderStyle = None? I've had problems trying to get the form
to start resizing by following the mouse position(after the mouse is
at the edge of the form and starts to move out of the form with the
mouse button down)

Any ideas anybody? There's got to be an easier and more effective way
right?

Thank you for your time

Nov 16 '05 #3
How do I do that? any pointers?

On Thu, 10 Jun 2004 08:03:13 -0700, Kevin Bell
<ke*******@converger.com> wrote:
Not an elegant workaround, but...

How about a transparent border?

-Converger
On 6/10/04 7:24 AM, in article sh********************************@4ax.com,
"harrylmh" <mi******@hotpop.com> wrote:
Hi,
I've really been struggling with this. How do I make a form resizable
with FormBorderStyle = None? I've had problems trying to get the form
to start resizing by following the mouse position(after the mouse is
at the edge of the form and starts to move out of the form with the
mouse button down)

Any ideas anybody? There's got to be an easier and more effective way
right?

Thank you for your time


Nov 16 '05 #4
Hi, harryImh

If you want to resort to this you have to monitor non-client messages for
mouse in form WndProc and maybe PreProcessMessage. See WM_NC messages in
Platform SDK. You will need to emulate resizing behavior using such as
WM_NCHITTEST, WM_NCPAINT, WM_NCMOUSEMOVE and other.

I am not sure it is worth the effort.

HTH
Alex

"harrylmh" <mi******@hotpop.com> wrote in message
news:85********************************@4ax.com...
How do I do that? any pointers?

On Thu, 10 Jun 2004 08:03:13 -0700, Kevin Bell
<ke*******@converger.com> wrote:
Not an elegant workaround, but...

How about a transparent border?

-Converger
On 6/10/04 7:24 AM, in article sh********************************@4ax.com,"harrylmh" <mi******@hotpop.com> wrote:
Hi,
I've really been struggling with this. How do I make a form resizable
with FormBorderStyle = None? I've had problems trying to get the form
to start resizing by following the mouse position(after the mouse is
at the edge of the form and starts to move out of the form with the
mouse button down)

Any ideas anybody? There's got to be an easier and more effective way
right?

Thank you for your time

Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: trint | last post by:
Ok, I received info that this will work as a means of removing the border around a window that I create (which also loads an aspx file) in the firing file (aspx using javascript): OpenWindow =...
3
by: Dean Slindee | last post by:
Anybody have a source for .NET code to zoom a form from a dot to full size? Probably passe since form opaque, but I may have a good use for it. Thanks in advance, Dean Slindee
3
by: Xwire | last post by:
Can anyone explain why when i set the .ClientSize of a form, and then check the .ClientSize when the resize event fires, it is slightly off, generally 20(varys) pixels in the height but not...
4
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps...
1
by: Ricardo Furtado | last post by:
in my app i must have several pictureboxes over the others. Some pictureboxes just have a couple of lines or rectangles, and absolutly nothing more but the image is an .BMP. So, my problem is that...
1
by: Jason Huang | last post by:
Hi, How do I limit MyWinForm so it can't neither movable nor resizable? Thanks for help. Jason
5
by: Mark Ingram | last post by:
Hi, ive got a form with FormBorderStyle set to None (i am using custom regions to determine the shape of the form). But i would like to be able to display the standard system menu when the user...
9
by: mohit.akl | last post by:
Hey guys & gals I am havng trouble modifying the control box. I want to make the maximise button invisible and have minimisise button instead of it. Like this _ X (not like _ o X ) How...
8
by: =?Utf-8?B?bGpsZXZlbmQy?= | last post by:
I want to create a custom form border. By thought was to simply override the DisplayRectangle property in order to control the border width and then draw the border during the OnPaint event. The...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.