Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Changing Button properties in every form?

Posted on 2005-02-28
Medium Priority
Last Modified: 2010-04-23

First thank you for clicking and showing an interest.

We have an application with over 150 forms with an average of 10+ buttons on each form. Yes 1500 buttons approx!!

We have realised that we want to change five properties for each button to chnage the visual style of the button to the user.

Could do this by using the GUI interface, but that equates to going into 7500 thousand buttons properties and changing accordingly.

Is there any software out there that'll do this for you, or does anybdy know of a more automated way??

many thanks

Question by:KBanner
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 11

Accepted Solution

Craig Yellick earned 600 total points
ID: 13420731
Since all of the source code is stored in text files (*.vb) you could use the extensive Visual Studio.NET macro-programming capabilities to write a search-and-replace operation. Or, if you or someone on staff has Word macro programming skils, Word could rip through pretty easily as well.

There are also numerous 3rd-party tools for doing global search-and-replace ops, though in your case the changes might not be as simple and finding one pattern and replacing it with another.

-- Craig Yellick
LVL 25

Expert Comment

ID: 13420752
Can't you just "replace all"  on the particular properties. Which properties do you want to change.
LVL 96

Expert Comment

by:Bob Learned
ID: 13420981
Ronald, I thought of that too, but if it happens to be a property that is default, there won't be any text in the form to define that.

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 13421041
Hi Guys,

Guess 3rd party software is what I was looking for. i.e. all the work has already been done. What buzz words could I use to search on the net for some??

Biggest problem with "replace all" Ronald is that in the InitialComponents function that defines the properties, I'm trying to change a property that has a default value and is not show in the code with a value that would be set in the InitialComponents function. e.g. BackColor

To be perfectly honest, I have tried to keep it simple by saying "Button" it's actually an 3rd party button that has properties

these are them


I really need some software that changes paragraphs rather than lines like Serach and Replace does in the IDE

LVL 11

Expert Comment

by:Craig Yellick
ID: 13421084
How about, do a search on


and replace with


YourTextBox inherits from TextBox and does what it needs to default the properties as you need. I could see situations where this might cause a different set of problems, but hopefully these will be fewer than 1,500 and easy to identify and fix.

-- Craig Yellick

Author Comment

ID: 13428710
Hi Guys,

Found this 3rd party software that adds directly into the VS.NET IDE

It's at

Also check out the other superb features

Mulitline Extended Find and Replace
Code Flow Explorer
Quick Properties
Comment spellchecker
Extended clipboard
Code Stats  etc. etc.

And it's only $250

Thanks to all that had the the principle to answer, and leading me down this path.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question