vb.net

Is there a simple way to get unique items from DropDownList?

I am trying to grab all unique items from a DropDownList. Is there a simple way to do this? ...

How to detect variable *name* (not type) within a function (Why? For a custom ASP.Net databinding implementation)

So, let's say I have this code (VB.Net): Sub Main() dim xxx as string = "HELLO WORLD" DetectName(xxx) End Sub Public Sub (theVariable as string) dim output as string = "The Value: {0} was stored in the variable named: {1}." debug.writeline(string.format(output, theVariable, What Goes Here????)) End Sub Te output I want ...

vb.net traversing an xls / xlsx file?

is there a simple way in vb.net to load an excel file and read it? perhaps there is a way to load the file but have it not be visible to the user? ...

How do you create a New array in VB.NET?

Possible Duplicate: VB.Net Initialising an array on the fly This maybe a stupid question, but its got me exasperated. How do I declare a new array inline? Is this possible? I've tried all of the following and they all don't work. myVar = {"a", "b", "c"} myVar = Array(3) myVar = Array("a", "b", "c") myVar = New Array() myVar = N...

Are you using the Microsoft Enterprise Library?

In my shop we currently develop what I would consider small to medium sized projects. We have been investigating the Enterprise Library and how it may be able to help us in development. I have particularly been looking at the Logging block and comparing it with Log4Net. It seems to me that the Enterprise Library blocks would be an ext...

Custom Validator validation not firing for textbox.

I have created a custom validator for maximum characters for a multiline textbox in ASP.Net. Below is the code that I am using. <asp:CustomValidator ID="cvPersonality" runat="server" ControlToValidate="txtPersonality" Display="Dynamic" ErrorMessage="*Maximum Characters 200" OnServerValidate="cvPersonality_ServerValidate"></asp...

reading file into an array

i have a text file with the following data: Calculated Concentrations 30.55 73.48 298.25 27.39 40.98 11.21 99.22 33.46 73.99 12.18 30.7 50 28.4 34.33 29.55 70.48 43.09 28.54 50.78 9.68 62.03 63.18 28.4 100 23.83 68.65 10.93 ?????? 31.42 8.16 24.97 8.3 114.97 34.92 15.53 200 32.15 29.98 23.69 ?????? 23.41 33.6 92.03 32....

type conversion from webservice object to class object

hi all, i've created bunch of classes. i have webservices which reference these classes and contains the classes as parameters and return objects. when i call the weservice, i have to convert the class to the webservice object else i can type conversion error. is there a generic way to convert between these types without having to as...

Is it possible to show a selection border rather than back-colour in a DataGridView?

My DGV has row BackColors set to various colours based on business logic. When a user selects the row the colour changes to the selected row BackColor thus obscuring the pre-set colour. I would like to preserve the original colour when a row is selected and indicate selection with (perhaps) a bold border around the selected row. Is this ...

splitting a string

i have the following string: http://pastebin.com/d29ae565b i need to separate each value and put it in an array. typically it would be done by ".split". however i need it to be split in this order: 0, 50, 100, 200, 400 etc.. does anyone know how to do this? please note that i need to do this in VB in other words, i need it to read th...

using regex in vb?

i would like to use the following regex in VB.net: (\d+.\d+)|(\?\?\?\?\?\?) how would i do it? i actually need to edit a string to put it in the specified format ...

Visual Studio 2008: Publish two versions of the same program

I have two slightly different versions of my VB applications that I would like to publish simultaneously. The differences are minimal and mostly include GUI and some internal logic. Incorporating changes into a single application is not an option right now. I tried publishing and installing them separately but the latest installer alwa...

Are Event Handlers processed Asynchronously?

In VB .NET, when you call RaiseEvent X(), is the function that handles the event X processed asynchronously or synchronously. I was under the impression that RaiseEvent and the processing of the event were Synchronous unless created explictly on another thread. I've been told otherwise though. ...

.split removes tabs/spaces in string??

i am trying to split a string up into separate lines with the following code, but for some reason it is also removing the spaces in the string. Dim calculationText As String calculationText = File.ReadAllText(fileName) Dim fields() As String fields = calculationText.Split(vbCrLf) when i am in debugger mode, i look at fields, and ever...

I lost the codes but i still have the exe

Hi guys I made a program using VB and I lost all the codes but I had the exe file how i can extract the codes from the exe ? ...

How to get the names of all resources in a resource file

Within a Visual Basic Project I have added a resource file (resx) that contains a bunch of images. Now I want to query the names of the images. If I open the resx file in the designer view in the Visual Studio IDE and select an image, the property grid shows me a name property (defaults to "filename without extension but can be changed)...

String.Format("{0:C2}", -1234) (Currency format) treats negative numbers as positive

Hi I am using String.Format("{0:C2}", -1234) to format numbers. is always formats the amount to a positive number, while I want it to become $-1234 ...

VB.NET WebCam

I need a WebCam component that is only .net(if it builds on Win API or DirectX its ok) the functions i need are: Preview Select Input device Set Resolution Get a Image ...

What is the tab name when loading XLS file into vb 2008?

I am trying to load an Excel 97 single tabbed spreadsheet into a SQL server table using the OleDbDataAdapter function. From all the documentation I have found, the first parameter should be "select * from [sheet1$]". This works fine for me only if the tab in the worksheet is named Sheet1. If I change what's in the [] brackets to the a...

Convert VB.NET 2005 project to C# 2008 Project

Is there a tool to convert a VB.NET 2005 project to a C# 2008 project. I am trying to convert our project to VS 2008 and mostly port all the vb.NET code in some projects to C# 3.0/3.5. ...