Quick Search for:  in language:    
Change,Shape,form
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
Visual Basic Stats

 Code: 3,014,970. lines
 Jobs: 119. postings

 How to support the site

 
Sponsored by:

 

You are in:

 
Login



Latest Code Ticker for Visual Basic.
Excel Into a webpage
By Bill Donahue on 7/2


Unroll2 - Update
By Cyber Chris on 7/2


MultilinePWD
By Cyber Chris on 7/2


Click here to see a screenshot of this code!Song/Poem Assistant
By Peter Rowan on 7/2

(Screen Shot)

Click here to see a screenshot of this code!GPA Cal
By KBM-00 on 7/2

(Screen Shot)

Click here to see a screenshot of this code!Connection Via the Telephone line.No internet or cable.Just the telephone line
By Nass ClickMan on 7/2

(Screen Shot)

DBTool
By Make Strömberg on 7/2


Click here to see a screenshot of this code!MSChart Simple Example
By Sebastian Pereira on 7/2

(Screen Shot)

CString v1.5
By Ultimatum on 7/2


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

Change Form Shape

Print
Email
 

Submitted on: 2/11/1998
By: David Serrano  
Level: Not Given
User Rating: By 105 Users
Compatibility:VB 4.0 (32-bit), VB 5.0, VB 6.0

Users have accessed this code 37355 times.
 
 
     Can Change The Shape of any form
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

'**************************************
' Name: Change Form Shape
' Description:Can Change The Shape of an
'     y form
' By: David Serrano
'
' Inputs:Look Below
'
' Side Effects:The border can be preatty
'     messed up if you don't know what your do
'     ing
'
'This code is copyrighted and has' limited warranties.Please see http://w
'     ww.Planet-Source-Code.com/vb/scripts/Sho
'     wCode.asp?txtCodeId=794&lngWId;=1'for details.'**************************************

Private Sub Form_Load()

Show 'The form! SetWindowRgn hWnd, CreateEllipticRgn(0, 0, 300, 200), True End Sub
'E-mail Me at BTMSoft@aol.com for more i ' nfo


Other 4 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Not Given category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
4/12/1999 3:09:00 AM:Mitchell
David I would like to make a form 480 x 
640 that is a landscape oriented 
rectangle with approximately 1/2 inch 
radius corners, How? Thank you
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/5/1999 3:25:00 PM:Mike
Yo this is cool and all but how do you 
make the form smooth ? like with this 
code its gay how would you make a 
boarded around the shape?? 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/5/1999 9:29:00 PM:Adam
I'm working with some chat rooms at the 
moment and I am trying to make a form 
about 6" by 3.5" with rounded corners. 
Will someone please help me out?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/11/1999 8:23:00 PM:Nocturnal
This code is great Dave! Its alot more 
precise than alot of others
i have 
seen.. and much more efficient.  
Changes the size is a snap and
so is 
the blending!
Thanks again for posting 
this one!
-Nocturnal
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/11/1999 10:01:00 PM:Rolf
Very nice but it isnt what i need.. i 
need to set form window shape by Mask 
color... not by polyagon type of any 
kind.. OK here is example.. if form has 
a picture of solid white circle with 
pink background, when its running it 
shows just solid white circle.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/18/1999 12:32:00 AM:Pasha
Yep, this one looks nice. Except when 
you maximize the form, it looks kinda 
weird. :)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/19/1999 2:06:00 AM:Kiran
Sir,
  Code was very simple and neat 
.thanks
is there anyway that we can 
make the shape of the form as a rounded 
Rectangle. It would be of great if u 
could help me in this.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/25/1999 2:48:00 AM:siva
this is really good
send me any kind 
of tricks & tips in Code.
Thank you.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/16/1999 11:41:00 AM:Spidey
And how can i do the same in VBA? 
(Excel 97?)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/28/1999 8:48:00 PM:Allen
Can anybody suggest the most flexible 
reporting tool for visual basic other 
then Crystal Reports. Crystal reports 
does'nt seem to allow run time 
customisation and alteration of the 
fields in the report. An alternative is 
printing to a text file with lots of 
code, but the amount of coding involved 
is discouraging. Any suggestions?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/3/1999 9:55:00 AM:Scorpion
I think this code is useful.
There is 
one thing I would like to know however, 
and that is how I can minimize this 
form? I have the BorderStyle set to 
None, so I don't have a titlebar. Is 
there a way to minimize it? -thanks
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/5/1999 4:17:00 AM:Prince Zala
sounds Great !
pass me the code 
david,
I want to make a Stock Ticker 
with this.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/17/1999 10:23:00 AM:Minimize
Lots of people asked how to minimize 
the form if you have no border.
You 
can minimize the form by placing a 
button or something else that supports 
click event.
Then add this code (Can 
be used on any borderstyle except for 
tool windows i 
think):
Command1_Click
Me.WindowStat
e = 1
End sub
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/19/1999 9:12:00 PM:ET
I don't know if this will help anyone, 
but...
Remember the 4 numbers in this 
line:
SetWindowRgn hWnd, 
CreateEllipticRgn(0, 0, 300, 200), True 
?
Changing those numbers makes the 
form look different.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/5/1999 6:16:00 PM:fatboy_k
thanks for the code, it helped me out
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/7/1999 7:24:00 AM:Jonathan
this code is pretty good ...
however 
when u drag the form u can see the 
rectangle outline of it
has anyone 
found a way to fix this ?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/9/1999 11:02:00 PM:Kobie
How can U make a source code that U 
will use an unbound control to be 
appended to record that has already 
been made?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/7/1999 11:25:00 PM:cindy
Do you have any Questions and answers 
form to share?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/9/1999 4:44:00 AM:Nakarin
this is really goodsend me any kind of 
tricks & tips in Code.Thank you.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/18/1999 8:06:00 PM:ToM
Yo this code is way sweet. keep up 
figuring out this cool useful code man! 
:)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/30/1999 4:35:00 AM:ITGuy
I want to make a form the shape of 
Kilimanjaro, HOW?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/4/1999 2:38:00 PM:Ryan Rife
Try:
Option Explicit
Private 
Declare Function SetWindowRgn Lib 
"user32" (ByVal hWnd As Long, ByVal 
hRgn As Long, ByVal bRedraw As Boolean) 
As Long
Private Declare Function 
CreateRoundRectRgn Lib "gdi32" (ByVal 
X1 As Long, ByVal Y1 As Long, ByVal X2 
As Long, ByVal Y2 As Long, ByVal X3 As 
Long, ByVal Y3 As Long) As 
Long
Private Sub Form_Resize()
SetWindowRgn hWnd, 
CreateRoundRectRgn(0, 0, Me.Width / 
Screen.TwipsPerPixelX, Me.Height / 
Screen.TwipsPerPixelY, 15, 15), 
True
End Sub
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/6/1999 3:15:00 PM:cuzc0
thax ryan.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/8/1999 9:36:00 AM:Thinh
very wonderful code
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/15/1999 12:08:03 PM:Suat
Good. Very good. And thank you increase 
my technical imagine.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/24/2000 1:15:34 AM:Walter Narvasa
David,
  Code was very simple and 
yet very cool !!, thanks for the tip..i 
am currently creating a PC STRATEGY 
GAME with lots of graphics & simulation 
in it, if you want to help or join me 
just email me man..
By the way, is 
there anyway that we can 
make the 
shape of the form as a rounded 
Rectangle. Can you help me 
out..thanks..
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/8/2000 2:14:08 AM:Agnyeya
Kinda funny
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/4/2000 7:44:54 AM:¤KEEL¤
 Hola David:Espero que hables español, 
nesecito tu ayuda , mira mi problema 
es 
el siguiente , soy totalmente 
nuevo en 
este campo de programacion 
ynesecito 
saber como escribir o como 
ordenarle a 
la pc para que haga lo 
que yo quiero 
(me explico )yo quiero 
aprender a crear 
mi propio code pero 
desconozco como 
escribir lo que tengo 
en mente no se 
cuando usar simbolos 
como *,"",= etc 
hay alguna forma de 
aprender atranslate 
mis ordenes al 
programa como se hace? 
Por favor te 
agradecera eternamente si 
me puedes 
brindar tu ayuda con algun 
consejo 
Email me a kazz@ProgenIC.zzn.com
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/15/2000 1:00:48 PM:Helper
To make your form a rectangle with 
rounded edges just increase the numbers 
under form load! Make the circle BIGGER!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/11/2002 12:00:31 AM:
:(  Doesn't work under XP!!!!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | Visual Basic Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.