473,761 Members | 3,542 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 programmaticall y. 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 3977
Hello,

I am not sure the managed way exists. You can however try P/Invoking to the
ChangeDisplaySe ttings 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******** ********@mynews gate.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 programmaticall y. 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.c om> ha
scritto:
Hello,

I am not sure the managed way exists. You can however try P/Invoking to the ChangeDisplaySe ttings 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.c om> ha
scritto:

Hello,

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


the
ChangeDisplay Settings 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
1968
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 a load of learning data (a 25 by 25 matrix) each shape group has a number of user drawn shapes, then the application will create variations of these shapes (by moving nodes and drawing lines into the matrix between nodes, after normalization). So...
2
3962
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 control defining rectangle). For example, if I make a custom control that simply paints a circle inside its bounding box, how can I have the control not have the area of the control outside of the "bounding circle" affect any objects underneath...
0
1174
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? Cheers, Chris.
5
2876
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 right clicks the application in the taskbar. How can i do this?
1
2753
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 doing this? Are there any design patterns, algorithms for best performance? Best way to translate mouse's x,y coords into a shape on my Panel
5
11546
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 and Hexagonal are made and are responding in click event but I am not able to provide colors to them. I used Window API programming also but buttons are not getting colored. Kindly help. I am calling Window API "gdi 32" in Modules and Putting Shapes,...
5
7633
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 simple Visio type app where I can drag rectangles on a canvas to create diagrams. for now I don't need fancy shapes so I'll just start with a rectangle class where I can add custom properties to it such as where lines are connected to it, etc. ...
0
3394
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 within options. I have everything being dynamically named from the previously dynamically named element. (I hope this makes sense.) I am not able to retrieve any of the dynamically created values. I can view them on the source page but can't pull them...
4
3897
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 lines of code from the GetGeometry method within the CustomPolyLine class: _points.Add(new Point(10, 10));
0
9377
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10136
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9989
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9925
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8814
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7358
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6640
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5266
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3913
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.