A way to "improve" write coding in vs2008 experience - visual-studio

I would like to try to automize some recurrent job when i develop asp.net application.
For example, for each <asp:button> I create, I would like to insert the classical code
onomouseover="...something"
onmouseout=" ..something-again.."
Is there a way to automatically add this code "piece" in vs 2008?
Some key combination to add "pre-ready" piece of code?
Thank you

Try using code snippets. This article explains.

Related

how to create an oracle form

I am looking for a source to teach me how to create an oracle form. I don't want to create a form by using oracle form builder, I would like to understand how to create a *.fmb file.
Do you have any good source to read about it? I would like to create a custom IDE that's why I want to know how I can create an Oracle form.
please advice me.
You can use the open api functionality in oracle forms to make your own fmb files.
For more info read this link
You don't want to do that.
Back in 1990's, Forms 3.0, when a form source was an .INP file which was a pure TXT file, it had its own structure so you might have tried to do everything in a text editor - define blocks, triggers, PL/SQL code, whatever. I don't know a single person who did that - that's what Forms is used for, so that you - as a developer - could pay attention to development and let Forms do the boring job for you.
Today, .FMB is not a textual file at all so you can't even do that.
I'd suggest you to learn how to develop good/fast/effective/etc. Forms applications, and - again - let Forms do the rest.
As of the rest of your question (creating a custom IDE), did you try to create a query builder? It is way simpler than creating a form, but still quite complex and certainly isn't something you can do in a matter of days.
Anyway, good luck with anything you're up to, I admire your enthusiasm.

How to change MFC application UI

I have implemented an windows application using Visual studio 2008 and for front end I used MFC Controls.
I need to change look and feel of application. Here is Ui sample image of old and new look.
Can anybody suggest me how it can be done in visual studio or should I use some other tool.
Any help would be appreciated.
Thanks
I can think of 3 ways:
Implement it yourself
Use an external library like Codejock
Adding a manifest file to your project
Using a manifest file will give you the look and feel of the OS your app is running on.
You can overwrite some needed methods of default CMFCVisualManger by creating your own class.
Then it's up to you how you want to design it.

code highlighting

I want code highlighting like visual studio.
If user is attaching a code snippept in the article i want to hightlight the code exactly like what visual studio will do.
How can we achieve this.
For example google-code-pretify. If you are not talking about code that is contained in a website but e.g. in a desktop application, you should clarify your question.
http://www.actiprosoftware.com/Products/DotNet/ASPNET/CodeHighlighter/default.aspx
Does this tool do what you want?
If you're in PHP you can also use FSHL: http://code.google.com/p/fshl/. Examples are included.

VS2010 Code Analysis, any way to automatically fix certain warnings?

I must say I really like the new code analysis with VS 2010, I have a lot of areas in my code where I am not using CultureInfo.InvariantCultureand code analysis is warming me about this.
I am pretty sure I want to use CultureInfo.InvariantCulturewhere ever code analysis has detected it is missing on Convert.ToString operations.
Is there anyway to get VS to automatically fix warnings of this type?
You cannot do this in VS Code Analysis but CodeIt.Right performs similar analysis (only on source code) and includes auto corrections with every rule. Give it a try!
I don't think you can do that with Visual Studio but Resharper 5 has a Structural Search and Replace functionnality that could work for that.

Class Designer in Visual Studio - is it worth it?

Does anybody use the Class Designer much in Visual Studio?
I have downloaded the Modeling Power Toys for 2005 and have been impressed with what I've seen so far. The MSDN Class Designer Blog doesn't seem to have been updated for a while but it still looks quite useful.
Is the Class Designer a quick way to build the basic application or should I just work out on paper and then start coding?
Thanks
As a visualization tool, or for exploratory purposes (drawing up multiple options to see what they look like) it's not bad, but generally I find the object browser does fine for most stuff I care about.
As a code generation tool, it's a terrible idea.
The whole idea that we will design all our code structure first, then fill in the blanks with small bits of implementation is fundamentally broken.
The only time you actually know what the code structure should look like, is if you've done the exact same thing before - however then you can just use your previous code, and you don't need to draw up any new code in any kind of designer.
If you decide ahead of time to use a particular class structure before you've actually tried to solve the problem, there is a 100% chance that you will pick the wrong design, and shoot yourself in the foot.
Short answer: No.
Longer answer: No, not at all. There's a reason it hasn't been updated.
[EDIT] # MrBrutal - Sorry - do you mean to generate code or just represent a design? Because I took your question as to generate code for you.
I guess this is old, but I use it a lot. It could definitely be improved, but I find it extremely useful to be able to visualize my class structure, and to be able to jump to a specific class or method by clicking on it visually.
It's also slightly easier to add classes/interfaces with than the solution explorer, although the new files always end up in the root folder, instead of the same folder as the CD.
The main benefit I find is to be able to see a group of closely related classes at once. I think the best approach might be to have a single CD for each code folder/namespace.
I've used it a couple of times to get some decent looking class diagrams to put in presentations/blogposts etc. But thats about it...
Any suggestions on other simple UML/class diagram tools that is easy to use and create some nice looking diagrams? Must be able to generate diagrams from .NET code.
I have tried it out couple of times, mainly for viewing existing classes.
If it would show all the relationships, it would be more usefull. Now it only shows inheritation.
I find it useful sometimes, more often for documentation afterwards.
It's a new little utility, but I don't think you get the full functionality in VS Pro - I think you need Architect's Edition.
The comments here suggest that few people find the class designer useful.
Amusing to note that Microsoft designed the class designer to be a useful replacement to useless UML (UML diagrams being untrustworthy once they lose synchronisation with source code).
The trouble with class diagrams is that they tell us what we already know.
I only use the class designer to display my existing classes, but I don't use it the other way, e.g., design your classes there then let it generate the code.

Resources