473,765 Members | 2,024 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Layering in Windows Form

Hi,

I want to develop a windows based application using .Net 2.0

The application will have the heavy UI and it will have the lots of
drawing to do on the form.

So can any one give me the direction how can i handle the different
issues that will arise in the same due to paint event and due to other
issues.

Also i want to have the layer concept in the same .e.g we have
something in Adobe Photoshop. so that the user can categorize the items
for the layers. also user should be able to on - off the layer and
should be able to change the order of layers.

So can any one suggest me what can be the good way to do the same.

Thanks

Vikash

Jun 28 '06 #1
3 7652
Hi Vikash,
I want to develop a windows based application using .Net 2.0
Also i want to have the layer concept in the same .e.g we have
something in Adobe Photoshop. so that the user can categorize the items
for the layers.


As you might already be aware, traditional Windows UI (which also .NET's
WinForms presents) doesn't have the concept of layers. The closest thing to
layers in Windows is Z-order, i.e. the fact that windows can be on top of
each other.

If I understood your e-mail correctly, you are going to draw on the windows
yourself. Although Windows doesn't give you ready-made support for layers,
emulating them should be too difficult. In fact, you need to have some kind
of data structures to keep up the data that needs to be drawn, and this
would be the place where you would track your layers.

So, when you need to draw your images/objects on the screen, you would start
from the bottom layer, and draw the layers one at a time if they are
visible. The end result should be what you get for example from Photoshop,
except that Photoshop supports transparency and merging of layer contents.

Does this make any sense to you?

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
ja***@removethi s.dystopia.fi
http://www.saunalahti.fi/janij/
Jun 28 '06 #2
Hello Vikash,

You have 3 options to achieve the layer effect, actually 2 and 1 option
divides into 2 sub options :) :

1) You can use Layered Windows API. This scenario only applies to forms so
your layers will be actually forms. You can remove the border of a form, set
a transparenc key into it and than set z-orders to those forms to use as
layers.

2) You can create transparent controls which will be used as layers. There
are 2 methods for it :

a) You can create a region from your control drawing and set to the control
so all other pixels which aren't drawn will become transparent.
b) You can create real transparent controls. Please take a look at the url
below for a sample :

http://www.bobpowell.net/transcontrols.htm

Hope these helps...

Regards,

Özden

<vi****@nagarro .com> wrote in message
news:11******** **************@ d56g2000cwd.goo glegroups.com.. .
Hi,

I want to develop a windows based application using .Net 2.0

The application will have the heavy UI and it will have the lots of
drawing to do on the form.

So can any one give me the direction how can i handle the different
issues that will arise in the same due to paint event and due to other
issues.

Also i want to have the layer concept in the same .e.g we have
something in Adobe Photoshop. so that the user can categorize the items
for the layers. also user should be able to on - off the layer and
should be able to change the order of layers.

So can any one suggest me what can be the good way to do the same.

Thanks

Vikash

Jun 28 '06 #3
Hi,

Thanks for the suggestion. I was really trying to do it with the
Transparent control, but I am really getting a lots of problem
especially when it comes to Repainting and Invalidating.

I want to categorize the things in my UI and i want to place the things
in layers depending on the category. I was planning to go for Layer
architecture as in Photo shop application as i was thinking it will
make my life more easy with respect to repainting only a particular
area.

I think i will have to go for smart data structure design for the same
as -- making it using the transparent controls dont seems to make the
things easy.

What if i plan to go for WinFx SDK -- Windows Presentation Foundation
library??

is it stable enough to use?? any sussestion for the same?
Özden Irmak (at) wrote:
Hello Vikash,

You have 3 options to achieve the layer effect, actually 2 and 1 option
divides into 2 sub options :) :

1) You can use Layered Windows API. This scenario only applies to forms so
your layers will be actually forms. You can remove the border of a form, set
a transparenc key into it and than set z-orders to those forms to use as
layers.

2) You can create transparent controls which will be used as layers. There
are 2 methods for it :

a) You can create a region from your control drawing and set to the control
so all other pixels which aren't drawn will become transparent.
b) You can create real transparent controls. Please take a look at the url
below for a sample :

http://www.bobpowell.net/transcontrols.htm

Hope these helps...

Regards,

Özden

<vi****@nagarro .com> wrote in message
news:11******** **************@ d56g2000cwd.goo glegroups.com.. .
Hi,

I want to develop a windows based application using .Net 2.0

The application will have the heavy UI and it will have the lots of
drawing to do on the form.

So can any one give me the direction how can i handle the different
issues that will arise in the same due to paint event and due to other
issues.

Also i want to have the layer concept in the same .e.g we have
something in Adobe Photoshop. so that the user can categorize the items
for the layers. also user should be able to on - off the layer and
should be able to change the order of layers.

So can any one suggest me what can be the good way to do the same.

Thanks

Vikash


Jun 30 '06 #4

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

Similar topics

6
5784
by: Hamed | last post by:
Hello I have employed as a developer in a software company that its team uses FoxPro / VB 6.0 / VC++ 6.0 as the developing tools and newly is going to migrate to VS.NET. There is a project modified that is to upgrade a big, more than 100,000 lines DOS based program developed by FoxPro 2.x to .NET platform. The design is as previous and the implementation will be reprogrammed. As a duty in my job I should find an answer about the
5
6586
by: Xarky | last post by:
Hi, I am creating a windows form, and when a specified event occurs (button click), I am hiding the windows form and opening a new windows form. When opening the new windows form and closing it, the main windows form would still be running in the background and never terminating. How can I terminate the old window form from the new created window. I hope someone out there understands my problem.
5
11363
by: Dave | last post by:
How do I check in a Windows Forms app if any controls have changed? I have a form that collects data, and I want to prompt the user if they try to exit the app, or load a new file, without saving changes that have been made. In MFC/Win32, you'd trap the WM_COMMAND/EN_CHANGE notification messages, etc. But, this doesn't seem to happen in Windows Forms. I tried Spy-ing a windows forms app, and the WM_COMMAND messages don't even get sent...
9
2822
by: Rajat Tandon | last post by:
Hello there, I am relatively new to the newsgroups and C#. I have never been disappointed with the groups and always got the prompt replies to my queries.This is yet another strange issue, I am facing. Please please help me to solve this as soon as possible. So here we go ... I am not able to take the screen shot of the windows form based "Smart
4
1842
by: Michael C# | last post by:
I have a Windows Form I want to add to another form similar to the way you add an OpenFileDialog to a Windows Form from the Toolbox. Thx
6
2049
by: Dean R. Henderson | last post by:
I have a DTS Package I am able to execute successfully from a Windows Form application, but I cannot get this to work from an ASP.NET Web Service, although the Web Service impersonates the same user the Windows Form runs under. When I run the Web Service, I make a call to "System.Security.Principal.WindowsIdentity.GetCurrent().Name" and this verifies the user-id is the same account I am logged onto when I successfully run my Windows...
8
18658
by: Alison | last post by:
Hi, Al I am trying to design a user interface which provides both menus and toolbars for some users to click on whatever they want to do, at the same time, I would like to have a console window available in the same form for users to enter commands and display outputs if some prefer to use character based user interface. I would like to implement the user interface in vb .net. Now I have menus and toolbars ready, but do not now how to get a...
4
3159
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps further away, completely leaving the selector box area. Any ideas? VS 2003 and VB.Net This is a simple application at the moment but the form is inherited from a
9
12847
by: mohit.akl | last post by:
Hey guys & gals I am havng trouble modifying the control box. I want to make the maximise button invisible and have minimisise button instead of it. Like this _ X (not like _ o X ) How to do this... and eventually i want to modify the control box in the form of ? _ X ... I.e. adding a new button to control box. I need to detect the click events.
7
9372
by: Jwe | last post by:
Hi, I've written a program which has both a command line interface and Windows form interface, however it isn't quite working correctly. When run from command line with no arguments it should display the Windows form. The form is being displayed but the command only returns when the form is closed. I want the command line to return immediately, leaving the form displayed.
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9399
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
10007
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
9957
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,...
1
7379
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
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3924
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
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.