473,588 Members | 2,565 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"Stylesheet s" in win forms

Hi all

This may seems like an od subject.
I would like to know if you can apply some sort of "stylesheet " to winforms?
like in ASP.NET you can define .css files to determine your look and feel of
your HTML web pages. the obvious advantage of using HTML stylesheets is that
all your buttons, drop downs, etc all look the same. As well as if you wish
to change something to the general look and feel of the web site, you could
just change the css and the entire web site would change.

I would like to know if something similar exists for winforms? so you have
10 forms in your application and each form has, on average, about 10
buttons. all forms must look the same, and all buttons must look the same,
and their "look and feel" controlled by one central location...

any suggestions or solutions?

Thanks
Jason
Nov 16 '05 #1
3 5084
maintain the attributes of the controls in the central location like a
config file or an xml file.
you can read those attributes and set the properties runtime.

Av.
"Jason" <c_*******@migh ty.co.za> wrote in message
news:u8******** ******@TK2MSFTN GP11.phx.gbl...
Hi all

This may seems like an od subject.
I would like to know if you can apply some sort of "stylesheet " to
winforms?
like in ASP.NET you can define .css files to determine your look and feel
of
your HTML web pages. the obvious advantage of using HTML stylesheets is
that
all your buttons, drop downs, etc all look the same. As well as if you
wish
to change something to the general look and feel of the web site, you
could
just change the css and the entire web site would change.

I would like to know if something similar exists for winforms? so you have
10 forms in your application and each form has, on average, about 10
buttons. all forms must look the same, and all buttons must look the same,
and their "look and feel" controlled by one central location...

any suggestions or solutions?

Thanks
Jason

Nov 16 '05 #2
so in otherwords, read my styles from the central location and apply them to
my buttons, etc on formload?
this is a good option...
is there another way?

"avnrao" <av*@newsgroups .com> wrote in message
news:ey******** *****@tk2msftng p13.phx.gbl...
maintain the attributes of the controls in the central location like a
config file or an xml file.
you can read those attributes and set the properties runtime.

Av.
"Jason" <c_*******@migh ty.co.za> wrote in message
news:u8******** ******@TK2MSFTN GP11.phx.gbl...
Hi all

This may seems like an od subject.
I would like to know if you can apply some sort of "stylesheet " to
winforms?
like in ASP.NET you can define .css files to determine your look and feel of
your HTML web pages. the obvious advantage of using HTML stylesheets is
that
all your buttons, drop downs, etc all look the same. As well as if you
wish
to change something to the general look and feel of the web site, you
could
just change the css and the entire web site would change.

I would like to know if something similar exists for winforms? so you have 10 forms in your application and each form has, on average, about 10
buttons. all forms must look the same, and all buttons must look the same, and their "look and feel" controlled by one central location...

any suggestions or solutions?

Thanks
Jason


Nov 16 '05 #3
Jason,

Another way to do this would be to derive from the windows forms
controls, setting the defaults to what you want them to be.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Jason" <c_*******@migh ty.co.za> wrote in message
news:%2******** *******@TK2MSFT NGP12.phx.gbl.. .
so in otherwords, read my styles from the central location and apply them to my buttons, etc on formload?
this is a good option...
is there another way?

"avnrao" <av*@newsgroups .com> wrote in message
news:ey******** *****@tk2msftng p13.phx.gbl...
maintain the attributes of the controls in the central location like a
config file or an xml file.
you can read those attributes and set the properties runtime.

Av.
"Jason" <c_*******@migh ty.co.za> wrote in message
news:u8******** ******@TK2MSFTN GP11.phx.gbl...
Hi all

This may seems like an od subject.
I would like to know if you can apply some sort of "stylesheet " to
winforms?
like in ASP.NET you can define .css files to determine your look and feel of
your HTML web pages. the obvious advantage of using HTML stylesheets is that
all your buttons, drop downs, etc all look the same. As well as if you
wish
to change something to the general look and feel of the web site, you
could
just change the css and the entire web site would change.

I would like to know if something similar exists for winforms? so you have 10 forms in your application and each form has, on average, about 10
buttons. all forms must look the same, and all buttons must look the same, and their "look and feel" controlled by one central location...

any suggestions or solutions?

Thanks
Jason



Nov 16 '05 #4

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

Similar topics

3
8605
by: Phil Powell | last post by:
Has anyone here ever done a case where you have a select multiple form element and you have to do both server-side and client-side validation? I am honestly not sure how to do it in Javascript (I keep getting errors thrown that I can't verify because the form processes onto itself too quickly for me to check the Javascript errors) because the select multiple form element name has to be in the form of "var" because PHP will then recognize...
43
42776
by: Dimitri Debruyne | last post by:
Hi group I am in the process of developing a website in XHTML Strict and CSS. Is there a way to open a link in a new window without the use of frames or Javascript or something ? I didn't find a way ... TIA
2
2003
by: Mr X | last post by:
I'm a few weeks new to JS, and am having a problem. I have a simple INTERNAL style in a web page and I know that style is working. The problem arises when I try to run a script that changes one of that style's properties. The style is... -------------------------------------------------- ..xtable, .xtable TD, .xtable TH { background-color:black; color:white; font-family:arial; }
12
3082
by: relaxedrob | last post by:
Hi All! I have a page with with the following style information: <link rel="stylesheet" type="text/css" href="/eEmployment/eTech.css" /> <style type="text/css"> DIV.Application { BACKGROUND-IMAGE:url(/someImage.jpg); }
6
1534
by: Sugapablo | last post by:
Lets say I have several DIVs, each with an ID like X1, X3424, X234, etc. I'd like to render all elements that have an ID that starts with "X" invisible (for example), regardless of what followed the "X". Simple way to do this? --
9
1337
by: Aaron Gray | last post by:
Hi, Well I have gone and done it, got to the bottom of it. Nothing spectacular but its good to see how it is done. Now to distill the brew ... I am going to use sub threads of the thread to air the reworked Google code for comments, suggestions and ammendments.
6
2293
by: Dick Watson | last post by:
I had a page that works when setup like this: === <form name="frmCalc" action=""> <script type="text/javascript"> function btnCalc_onclick(abc) { return "got here with " + abc; }
4
2044
by: rebeccatre | last post by:
please help me with this, <style> #a, option.message {background-color: green; color: white;} #b, option.message {background-color: yellow; color: black;} </style> <select id="thisselect"> <option id="thisone" class="message">THANK YOU</option> </select>
0
7860
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
8354
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...
0
8223
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6634
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
5726
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
5398
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
3847
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
1458
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1195
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.