Visual Basic
I hate throwing away code. Recently, we had a requirement to create an Excel spreadsheet with formulas and specific data for a particluar user. Of course we could always use Reporting Services to get the data in Excel format but then there would be no formulas. So I ran across this article by Peter Bromberg titled Create Dynamic ASP.NET Excel Workbooks In C#. It's a short article but it gives a good code listing at the end. I created a prototype in VB.Net & ASP.Net and it was working pretty well, a bit slow, but it worked. Then it got yanked....
For almost four years I’ve been using Rockford Lhotka’s CSLA. CSLA or the Component-based Scalable Logical Architecture is a framework to build business objects. It’s a powerful architecture that provides many different features for middle-ware objects (automating validation logic, n-level undo, and databinding support just to name a few). Personally, I wouldn’t start an application without it. Rocky has updated the framework once again this time with version 2.0. It includes better validation (it also breaks some of my code, thanks Rocky), authorization support and updates to the data portal. As usual Rocky has updated his books Expert VB 2005 Business...
Recently, I needed to create a list of items that were to be manually sorted by the user. I decided to use the sorting mechanism that Netflix uses in its queue. The items are listed 1 to n on the page with the sequence number in a text box. If the user wishes to re-sequence an item all they need to do is change the number in the text box to the desired sequence number. After I created the sorting algorithm in the business collection object I started out to write the UI. I first started out using Infragisics WebGrid. It...
Speaker: Amanda Silver
VB now has a bunch of new templates including a login form.
The new Application Designer is the "cockpit for your app".
Ouch! She had to change her laptop two minutes before the session and of course the project isn't working.
You can override My namespace methods. You also need to use compiler arguments.
The My object are shortcuts to common objects.
Configuration Settings
Framework classes support read/write
Strongly-typed validation for settings
Discovery via IntelliSense
Support for app-scoped or user-scoped
Works in partial trust
User settings are stored in a username.config file.
Settings fire events.
Over 500 code snippets...
A while back we (us VB devs) were told that there will be no refactoring support in Visual Basic 2005. Although disappointed, I was looking forward to edit and continue and generics. But low and behold Microsoft has surprised us! Refactoring will be supported via a FREE download. Carl Franklin shows off the new refactoring tools in a two part video (part one, part two). The implementation of these tools is impressive. Modal dialog boxes are a thing of the past replaced by an elegant flash-esque interface. The refactoring tools allow you to modify your code without getting in...
Somehow I missed this. I use the Component-based Scalable Logical Architecture (CSLA) to build business objects. We also use CodeSmith for object generation. Developer Cole Shelton has created a CSLA Object Generator that use CodeSmith on the backend to generate business objects. The generator allows you to create multiple objects and you can base your objects on more than one database table. I will be testing this guy shortly.
Cory Smith has developed a VB.Net game Checkers Solitaire. It’s a game of skill involving jumping checkers diagonally over another. It’s free so try it! Via Duncan.Now Playing: Rich Mullins - Ready For The Storm
Recently, I created a custom control that collapses its self. This control was to be round in shape so the background had to be transparent. But when I set the BackColor = Color.Transparent I received this message; “This control does not support transparent background colors.” I felt like Lil’ Jon “WHAT!” After some research I found the solution: SetStyle. The SetStyle method enables or disables certain ControlStyles for a control. So if your custom control needs to use transparency or an alpha color less than 255 use this:
SetStyle(ControlStyles.SupportsTransparentBackColor, True)
Now Playing: Alicia Keys - Karma
I've been prototyping an application for work and had a slight problem. I needed to get the column position of the caret in a RichTextBox. To determine the column position I had to subtract the number of characters in the lines before the caret from the caret character position. The RichTextBox.SelecionStart property gives the caret character position so I'm halfway there. But I couldn't figure out how to compute the number of characters in the lines before the caret. The RichTextBox methods don't give that information. So after some investigation I had to go somewhere where I don't like to go,...
I stumbled across a nice site for the 70-305 Developing and Implementing Web Applications with Microsoft Visual Basic .NET and Microsoft Visual Studio .NET. It takes the preparation guide and matches it up with the proper Microsoft documentation. Nice.
Full Visual Basic Archive