The following function will return a list of all subclasses inherited from a given class. Please note, that it works only within a single assembly, same as which holds the given superclass. 1 2 3 4 5 6 7 8 Function FindSubClasses(Of TBaseType)() As IEnumerable(Of Type) Dim baseType = GetType(TBaseType) Dim […]
Continue reading…
Posts tagged with 'VB.Net'
How to create an object by class name using Reflection
1. When the class is defined in the same assembly, where your code is executed: 1 2 3 4 Dim _assemblyName As String = "MyAssembly" Dim _typeName As String = "MyNamespace.ExampleControl" Dim _type As Type = Assembly.Load(_assemblyName).GetType(_typeName, True) _control = Activator.CreateInstance(_type) Dim _assemblyName As String = “MyAssembly” Dim _typeName As String = “MyNamespace.ExampleControl” Dim _type […]
Continue reading…
How to dynamically generate SSRS Report
SSRS is a wonderful tool for quickly retrieving data and presenting it to the user in a format predefined at design-time. But what if there is a need to create a new report at run-time, based on some dynamic data structure or any specific user needs? Of course, for advanced business users Microsoft Report Builder […]
Continue reading…
How to handle Keyboard Focus Events globally in WPF
You will find quite a few cases when your application would need to handle the changing of keyboard focus globally at application level, not just on a single control element or even a form level. The simple adding listeners to all possible elements will not be an effective way and doesn’t guarantee you to have […]
Continue reading…