Link to home
Create AccountLog in
Avatar of KBanner
KBanner

asked on

Changing Button properties in every form?

Hi,

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


ASKER CERTIFIED SOLUTION
Avatar of Craig Yellick
Craig Yellick
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of RonaldBiemans
RonaldBiemans

Can't you just "replace all"  on the particular properties. Which properties do you want to change.
Avatar of Bob Learned
@RonaldBiemans:
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.

Bob
Avatar of KBanner

ASKER

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

UseThemes
VisualStyles
HotFormatStyles.BackColor
HotFormatStyles.BackColorGradientColor
HotFormatStyles.BackColorGradientMode

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

How about, do a search on

     System.Windows.Forms.TextBox

and replace with

     YourApp.YourTextBox

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
Avatar of KBanner

ASKER

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
AutoText
Code Flow Explorer
Quick Properties
WorkBench
Comment spellchecker
SmartComplete
AutoBrackets
Extended clipboard
TabOrdering
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.