vb.net

Implement IDispoable in an Interface

I have a situation where I am defining an interface and then using that directly eg: Dim x as IWhatever = new implementationOfIWhatever() Which is fine, but implementationOfIWhatever also implements IDispoable so I want to be able to do x.Dispose or ideally Using x but get the error that that this is not declared or must implement IDi...

Exposing a class through another class with consistent naming in .net

In the pseudo code below, if I have two classes and I want one class to be initialized in the other class without the name having to be different, how would I accomplish this? '==Car.vb== Public Class Car Public Model as New Car.Model() End Class '==Model.vb== Partial Class Car Public Class Model Public Enum Types ...

Line and Points using asp.net chart control

I have data in data table like below. I am trying to make graph like below using asp.net chart control (made graph in excel with some test data) points are X and Y values. lines are linear, exponential, logarithmic and power values. So how can I make this chart in asp.net (vb.net or c#)? I am newbie to chart control. thank you ...

Changing ToolStrip Button Hover Color

Hi Everyone, Is there any easy way of changing the default hover color of a Toolstrip button in Visual Basic.NET ...

Dynamically adding controls to a panel within a data repeater

I have a Data Repeater to which I need to add x number of images depending on their existence in the database. I need the images added within hyperlinks for Javascript functionality. In order to dynamically add the hyperlinks and images I have placed them within a panel in the data repeater and am adding them in the ItemDataBound even...

Is there a way to use default arguments that are the result of a function call in VB.NET?

I have a whole slew of database access functions which assume a particular connection string. Within my application I call myList = DB_MyTable.GetTableItems() and within GetTableItems() I have something like Dim connection As SqlConnection = MyDB.GetConnection So the connection string is in one place in the code, and I call a meth...

Bogus (Yet Crippling) "[WebElementId] is not declared" Error In VB.NET

So I have the error mentioned in the title when I try to build my web site through the file menu. The code that causes this is below (JavaScript that appears in the body tag): if(editedRow != null) { var SundayLoc = $find("<%= FieldOpsScheduler_ctl00_ctl05_RCB_SunLocale.ClientID %>"); ...

LINQ Statement Not Updating Database?

I have the following code: Dim dbHousing As New dcHousingDataContext Dim pullresidents = From p In dbHousing.webResidents _ Select p.dorm_building, p.dorm_room, p.occupantnum _ Order By dorm_building, dorm_room Dim j as integer = 1 Dim previous As String = "" For Each row In pullre...

vb.net vs2010 project deployment problem: eula.rtf is not displayed during application deployment. Any ideas?

I've created a setup and deployment project for my vb.net application using the Visual Studio 2010 wizard. I also added the eula.rtf file to the setup project and set it to install to the user's application folder. I then added a license agreement UI dialog in the setup project and pointed the licenseFile to eula.rtf. However, when testi...

How can I make a TreeNode change the cursor when the mouse hovers over it?

I have created a menu using a treeview to launch forms when the user clicks on a node. To complete the look-and-feel, I have set up the nodes to look like hyperlinks. I'd like to have the cursor change to a hand (like the one you see when you hover over a link) when the user hovers over a node, however so far I've only been able to hav...

[VB.NET/C#] Finding position of an element in a two-dimensional array?

Well simple question here (maybe not a simple answer?) Say I have a two dimensional array [0] [1] [2] [3] [4] [5] [6] [7] [8] Now suppose I want to get the position of the number 6 I know with a one-dimensional array i can use Array.indexOf() but what would my options be with 2-dimensional arrays? Thanks! ...

Create a custom file extenstion in VB 2008

I have been doing a lot of searching on the web and cant seem to find a clear way of creating a custom file extentsion. I know to associate the file extension to a certain program, but how do create a format for the custom file extension? ...

.Net whole application as a single .exe file ?

I have developed some software with no database. I want to create an .exe of my .Net project so I can give only the .exe file to users to use the software. Unfortunately I don't know how to create an .exe of my project in .Net. Does anybody have guidance for this problem? ...

WCF serialization problem, error says type must be marked with DataContractAttribute, but it already is.

Type 'ProblemType' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. See the Microsoft .NET Framework documentation for other supported types. I have a class with very little in it. When I try to serialize the cl...

XAML build error on VB.NET project with controls from external DLL

I'm trying to migrate a WPF Application based on C# to identical project but based writed in VB.NET. I have some problem with XAML Window. The Window have some reference from external dll controls. For example: <Window x:Class="Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas...

data reader in vb.net

Please help, how do I make a while loop equivalent of this for loop. So that I could read from one row in the table of mysql database and display it on the combobox in vb.net. I use this code, but its definitely not useful if there are 3 or more items that are added in the row: Dim i As Integer Dim rdr As Odbc.OdbcDataReader ...

How does dotNet handle parameterised dates where programmatic date has no time but sql date has time

Dreadful title right? Thought I'd see if Stack overflow is quicker than me testing something while I get a thousand interruptions from other work :) I'm updating an old VB net application and trying to refactor some of the logic as I go. The app looks for data from a single date across a few tables and writes that view to a file. Writi...

Shareware vb.net application packed using innosetup, installed in different directories creates 2 different set of application.

I have created an shareware application using vb.net visual studio 2008 for windows desktop, and packaged it using innosetup 5.3.8. The problem is when i have installed the application in C:\Program Files\Application and it runs successfully(use trial period of the application), Im also able to install the application once again freshly ...

Recommended database (such as MDB) type for vb.net?

We're working on a new vb.net project which will need a database with many different tables and possibly thousands / hundreds of thousands of records in each table. Is there a better option than using .mdb files? The obvious benefit of using mdb is we can use Access to view / edit easily as well. We only have vb.net express so I don't t...

How to PROPERLY remove xmln:xsi and xmlns:xsd from xml dictionary serialization

Question: I use a serializable dictionary class, found at http://weblogs.asp.net/pwelter34/archive/2006/05/03/444961.aspx , to serialize a dictionary. It works fine with the example class below. <System.Xml.Serialization.XmlRoot("ccl")> _ Public Class ccl <System.Xml.Serialization.XmlElement("name")> _ Public xx As String = ""...