Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using custom designs for forms? 1

Status
Not open for further replies.

abrahm

Technical User
Aug 10, 2001
5
0
0
US
Hi, I'm very new to programming, sorry for any newbie type language.

I was wondering if it was possible to use a custom image design as a form in VB6. An example of what I mean is the latest release of MS Media Player. The form(s) appear to be organic in shape. Is that effect possible in VB, and if so, how do you accomplish it?

If not possible in VB, does anyone know what language it is possible in.

Thanks much,
abrahm
 
Yes, it's possible to do in VB. However, if you need to ask the question then the effort - which involves a bunch of API calls, and figuring out how to describe the 'organic' shape that you want in such a way that Windows knows how to render - may be higher than you want.

Better suited languages? Not really. I don't mean by this that VB might be the language of choice to do this, just that the hoops you need to achieve it are similar other languages (Delphi and C++, for example).

Whilst I tend to roll this stuff by hand, however, it may be that there are custom controls available that reduce the hard work.
 
If you have 100 dollars investigate ActiveSkin.OCX it as a great "skining" program and is capable of such things, there is a demo of it.

Also go to and search 4 vb shaped form creater. It to could do the trick.
Brad,
Free mp3 player,games and more.
 
strongm,

While I eventually would like to learn how to do this, you are right in that its more effort than I can expend at the moment, thank you for your insight.

MrMoocow,

I also thank you, for VB SFC is nearly perfect for what I was looking for. You've just simplified my life by leaps and bounds. My immense thanks to you.

abrahm
 
you can use following API's

SetWindowRgn

The SetWindowRgn function sets the window region of a window. The system does not display any portion of a window that lies outside of the window region

The region parameter to above API can be specified using
CreatePolygonRgn

this function creates a polygonal region

go to API text viewer provided along with VB 6.0

copy the declaration statements for above API's

you can get handle of window by
form.hwnd

other details about how to use funtions and other region creating functions can be found in MSDN


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top