This is a follow-up to a previous question I had about interfaces. I received an answer that I like, but I'm not sure how to implement it in VB.NET.
Previous question:
http://stackoverflow.com/questions/239909/should-this-property-be-part-of-my-objects-interface
public interface Foo{
bool MyMinimallyReadOnlyPropertyThatCanAlsoBeRea...
Hi all...
I've a vb.net class that is invoked with a context menu extension in Internet Explorer.
The code has access to the object model of the page, and reading data is not a problem. This is the code of a test funcion... it changes the status bar text (OK), prints the page html (OK), changes the html by adding a text and prints aga...
I'm currently working on a project where a section of the code looks like this:
Select Case oReader.Name
Case "NameExample1"
Me.Elements.NameExample1.Value = oReader.ReadString
....
Case "NameExampleN"
Me.Elements.NameExampleN.Value = oReader.ReadString
....
End Select
It continues on for a while. The c...
I want my WPF ComboBox's ItemsSource property to be bound to MyListObject's MyList property. The problem is that when I update the MyList property in code, the WPF ComboBox is not reflecting the update. I am raising the PropertyChanged event after I perform the update, and I thought WPF was supposed to automatically respond by updating...
In a Visual Basic project, I created a homemade TabControl in order to fix a visual bug. The control works properly, however whenever I modify the form using my tab, Visual Studio adds MyProject in front of the control in its declaration:
Me.tabMenu = New MyProject.MyClass 'Gives a BC30002 compile error
If I remove the MyProject., th...
In VB6 you can do this:
Dim a As Variant
a = Array(1, 2, 3)
Can you do a similar thing in VB.NET with specific types, like so?:
Dim a() As Integer
a = Array(1, 2, 3)
...
Hi,
I'm preparing a class on Visual Basic 2005 targeting Visual Basic 6 programmers migrating to the .NET platform.
My primary concern is to teach my students the best practices for developing in .NET, and I am wondering about whether to consider the use of the VB runtime functions VB.NET legitimate or not.
I have read that many of th...
Hi,
Is there a way to bind a Generic List to a multicolumn listbox, yes listbox...I know but this is what I am stuck with and can't add a grid or listview.
Thanks
...
This is probably a simple question but how can I best use an AJAX loader in ASP.NET to provide a loading dialog whilst the page is being built?
I currently have an UpdatePanel with an associated UpdateProgressPanel which contains the loading message and gif in a ProgressTemplate.
Currently I have a page that onLoad() goes and gets the...
I have a page with 8 Text fields, all these text boxes requires the same rules in regard to accepted characters/invalid characters.
My question is, should I have individual Filtered Text box Extenders for each Text Field or can I have a single Filtered Text Box Extender that I reassign the TargetControl.
Can you do this client side i...
After upgrading a VB 6 based application exposing a COM interface,
COM Clients (in .NET) built against the previous version receive E_NOINTERFACE errors.
The error message (translated)
Cannot convert COM-object of type AProduct.AClass to interface of type AProduct._AClass ...
What went wrong here?
What is the cause of the E_NOINTERFA...
I'm looking for an efficient way of searching through a dataset to see if an item exists. I have an arraylist of ~6000 items and I need to determine which of those doesn't exist in the dataset by comparing each item within the arraylist with data in a particular column of the dataset.
I attempted to loop through each item in the datase...
Is there a way to do this without iterating through the List and adding the items to the ObservableCollection?
...
Edit: This was accidentally posted twice. Original: http://stackoverflow.com/questions/243900/vb-net-importing-classes
I've seen some code where a Class is imported, instead of a namespace, making all the static members/methods of that class available. Is this a feature of VB? Or do other languages do this as well?
TestClass.vb
publ...
I've seen some code where a Class is imported, instead of a namespace, making all the static members/methods of that class available. Is this a feature of VB? Or do other languages do this as well?
TestClass.vb
public class TestClass
public shared function Somefunc() as Boolean
return true
end function
end class
MainCl...
I have two different grid controls on the same form. They share the same context menu. I am having trouble determining which control is the owner when I select the context menu item.
...
Hi,
I am trying to insert a time only value, but get the following error
ex {"SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM."} System.Exception
From the front end, the time is selected using the "TimeEdit" control, with the up and down arrows. The table in SQL Server has the fields set ...
DevExpress has announced a free express version of CodeRush (for C# and VB.Net).
http://blogs.microsoft.co.il/blogs/kim/archive/2008/10/28/coderush-for-free-coderush-xpress-for-visual-studio-announced.aspx
I've read about CodeRush Pro and suspect that it is probably worth the money--but I've always had other things I needed to spend ...
Consider the following code:
Public Class Animal
Public Overridable Function Speak() As String
Return "Hello"
End Function
End Class
Public Class Dog
Inherits Animal
Public Overrides Function Speak() As String
Return "Ruff"
End Function
End Class
Dim dog As New Dog
Dim animal As Animal
animal = CType(dog, A...
When I'm using an If statement and I want to check if a boolean is false should I use the "Not" keyword or just = false, like so
If (Not myboolean) then
vs
If (myboolean = False) then
Which is better practice and more readable?
...