Showing entries 11 to 17
« 10 Newer Entries
Displaying posts with tag: VB.NET (reset)
Starting a New Article Series

Several months ago I finished a series of articles on Visual Basic.NET and MySQL. I have decided to start a new series that will focus more on new features of MySQL 5 and Visual Basic 2005.

The first installment is up at this link and will hopefully be the start of a useful series.

Visual Studio 2005 Express Editions are Free (as in beer)

Looks like Microsoft will be offering the express editions of its Visual Studio 2005 products for free* for one year.

The download is available at http://msdn.microsoft.com/vstudio/express/default.aspx

There is a good feature comparison also available at http://msdn.microsoft.com/vstudio/products/compare/

I've done a few quick and dirty VB.NET/MySQL apps with the VB2005 Express Edition, and I find it handy. I will want to get into the VS Professional edition as some point just to play with PocketPC, but for now the Express edition is good for the tinkerer in me.

* For the first year, free as in beer, not speech, some conditions apply, offer not valid in all areas, YMMV.

Connector/ODBC Version 5 Now Available

It is still in Alpha, but you can now download Connector/ODBC version 5 from dev.mysql.com!

http://dev.mysql.com/downloads/connector/odbc/5.0.html

This is a pretty serious rewrite of the old Connector/ODBC, so please take some time to test and report bugs at bugs.mysql.com.

Cancel the Display of a ContextMenuStrip in VB.NET 2005

I encountered a bug recently in my tool where I could right-click on a listview, even if I was not right-clicking on a listview item, and still use the item related entries of a contextMenuStrip. The problem is that unlike the TreeView, the ListView does not allow you to assign a ContextMenuStrip to individual items, just the control as a whole.

The solution was to use the new Opening event of the ContextMenuStrip:


Private Sub eventMenu_Opening(ByVal sender As Object, _
ByVal e As System.ComponentModel.CancelEventArgs) Handles eventMenu.Opening
        If lvwEvents.SelectedItems.Count = 0 Then
            e.Cancel = True
        End If
End Sub

By setting e.Cancel to True, the menu is never shown. I determine whether an item was clicked on by checking the count of selecteditems.

Determine User Idle Time in VB.NET

While working on a new feature for my time tracker, I needed to be able to determine how long a user had been idle using VB.NET (so that if I walked away without punching out, the tool could prompt me and punch me out retroactively upon my return). There are a lot of convoluted ways to do this involving a lot of hooks, but there is a nice LASTINPUTINFO call in User32.dll that can be used to accomplish the task with a minimum of coding.

The only limitation is that the call is only available as of Windows 2000, but that is not a concern for me, and I can just disable the functionality for users of earlier versions of Windows.

I have posted a class I found that takes advantage of LASTINPUTINFO for VB.NET at http://www.vbmysql.com/samplecode/idle-time.html.

Using My.Settings and Data Binding to Create a Configuration Form

Introduction

While working on a new project recently, I have been adding various items to the My.Settings collection, which I documented previously in my VB/MySQL tutorial series. I reached the stage in my application where I needed to add an actual configuration form to my application, and I wanted to create one with as little effort as possible. I found that with the new My.Settings collection in Visual Basic.NET 2005 (aka Whidbey) this was even easier than expected.

About My.Settings

The My.Settings collection is a new addition to VB.NET 2005, as part of the new My. namespace. My.Settings provides an easy way to persist user and application settings in XML without any file manipulation.

[Read more]
So What am I UpTo?

Aah vacation, a time when married men spend 8 hours a day doing the whim of their wife instead of their company. My vacation started yesterday (or last Friday if you count the Canadian national holiday), and so far I have taken in a parade and done little else.

One thing I am working on is a time tracker tool for myself. I wanted something that was simple that I could develop as a practice project which would be of use to me:

In essence it will be a simple Open Source time tracker/punchclock tool. I am using VB.NET with MySQL 5, SQL trees for managing the project hierarchy, and a nice helping of views, stored procedures, and the like.

This should be handy for keeping track of what I do in a given week, where my time goes, and what I have accomplished. So far I can punch in and out of existing projects, and delete events that …

[Read more]
Showing entries 11 to 17
« 10 Newer Entries