• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 265
  • Last Modified:

Changing Button properties in every form?


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

1 Solution
Craig YellickDatabase ArchitectCommented:
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
Can't you just "replace all"  on the particular properties. Which properties do you want to change.
Bob LearnedCommented:
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.

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

KBannerAuthor Commented:
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 vb.net IDE

Craig YellickDatabase ArchitectCommented:
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
KBannerAuthor Commented:
Hi Guys,

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

It's at http://www.axtools.com/products/cs2k3net_screenshots.htm#T3-2

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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now