April 28, 2001

How To Prepare Yourself For Moving From VB6 To VB.NET

In this article, I will make a few guesses of how you canchange your coding style and prepare yourself already today for the transition,to make it as smooth as possible. In the article I will focus on components,especially for the server-side. Moving from VB6 to VB.NET doesn’t seem tobe a

ClearTreeViewNodes – Quickly delete all the nodes in a TreeView controls

Private Declare Function SendMessageLong Lib “user32” Alias “SendMessageA” _ (ByVal hwnd As Long, ByVal Msg As Long, ByVal wParam As Long, _ ByVal lParam As Long) As LongPrivate Const WM_SETREDRAW As Long = &HBPrivate Const TV_FIRST As Long = &H1100Private Const TVM_GETNEXTITEM As Long = (TV_FIRST + 10)Private Const TVM_DELETEITEM

ListViewVisibleItems – The number of visible elements in a ListView control

Private Declare Function SendMessage Lib “user32” Alias “SendMessageA” (ByVal _ hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _ lParam As Any) As LongConst LVM_FIRST = &H1000Const LVM_GETCOUNTPERPAGE = (LVM_FIRST + 40)’ Return the number of items that can fit vertically in a ListView control’ when in

ListViewScroll – Scroll a ListView control horizontally or vertically

Private Declare Function SendMessage Lib “user32” Alias “SendMessageA” (ByVal _ hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _ lParam As Any) As LongConst LVM_FIRST = &H1000Const LVM_SCROLL = (LVM_FIRST + 20)’ Scroll the contents of a ListView control horizontally and vertically.” If the ListView control is

ConvertWordDocument – Convert a Microsoft Word DOC file to another format

‘ Convert a Word-compatible format to an other format.’ Parameters:’ – sFileName is the file to convert’ – wdFormat is the destination file’s format’ – sNewFileName is the destination file. If not specified the the routine ‘ will use the sFileName’s path & name” NOTE: requires the Microsoft Word type

ComboBoxGetDroppedControlRect – Get the size of a ComboBox dropped rectangle

Private Declare Function SendMessage Lib “user32” Alias “SendMessageA” (ByVal _ hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _ lParam As Any) As LongPrivate Type RECT Left As Long Top As Long Right As Long Bottom As LongEnd TypeConst CB_GETDROPPEDCONTROLRECT = &H152′ Return the size and position