By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,996 Members | 1,179 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,996 IT Pros & Developers. It's quick & easy.

Shaped Windows Forms

P: n/a
I have an picture cut out in a certain shape that I would like to make as my form. I have tried following the directions in MSDN on how to make shaped windows forms but their directions did not work for me. Does anyone know how I can set my irregular shaped picture as my form?

Thanks for the help.
Nov 16 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
The GDI+ FAQ demonstrates a way to get a region from a bitmap. This region
can then be used to create a shaped form.

--
Bob Powell [MVP]
Visual C#, System.Drawing

The Image Transition Library wraps up and LED style instrumentation is
available in the June of Well Formed for C# or VB programmers
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

The GDI+ FAQ RSS feed: http://www.bobpowell.net/faqfeed.xml
Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tipstricks.xml
Bob's Blog: http://bobpowelldotnet.blogspot.com/atom.xml


"James" <Ja***@discussions.microsoft.com> wrote in message
news:02**********************************@microsof t.com...
I have an picture cut out in a certain shape that I would like to make as my form. I have tried following the directions in MSDN on how to make
shaped windows forms but their directions did not work for me. Does anyone
know how I can set my irregular shaped picture as my form?
Thanks for the help.

Nov 16 '05 #2

P: n/a
Thanks very much for the help. The code provided on your site for the GetRegion method worked. I just have a question regarding that. Is it possible to put that method into a dll file cause I tried it and couldn't? It requires the namespace System.Drawing since it uses Bitmap objects and class libraries don't support the namespace.

Thanks again.

"Bob Powell [MVP]" wrote:
The GDI+ FAQ demonstrates a way to get a region from a bitmap. This region
can then be used to create a shaped form.

--
Bob Powell [MVP]
Visual C#, System.Drawing

The Image Transition Library wraps up and LED style instrumentation is
available in the June of Well Formed for C# or VB programmers
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

The GDI+ FAQ RSS feed: http://www.bobpowell.net/faqfeed.xml
Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tipstricks.xml
Bob's Blog: http://bobpowelldotnet.blogspot.com/atom.xml


"James" <Ja***@discussions.microsoft.com> wrote in message
news:02**********************************@microsof t.com...
I have an picture cut out in a certain shape that I would like to make as

my form. I have tried following the directions in MSDN on how to make
shaped windows forms but their directions did not work for me. Does anyone
know how I can set my irregular shaped picture as my form?

Thanks for the help.


Nov 16 '05 #3

P: n/a
Just include System.Drawing as a reference in you DLL project...

--
Bob Powell [MVP]
Visual C#, System.Drawing

The Image Transition Library wraps up and LED style instrumentation is
available in the June of Well Formed for C# or VB programmers
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

The GDI+ FAQ RSS feed: http://www.bobpowell.net/faqfeed.xml
Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tipstricks.xml
Bob's Blog: http://bobpowelldotnet.blogspot.com/atom.xml


"James" <Ja***@discussions.microsoft.com> wrote in message
news:D4**********************************@microsof t.com...
Thanks very much for the help. The code provided on your site for the GetRegion method worked. I just have a question regarding that. Is it
possible to put that method into a dll file cause I tried it and couldn't?
It requires the namespace System.Drawing since it uses Bitmap objects and
class libraries don't support the namespace.
Thanks again.

"Bob Powell [MVP]" wrote:
The GDI+ FAQ demonstrates a way to get a region from a bitmap. This region can then be used to create a shaped form.

--
Bob Powell [MVP]
Visual C#, System.Drawing

The Image Transition Library wraps up and LED style instrumentation is
available in the June of Well Formed for C# or VB programmers
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

The GDI+ FAQ RSS feed: http://www.bobpowell.net/faqfeed.xml
Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tipstricks.xml Bob's Blog: http://bobpowelldotnet.blogspot.com/atom.xml


"James" <Ja***@discussions.microsoft.com> wrote in message
news:02**********************************@microsof t.com...
I have an picture cut out in a certain shape that I would like to make
as my form. I have tried following the directions in MSDN on how to make
shaped windows forms but their directions did not work for me. Does anyone know how I can set my irregular shaped picture as my form?

Thanks for the help.


Nov 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.