vb.net

Can VB.NET read XML or can't it?

Question: Using VB.NET/C#, is it really not possible to read the below XML in a dataset without significant work ? I tried oDataSet.ReadXml(strFileName)<BR> and Dim oDataSet As System.Data.DataSet = New System.Data.DataSet Dim strLocation As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) strLocation += Sys...

heDynamically Creating Check box

i am creating check box's dynamically and assigning them names like "chk_1" and "chk_2". now if later in my code i want to check if they have been checked how can i do that. if i do something like if chk_1.checked is True then i am getting error that chk_1 is not declared. Which is true. am i making sense?? i am using VB.net 2.0 i c...

Read XML in VB.net

Guys I'm dying here. I have googled for the last hour or so with no luck (I'd like to think I'm a great googler too!), so here I am. I have an XML file that I'm using for my programs settings, it looks like so: <?xml version="1.0" encoding="utf-8"?> <config> <store> <number>0323</number> <address>address</address> ...

Change API Reference at runtime VB.NET 3.5

I'm writing an application for a device running Windows XP. There are 2 versions of the device and each version has its own API to communicate with the device's software. The application I'm writing needs to pull the same data from the API. My question is how to write a application that will detect at runtime which version of the device ...

Linq To Sql: writing a query for a column named with two words

I'm trying to make query in a table that has a column named "First Name" dim info = from md in employees _ where md!first name = "test" How can I use the field "first name" in this query. I've tried \"first name\" and ""first name"" but neither works. ...

Reading characters off of the screen

I've been trying to find a solution to my problem for quite a while. I need to build a program that reads data off of the screen, recognizes characters and images and then acts based on what characters and images are. For example, I provide it with a picture of a dog, a picture of each possible character, and it would be able to read the...

Inheriting from DataSourceControl does not produce an IDataSource

I am trying to create a custom datasource control. I have been following this article to the letter (I think...). I have a skeleton / basic implementation of my datasource, however when I declare it in the markup and try to statically bind it to a gridview, I receive the following error: The DataSourceID of 'grdVw' must be the ID o...

Need to convert an object to XML and getting an error

I have this class: <Serializable()> _ Public Class Bonder ''' <summary> ''' General information ''' </summary> ''' <remarks></remarks> Public BonderName As String Public Serial_Number As String Public System_Type As String Public DM_Version As String Public RTS_Build As String Public RTS_Lab...

Interface Inheritance: Method does not show up!

I've got an interface inheritance issue that has been vexing me for some time. It doesn't seem to make any sense, and I can only conclude that I'm missing something fundamental. Overview The code below is from part of a fluent interface for our ORM tool. It provides a SQL-like syntax for pulling data from the database. You don't have t...

How to avoid using Enums?

Until asking a question on here I never considered (enums) to be a "bad thing." For those out there that consider them not to be best practice, what are some approachs/patterns for avoiding their use in code? Edit: public Enum SomeStatus Approved = 1 Denied = 2 Pending =3 end Enum ...

Remove another program's frame/window/border (the Aero bit) using VB.NET

Is there a way to remove the border/frame (the Aero bit) of another application's window (say notepad) from a VB.NET program? ...

Join Array Of Integers

What is the simplest/best practices way to get a comma separated list of the integers in the Integer array levels? Dim levels(5) As Integer Dim levelsStr As String 'put values in levels' 'Attempt 1: Failed' levelsStr = String.Join(", ", levels) ' <- Error on levels' 'Value of type "1-dimensional array of Integer" cannot be converted' ...

What is wrong with this loop

I'm using a loop condition to check if there is null value in the columns, then remove it. -Original author [STart:] For i As Integer = counter To dt1.Columns.Count - 1 For x As Integer = 0 To dt1.Rows.Count - 1 if some condition then something = true else something = false ...

How do i Copy an Object thats inherited from the Object im trying to copy from?

Writing an asp.net mvc app and i have something like this... Public Class AA '... has some variables... End Class Public Class BB Inherits AA Public ExtraVariable As Integer ' just adds another variable and thats it! End Class So, now in my program, i just want to copy object of type AA to an empty variable of type BB? it makes sens...

Overriding Events in VB

Is there a way to translate this code in VB? Most of it is easy, but I can't figure out a way to override the event handler. public class MTObservableCollection<T> : ObservableCollection<T> { public MTObservableCollection() { _DispatcherPriority = DispatcherPriority.DataBind; } public MTObservableCollection(Disp...

Connecting to a Online MySQL Database using VB.Net

I've searched around and haven't been able to find anything along the lines of doing this. ...

RefreshProperties attribute at class level in .net, winforms + incorrectly refreshing property grid

I had a strange problem editing a class in the property grid whereby the property grid would refresh incorrectly. I managed to reduce the problem down to a class with just two properties. I've included the code at the end to ease explanation. It basically boils down to a class with two properties. The first of which is expandable (a fo...

how can i imitate zhider (hides any windows app)

how are they doing the hides ? http://www.zinious.com/products/ZHider/ like it can hide any window programs from showing up in taskbar and system tray. how can i do this programmatically in vb6, .net , c++ ? are there other similiar tools to zhider ? open source ? thanks. ...

C# Book or Resource for VB.Net developers?

Bascially, i'm looking for a book or resource to learn C#, given that i already know VB.NET and have known for years. What I'm Not looking for: Now, just to be clear, i'm not looking for VB6 to C#.Net content, as i know there are a few of those out there. Also, I know about that "syntax\conversion table" website, where it compares VB....

Autocomplete Search Component for TextBoxes in ASP.NET

I'd like to use a component similar to the Tags autocomplete component used by Stack Overflow in my ASP.NET 2.0 application. What can I use? ...