Duncan Mackenzie has too much time on his hands
-
For various reasons, the biggest being my desire to play around with .Text, I've moved my blog to my own server at http://blogs.duncanmackenzie.net/duncanma following the 3 leaf model when they moved, I thought I should post this notice a couple of times...
|
-
For various reasons, the biggest being my desire to play around with .Text, I've moved my blog to my own server at http://blogs.duncanmackenzie.net
The first post over there shows the app that I wrote last night and then used to copy all of my posts and categories over from this blog to the new location... I'll post the code for that app at some point, as boring as it is...
|
-
I've set up my own little .Text installation and I'm considering copying (not removing the existing versions) posts to my installation so that I still have a visible archive... has anyone done this before?
Happen to have created a tool or script to help the process?
|
-
Recusive GetFiles for DirectoryInfo via a C# Iterator
I have been working on a project using C# Express and so I have been playing around with some of the new C# 2.0 features. In my project I had a need to get all the files of a particular type in a given directory including all sub-directories. The DirectoryInfo class has a method GetFiles that takes a search pattern (ie "*.exe") but it only searches that directory it doesn't search sub-directories. So I figured this would be a good chance for me to play with these new things called iterators. At any rate I wrote a recursive version of GetFiles using an iterator so that I could do a simple foreach loop to get all the files recursively.
Click on the title of the post to read the entire article...
|
-
Every day I get from 1 to 10 emails asking me various VB questions... some I answer by pointing to a link, some by providing code, and sometimes I just point people to the newsgroups or forums that exist for this type of question... but this time I thought I'd just post the question and answer into my blog ...
The Question (edited slightly):
I just want to ask how to make the string in to proper format..
ex...
input.
gerald
this must be the output:
Gerald
and i want it to interactively change when i'm inputing a string in a textbox..
And the answer is to put this code into the TextChanged event of your textbox;
Dim ci As Globalization.CultureInfo = _
System.Threading.Thread.CurrentThread.CurrentCulture
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles TextBox1.TextChanged
Dim pos As Integer = TextBox1.SelectionStart
TextBox1.Text = ci.TextInfo.ToTitleCase(TextBox1.Text)
If pos > 0 AndAlso pos <= TextBox1.Text.Length Then
TextBox1.SelectionStart = pos
End If
End Sub
The key is that the CultureInfo class provides a TextInfo instance, which in turn has a method of "ToTitleCase" on it... This KB article provides more info and also shows an alternate method to achieve the same results (StrConv()).
|
-
Just up...
Andrew W. Troelsen
Intertech Training
Summary: This article explorers the use of Visual Studio 2005 and Visual C# 2005 Express Edition code snippet technologies. Once the reader understands the XML syntax used to represent code snippets, this article examines the process of building and registering custom code expansions with your Microsoft .NET IDE of choice. (21 printed pages)
and up a few days ago...
Andrew W. Troelsen
Intertech Training
Summary: This article introduces programming with the C# language using the Microsoft Visual C# 2005 Express Edition Integrated Development Environment (IDE). Using various example projects, readers will be exposed to several aspects of the C# programming language and key concepts of the .NET platform. (23 printed pages)
|
-
As I discussed in an earlier post, I wanted to know if people found preview articles useful... and at least a few people said they did, so here is another one....
Rotating Is Fun
Summary: Duncan Mackenzie describes the creation of a simple ‘content rotator’ in ASP.NET
Feedback, via the blog or the feedback link at the bottom of the article page, is always welcome!
|
-
Serge Baranovsky, the man behind vbCity, just mentioned to me that they have started hosting blogs... just their staff at the moment, but they have plans to grow... Since vbCity is already one of the best sites for VB developers, this is good news!
http://blogs.vbcity.com/
|
-
The age-old question of 'how do I avoid putting funky Office HTML into my blog postings' came up on an internal email list today, and one of the answers was a pointer to http://stevemiller.net/PureText/, which I had never heard of... but it looks cool!
"Have you ever copied some text from a web page, a word document, help, etc., and wanted to paste it as simple text into another application without getting all the formatting from the original source? PureText makes this simple. Just copy/cut whatever you want to the clipboard, click on the PureText tray icon, and then paste to any application. Better yet, you can configure a Hot-Key to convert and paste the text for you. The pasted text will be pure and free from all formatting."
|
-
|
And maybe the Forums code too... Nothing against www.asp.net, but I'm just thinking it might be interesting to host my own blog... moving seems disruptive though, leaving a large number of my posts here, new ones there.... what do you folks think? Have you thought about hosting your own blog... are you already doing it .... would you never leave the collective?
|
-
One of the nice things about the Updater Application Block is that it was written to be quite extensible... I saw a post today where SamSantiago mentioned he had created a custom class to delete all those old versions on your machine whenever you do an update.... very cool, I'll be trying that out right away...
Personally, I've updated the updater in a few different ways, but the most recent changes have been the most reusable, in my opinon;
- I fixed the code so that it no longer requires users to have admin rights...
- I added a 'mandatory' flag to the updates (and updated the manifestutility in a few different ways), so that for some updates the client app would know not to ask the user if they want to upgrade... great for occasionally forcing everyone up to the same build...
- and I modified the manifest retrieval code so that it can call an ASP or ASP.NET page, which in turn allowed me to create a manifest.aspx page that returns different manifests based on the user's credentials (so I can have a 'beta' group who are given one version, and everyone else gets the last major release...)
I've got to work out a way to get these bits of code online.... it isn't hard, but it takes time that I haven't planned in yet :)
|
-
Soma (whose name you may or may not recognize) is in a position to know a lot about the future of Visual Basic (in his own words, from his intro post... "My name is Somasegar and I run the Developer Division at Microsoft."), so when he decides to post about it, it is probably worth a quick read...
....A couple of the people in that session had some questions for me around our commitment to VB in the .NET world. I was a little surprised by these questions. That made me think more and I wanted to share with you my thoughts on this....
Read the full post here...
|
-
I'm sure I'll be one of many commenting on this, but the recent updates to .Text on this site are a wonderful improvement. For the past while I had been unable to really sift out the good comments from the bad, so real (non-spam) comments to the VB or C# FAQ sites, and to this blog... were all being drowned out by all of the spam. Keeping up with it (to delete the spam) was almost impossible and I gave up some time ago ... We'll see how it goes, but I'm hoping these changes make these blogs sites a less attractive target for spam.
|
-
A couple of weeks ago I posted my "Quick Poll" Coding 4 Fun column in its unedited form... was that useful?
If it was, I can continue to do that with my articles ... basically posting my version of them up in advance onto www.duncanmackenzie.net and then redirecting that to the real article once it ends up on MSDN.
|
-
Blurb copied using the cool "Blog This" link on the ondotnet pages :)
Rapid Application Development with VB.NET 2.0 by Jesse Liberty -- For a couple of years now, Jesse Liberty been touting the Microsoft endorsed-sentiment that it really doesn't matter if you program in C# or in VB.NET, since both are just syntactic sugar layered on top of MSIL (Microsoft Intermediate Language, the true language of .NET). That appears to be changing a bit with Whidbey. Jesse Liberty investigates the new My object in VB.NET 2.0.
|