|
-
Oct 10th, 2001, 06:29 PM
#1
Thread Starter
Fanatic Member
How to make a form irregular in shape and style???
Hello Chaps and Chappettes 
I am wanting to customise my gui I know that it is possible to make a form a custom shape and style, however I have no idea of how to go about doing this.
If someone could give me an idea of where to start or of any online resources/tutorials it would be very helpful
Thanks in advance
-
Oct 10th, 2001, 06:30 PM
#2
You can use an application who will create for you the form. I do not remember the name but its an activeX.
-
Oct 10th, 2001, 06:45 PM
#3
Addicted Member
Use SetWindowRgn to do this.
 Stupidity is better than cure.
VB6 SP5 Enterprise Ed.
C, Pascal, VC++ 6.0
Running Win98 SE and Win2000 Prof. Ed.
Email me at : [email protected]
-
Oct 10th, 2001, 06:47 PM
#4
Member
Originally posted by DaoK
You can use an application who will create for you the form. I do not remember the name but its an activeX.
In one of my programs, I used the PolyForm control at http://www.geocities.com/SiliconValley/Haven/2118 to accomplish this task.
-
Oct 10th, 2001, 06:50 PM
#5
-
Oct 10th, 2001, 06:52 PM
#6
Thread Starter
Fanatic Member
Originally Posted by rbnwares
Use SetWindowRgn to do this.
Can you explain this a bit further rbnwares??
thanks filburt1 i will check that app out 
but i would like to do it via code if at all possible
-
Oct 10th, 2001, 06:53 PM
#7
Member
-
Oct 10th, 2001, 06:55 PM
#8
Fanatic Member
I've used this tool for all my weird shaped form needs.... Just go into ms paint, make your desired shape in solid black, overtop the white background, and let this program trace it and come up with a .frm file!
http://www.fortunecity.com/skyscrape...tml?VBSFC.html
kudos to Alex Vallat for making this program it is fantastic!
-
Oct 10th, 2001, 07:01 PM
#9
Addicted Member
Use one of these functions to create a region:
CreateEllipticRgn
CreatePolygonRgn
CreateRectRgn
CreateRoundRectRgn
You can combine the regions created by the functions above to create a hole in the region, use:
CombineRgn
Set the created region to your form, use:
SetWindowRgn
You can code it like this:
PHP Code:
Dim hRgn As Long
hRgn = CreateEllipticRgn(0,0,Me.Width/Screen.TwipsPerPixelX,Me.Height/Screen.TwipsPerPixelY)
Call SetWindowRgn(Me.hWnd, hRgn, True)
 Stupidity is better than cure.
VB6 SP5 Enterprise Ed.
C, Pascal, VC++ 6.0
Running Win98 SE and Win2000 Prof. Ed.
Email me at : [email protected]
-
Oct 10th, 2001, 07:18 PM
#10
Exacly what I searched!!!!! Good Job Arien
-
Oct 10th, 2001, 07:19 PM
#11
Member
I'm so proud of myself.
-
Oct 10th, 2001, 07:27 PM
#12
PowerPoster
Originally posted by Redth
I've used this tool for all my weird shaped form needs.... Just go into ms paint, make your desired shape in solid black, overtop the white background, and let this program trace it and come up with a .frm file!
http://www.fortunecity.com/skyscrape...tml?VBSFC.html
kudos to Alex Vallat for making this program it is fantastic!
I concour, that tool is cool stuff. You can draw basically any shape and it does all the code for you, even thinks to include code to deal with dragging.
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
|