Tuesday, May 29, 2007

Visual Studio 2005 Class Diagrammer

I like the Visual Studio 2005 Class Diagrammer

I looked at the Visual Studio 2005 Class Diagrammer briefly when I first started using the product. I didn't think it did much, thought Visio was better, and didn't use it anymore. End of story.

While preparing a presentation on my current project I found Visio wasn't creating the pretty diagrams I wanted. I decided to try the Diagrammer again. After you create a class diagram, you can hit the + key or hit the triple upside down ^ icon to get the diagram to expand. It does a nice job of displaying your class.

I've found a few useful features in the class diagram menu: Show Base Class, Show Derived Class, Change Members Format --> display full signature. There is also a Refactor -->Extract Interface which looks handy.

Changes made to the diagram or in code are instantly synchronized between the two.

Unfortunately there is no integration between Visio and the Class Diagrammer. You can click on an object in the class designer and copy paste it as a picture into PowerPoint Visio (I took independent pictures of each object and created new connector lines in Visio)

.NET report viewer page display problem

We had a problem getting our report viewer to display the current page and page count in the ReportViewer Control.

After searching around on the internet we found a fix. This fix has to be implemented after the page renders (trying to do it right after setting the zoomMode or after form.show won't update the page numbers)

'''
''' This is to get around a bug in the report viewer which caused it not to display the page numbers.
'''

''' ReportViewer1.SetDisplayMode(DisplayMode.PrintLayout)
''' ReportViewer1.ZoomMode = ZoomMode.PageWidth
'''

'''

''' The fix was found here; http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=297814&SiteID=1
Private Sub ReportViewer1_RenderingComplete(ByVal sender As Object, ByVal e As Microsoft.Reporting.WinForms.RenderingCompleteEventArgs) Handles ReportViewer1.RenderingComplete ReportViewer1.SetDisplayMode(DisplayMode.PrintLayout)

ReportViewer1.ZoomMode = ZoomMode.PageWidth

End Sub