Dynamically setting an event handler for a class’ event via reflection
Here it is some code that shows how to use reflection to dynamically set an event handler for a class’ event. Sub TestSub() ‘ create a Person Dim pe As
Here it is some code that shows how to use reflection to dynamically set an event handler for a class’ event. Sub TestSub() ‘ create a Person Dim pe As
If you install a COM+ application proxy on a client and open its Properties dialog, you’ll see that the field “Remote Server Name” is set to the server where you
‘ Return a collection of strings that identify the installed versions of the ‘ .NET Framework’ Note: this function require the EnumRegistryKeys and EnumRegistryValues ‘ functions’ Example:’ Dim version As
‘ EvalFileName ensures that the basename of a file or directory’ conforms to the Microsoft file naming guidelines (see MSDN webpage)’ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/’ naming_a_file.asp” Return value:’ True = Valid basename’ False
Being an avid Access Programmer I have been frustrated with the limitation of VB DropDownLists to using only 1 field as the value. I found a way to simulate/work around
‘ Return the index in a ListControl given a text’ Example:’ Dim i As Integer = GetIndexFromText(ListBox1, “hello”)Function GetIndexFromText(ByVal lst As ListControl, ByVal value As String) As _ Integer Return
‘ Select the ListControl element with a given text’ Example: SelectItemFromText(ListBox1, “hello”)Sub SelectItemFromText(ByVal lst As ListControl, ByVal value As String) lst.SelectedIndex = lst.Items.IndexOf(lst.Items.FindByText(value))End Sub
‘ Select the ListControl element with a given value’ Example: SelectItemFromValue(ListBox1, “hellovalue”)Sub SelectItemFromValue(ByVal lst As ListControl, ByVal value As String) lst.SelectedIndex = lst.Items.IndexOf(lst.Items.FindByValue(value))End Sub
The VB’s MkDir function creates a directory in a specified path. If the directory already exists, MkDir raises error 75 (Path/file access error); yet, it raises the same error code