vb.net

How to: Programmatically detect if MSXML parser (version 3+) is installed or not

Hi All, Can anyone help me out, how to detect if MSXML parser is installed on a machine or not. I looked for a registry entry,but unable to get one. I am writing a VB.NET application. Thanks in advance :) ...

Get list item value from DragEventArgs

I'm trying to drag a listitem from a listbox onto a picture box. The list item is a persons name. The value member of the list item is the ID of the people listed. When I drop the list item onto the picture box I want to use the persons ID to query a photo and load that photo. I can't seem to access the value though, only the name te...

Why is this blocking? (VB.NET multithreading with events and delegates)

Hello all I have a feature whereby a class in a dll displays a form asking a user to clear a fault on a printer before clicking a button to say "Retry". The users have been just hitting retry without bothering to clear the fault so I am now coding an interlock: The button on the invoked form is disabled until a call is made to an 'enab...

How to extract a particular value from an INI File using a Regular Expression?

I am a bit confused how to best use a Regular Expression and hope I can get some help I want to extract a URL value from an INI File as such: [DEFAULT] BASEURL=http://www.stackoverflow.com/ [InternetShortcut] URL=http://www.stackoverflow.com/ So I can get the URL value as the only Match from the Regular expression - but I don't unders...

What is the vb.net equivalent of the C# “var” keyword

E.g. how do I get VB.Net to statically type a local variable to be the static type of the expression on the right had side of the assignment? ...

Visual Basic program not releasing resource

I have a program written in VB.NET which stops a service that uses file x, modifies x, and restarts the service. I have modified my code for testing so that it just reads in the file as a string and immediately writes it back out. Shell("net stop " & SERVICE_NAME, , True) Dim myReader As System.IO.StreamReader myReader = My.Computer.F...

Check Network Availablility VB.net

I'm writing an application that will be used in a mobile environment where network connectivity will be up/down regularly. How do I check to see that a specific network is available? ...

Can I add buttons with events to a custom treeNode?

I extended treeview, treenode, and nodetype so I could have custom nodes. Certain nodes have image buttons on them allowing them to add a child node or delete the node. I can't handle any of the events from my buttons. Public Class ContentTreeView Inherits TreeView Public Event OnAddChild(ByVal sender As Object, ByVal e As EventArgs)...

64 bit ODBC Exception

I am getting the following ODBC exception when I moved my development platform from Windows XP X86 to Windows 7 X64: ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application What I'm sure it means is that the server it is connecting to is 32 bit, and the comp...

Finding Network Domains Connected in VB.Net

How do I determine which network domain I am connected to from VB.Net? ...

Is it smart to put every small icon in one .NET ImageList control?

I'm developing a VB.NET WinForms application, and I'm using lots of small 16x16 32bit icons everywhere; most of which are nested behind tabs or otherwise invisible. I'm putting all of them in one big ImageList control, it seems easier to manage them from there. My question is, is this smart? I'm using the imagelist even in buttons, and ...

FTP Upload download using dot net 2.0

Need to upload and download files to and from a FTP server Synchronously using vb.net, any sample code will be helpful ...

How to modify windows forms width in Visual studio 2008 using script or command ?

I add two buttons in personalized Control ToolBar, this ToolBar is used in several VB.NET windows forms and some toolbar buttons does not show correctly, the right side buttons are hidden and are very important to show all of them. How I get to modify this windows forms width using a script or VS 2008 IDE macro ? ...

VB.NET Programmatically add code between tags

I have a custom control that does some work for me on async postbacks. Normally, I'd call the control directly from the presentation side using the following code on the ASPX page: <mytag:CustomControl runat="server"> html (or other text) goes here </mytag:CustomControl> However, in my current application, I need to dymanically...

first time I have to create an extension for linq2sql, how to do this one?

I have this one line property Public ReadOnly Property DateToUniversal(ByVal dt As Nullable(Of Date)) As String Get Return If(dt.HasValue, dt.Value.ToString("u").Substring(0, 10), "") End Get End Property if i'm trying to use that into a from n in mydatacontext select new myObj {n.field1,n.field2, DateToUniversal(n....

Save a transformed xml to html

I've got an XML file with XSL, and CSS layers. When I view this in IE it looks exactly how I want it to look. When I try to save the file, I just get the XML document, what I need it a formatted HTML document. I'm using VB.NET 2008, but I'd rather use an external tool, then write more code. I've tried wget and have gotten the same re...

What's the equivalent of VB ReadOnly property in C#?

If I have VB declaration like this Public ReadOnly Property Document() As XmlDocument, what is its C# equivalent? Thanks. ...

change css through vb.net

i hae a style.css file which gives a color the the body of every aspx page, since every page calls that css file. But in 1 page i need to change the color of body through vb.net code. is there a way to do this? ...

Best way to select from a list - aren't the two listboxes getting a little old?

How many times have we seen this type of selector: I was just about to start creating this in a WinForms app, when I thought that others may have some ideas for doing this better. We need it to sort - so the right hand list will need up/down buttons. But this seems so old school. I love devexpress components, and was thinking of as...

How do I get a linq to sql group by query into the asp.net mvc view?

Sorry for the newbie question, but I have the following query that groups parking spaces by their garage, but I can't figure out how to iterate the data in the view. I guess I should strongly type the view but am a newbie and having lots of problems figuring this out. Any help would be appreciated. Public Function FindAllSpaces() ...