Mirage Source
changing form shape (all*) - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: Source Code Development (https://mirage-engine.uk/forums/forumdisplay.php?fid=51)
+----- Forum: Mirage Source 4 (Visual Basic 6) (https://mirage-engine.uk/forums/forumdisplay.php?fid=44)
+------ Forum: Tutorials (https://mirage-engine.uk/forums/forumdisplay.php?fid=13)
+------ Thread: changing form shape (all*) (/showthread.php?tid=2404)



changing form shape (all*) - genusis - 26-11-2008

ok with this code you can do stuff like this

[Image: circle.JPG]

now this tutorial is very easy first step is to declare the stuff below. so in ModDeclares add
Code:
Private Declare Function CreateEllipticRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, _
    ByVal X2 As Long, ByVal Y2 As Long) As Long

Private Declare Function SetWindowRgn Lib "User32" (ByVal hWnd As Long, ByVal hRgn As Long, _
    ByVal bRedraw As Boolean) As Long

then after this you need to add this function
add this code anywhere.

Code:
Function CutCirCle(Form As Form, Left, Top, Fat, Tall)
    SetWindowRgn Form.hWnd, CreateEllipticRgn(Left, Top, Fat, Tall), True
End Function

and after that all you need to do is to call the function on form load. so add this to any of your Sub Form_Load on any form.

Code:
Call CutCirCle(Me, 0, 30, 1000, 900)

ok now here is the fun part messing with the call a bit =]. Well

Call CutCirCle(Me, 0, 30, 1000, 900) the first 0 is the bottom it move the bottom away or back to original, the second is the top it removes the top of the form, as the other two are the two sides left and right. So have fun making weird shapes with your forms.

this especially works good for your mainmenu. :wink: cheers*


Re: changing form shape (all*) - Rory - 26-11-2008

Nice code, yes.
Useful Tongue maybe.


Re: changing form shape (all*) - Matt - 26-11-2008

There's code that will remove a certain color from the form, which would be better, so you can do popout characters on the gui and shit.


Re: changing form shape (all*) - carloso - 29-11-2008

I've tried this before. It makes your form all laggy and stuff. Sad


Re: changing form shape (all*) - genusis - 29-11-2008

my form loaded quite fast with this ^^.


Re: changing form shape (all*) - Matt - 29-11-2008

I can't see a use for this.


Re: changing form shape (all*) - Forte - 29-11-2008

Seems like he just wanted to post a tutorial :roll:


Re: changing form shape (all*) - Matt - 29-11-2008

a = a + 1

There, that's how you make a variable's number, go up by one.

>.>

Useless tutorial. Big Grin


Re: changing form shape (all*) - Nean - 29-11-2008

Give him a fucking break. At least he's even submitting tutorials.

Thanks for the tutorial.


Re: changing form shape (all*) - genusis - 29-11-2008

this tutorial could be used to change the shape of your main menu or other forms that you want to e a weird shape or cool shape and such. its meant to allow you to customize your game even more rather than having a plain box with 3d pop out characters.


Re: changing form shape (all*) - Matt - 30-11-2008

With the 3D pop out stuff, you just set the color you want to be removed and the code does it.

It's very simple.


Re: changing form shape (all*) - genusis - 30-11-2008

the pop out and this are both good codes either way its really up to the user on what they want. who knows they might want to use both. but it is really there choose ^^.


Re: changing form shape (all*) - Matt - 30-11-2008

I'm sorry, I just so absolutely no use for this code. I mean, sure, it's neat, but really what could you use it for in an ORPG?


Re: changing form shape (all*) - Mithlomion - 30-11-2008

Perfekt Wrote:I'm sorry, I just so absolutely no use for this code. I mean, sure, it's neat, but really what could you use it for in an ORPG?

Just because you have no sense of creativity doesnt mean everybody else lacks it too.


Re: changing form shape (all*) - Matt - 30-11-2008

Mithlomion Wrote:
Perfekt Wrote:I'm sorry, I just so absolutely no use for this code. I mean, sure, it's neat, but really what could you use it for in an ORPG?

Just because you have no sense of creativity doesnt mean everybody else lacks it too.

Um. Give me an example that you can do with this code. Since you're so creative.

I swear, you pixel artists think you're so great. Big whoop. You can place pixels and make a picture. Learn to program on top of it.

Programming is much harder than pixeling.


Re: changing form shape (all*) - Mithlomion - 30-11-2008

How is programming harder than pixeling?

All you have to do with programming is understand the shit language youre learning.. and i cant understand how you can even consider yourself a real programmer.. Just because you understand a simple language as VB6 more than some other people who hardly given it time.

And what you can do with this code?.. Just the part where you dont understand than changing shapes and shit can be usefull of GUI's and shit proves how little creativity you really got.

Im not sure how good this code works, but i dont see how it could not be developed into doing better shit like, cooler popups for Windows or shit.


Re: changing form shape (all*) - Matt - 30-11-2008

I don't consider myself a programmer.

And if you would take the time to read my prior posts in this thread, you would see that I informed him of code that does exactly what you just said that I am not creative enough to do.

Guess what though fucker, I was the first one to have the popout characters on a gui.

Fuck off.

Sorry Gen. If you want though, I can post up that other code.


Re: changing form shape (all*) - Mithlomion - 01-12-2008

Perfekt Wrote:I don't consider myself a programmer.

And if you would take the time to read my prior posts in this thread, you would see that I informed him of code that does exactly what you just said that I am not creative enough to do.

Guess what though fucker, I was the first one to have the popout characters on a gui.

Fuck off.

Sorry Gen. If you want though, I can post up that other code.

Wow youre so cool Big Grin.
Suck my dick.


Re: changing form shape (all*) - Matt - 01-12-2008

Women don't have a penis.


Re: changing form shape (all*) - Doomy - 01-12-2008

Perfekt Wrote:Women don't have a penis.

care to make a bet
points at robin
lol jk


Re: changing form shape (all*) - genusis - 01-12-2008

yes post up the other code please so that way it gives coders more of a choose to use either or.


Re: changing form shape (all*) - Matt - 01-12-2008

Alright, I'll get around to it tomorrow sometime.


Re: changing form shape (all*) - GIAKEN - 01-12-2008

I don't know about you guys, but if I saw a game that had this GUI...

[Image: circle.JPG]

I would be like holy fuck that is awesome.


Re: changing form shape (all*) - Rian - 01-12-2008

Mithlomion Wrote:Im not sure how good this code works, but i dont see how it could not be developed into doing better shit like, cooler popups for Windows or shit.

Essentially, this tutorial says "fuck off" square forms. It allows you to make a circle, semi-circle, or quarter-circle. Out side of the aforementioned shapes, the transparency with color negligence is much more useful.


Re: changing form shape (all*) - genusis - 01-12-2008

yep ^^ it uses circles and semi circles and such