473,385 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Form with custom shape

Hello everybody, I have a little problm using custom shape windows
form. I 'm using the idea illustrated in MSDN (use of TransparenceKey)
and all works well but as spoecified on MSDN this works well only if
you set the colors of monitor to 16 or 24 bit. I have to use this
application in different computer, (in a demo to some student) so I
want to be able to change the color depth programmatically. Is there
some trip to do that? the class Screen doesn't contain things that I
need (she get values but don't set them).
Can you help me?

--
My Email is correct

Inviato da www.mynewsgate.net
Nov 16 '05 #1
4 3954
Hello,

I am not sure the managed way exists. You can however try P/Invoking to the
ChangeDisplaySettings API function.
Or, you can use regions instead of color keys to achieve the custom shape of
your form.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"Giox" <gi*************@yahoo.it> wrote in message
news:20****************@mynewsgate.net...
Hello everybody, I have a little problm using custom shape windows
form. I 'm using the idea illustrated in MSDN (use of TransparenceKey)
and all works well but as spoecified on MSDN this works well only if
you set the colors of monitor to 16 or 24 bit. I have to use this
application in different computer, (in a demo to some student) so I
want to be able to change the color depth programmatically. Is there
some trip to do that? the class Screen doesn't contain things that I
need (she get values but don't set them).
Can you help me?

--
My Email is correct

Inviato da www.mynewsgate.net


Nov 16 '05 #2
Ok, do you have some more indication about regions?
may be some link?
thanks, Gio

Dmitriy Lapshin [C# / .NET MVP] <x-****@no-spam-please.hotpop.com> ha
scritto:
Hello,

I am not sure the managed way exists. You can however try P/Invoking to the ChangeDisplaySettings API function.
Or, you can use regions instead of color keys to achieve the custom shape of your form.

--
My Email is correct

Inviato da www.mynewsgate.net
Nov 16 '05 #3
here is one:
http://www.codeproject.com/csharp/ShapedForm.asp

Giox wrote:
Ok, do you have some more indication about regions?
may be some link?
thanks, Gio

Dmitriy Lapshin [C# / .NET MVP] <x-****@no-spam-please.hotpop.com> ha
scritto:

Hello,

I am not sure the managed way exists. You can however try P/Invoking to


the
ChangeDisplaySettings API function.
Or, you can use regions instead of color keys to achieve the custom


shape of
your form.


Nov 16 '05 #4
Interesting, but I'm a bit worried about the mark took by this
article, I
hope it works well....
Thanks Gio

Niko <gr************@siol.net> ha scritto:
here is one:
http://www.codeproject.com/csharp/ShapedForm.asp

--
My Email is correct

Inviato da www.mynewsgate.net
Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Phil Price | last post by:
Hi there, I'm developing a shape recognition application for the tablet PC for a) fun b) university project. Currently I'm working on the learning stage using neural networks, and have to store...
2
by: ppyrstr | last post by:
I have been trying to figure out how to have a custom control that is irregular (non-rectangular) not interfere with other elements on the screen that may interfere with it's "regular" shape (the...
0
by: Chris Barnard | last post by:
Hi, I've got a form with a custom shape defined by a region. Does anyone know if it's possible to add a drop-shadow underneath the form similar to the standard windows one - with alpha blending?...
5
by: Mark Ingram | last post by:
Hi, ive got a form with FormBorderStyle set to None (i am using custom regions to determine the shape of the form). But i would like to be able to display the standard system menu when the user...
1
by: MrNobody | last post by:
I'm going to be creating shapes in a OnPaint method of an extended Panel object, and I need mouse event functionality (onClick, onMouseOver) that kind of stuff... what's the best way to go about...
5
by: sunil borwankar | last post by:
I am trying hard to make Custom Command Buttons of Irregular Shape and of Different colours in Active X Interface Wizard but am not successful. Irregular Shape Buttons i.e.; Triangular, Arrow Shape...
5
by: moondaddy | last post by:
I want to create a custom UI element which will be a custom rectangle object in a c# XAML application. I'm new to XAML and c# as most of my experience has been using vb with sql. I'm building a...
0
bmallett
by: bmallett | last post by:
First off, i would like to thank everyone for any and all help with this. That being said, I am having a problem retrieving/posting my dynamic form data. I have a form that has multiple options...
4
by: Linda Liu[MSFT] | last post by:
Hi Moondaddy, I downloaded your sample project and run it and did see the problem on my side. There're three problems in the source code of your project. 1. You should move the following...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.