vb.net

Binding one collection to multiple tabs with filters

In my small WPF project, I have a TabControl with three tabs. On each tab is a ListBox. This project keeps track of groceries we need to buy. (No, it's not homework, it's for my wife.) So I have a list of ShoppingListItems, each of which has a Name and a Needed property: true when we need the item, and false after we buy it. So the ...

Creating a DLNA server/service in VB.NET

I would like to create a DLNA server in VB.NET. Since a lot of multimedia devices start supporting DLNA, i would like to see what is possible. Not only streaming video/audio and pictures but see what else can be done. Anybody any starting points? protocol info, some basic code to get started? DLNA is based on UPnP so i geuss that is th...

Using VS 2008 (vb.net) I need to create an object I can use in Classic ASP with CreateObject

I am very new to VB.net. I have written these objects in VB6 before. I'm just lost in VB.net, but (kicking and screaming) I have to learn how to do this. I've been googling for hours with only minor steps forward. Can anyone post a link that explains start to finish how to do this? I have managed to write the class object, What I can no...

Can I write an app in the new version of Visual Studio and make it compatible with .NET Framework 1.1

I am a Web developer who spends 99% of his time in Linux, but I need to develop a super simple application with VB or possibly C# (.Net). The only version of Visual Studio I have is the most current free ones. There MIGHT be a copy of 2001 lying around somewhere. Anyways, the machine I need to develop this for is running Windows NT4. ...

Label Validating Event Not Firing

I wish to use the Validating event on a label in VB.Net (Visual Studio 2005, .Net Runtime 2.0). I have two text boxes side by side. These are for a %/% split allocation, such as 80/20, 50/50, etc. So, I have validation on each box to ensure that their values are >= 0 and <= 100. It is my desire to have the label off to the left of the t...

Best way to show data entry errors

I have created a VB.Net lending application for a cooperative that caters to widows. The application tracks the members' loans and payments, and is also used as an accounting system. In my first release, the users felt that showing a messagebox every time an error occurs is very annoying. My solution is to output errors in a label contro...

How do I set my mouse cursor to the hybrid hourglass and arrow in code? (.NET)

I have a timely operation that runs on a background thread. While running, I currently put the cursor in a wait state: Mouse.OverrideCursor = Cursors.Wait I just implemented a feature that allows the user to click a "Cancel" button if they're tired of waiting. However, some users may not realize they can do this (despite the cancel ...

Converting HDD Serial # VB6 code into VB.NET code

Hey guys, I've got a cool piece of code taken from a VC++ project which gets complete information of the hard disk drive WITHOUT using WMI (since WMI has got its own problems) I ask those of you who are comfortable with API functions to try to convert this VB6 code into VB (or C#) .NET and help A LOT of people who are in great need of th...

How to get a filtererd datatable from a XSL transform

I am trying to run a DataTable through an XSL tranform and then put the results back into a DataTable. My DataTable is coming up empty. Any help would be great. Dim finalExelList As New DataTable Dim xlsMyList = New XPath.XPathDocument(New StringReader(myList.DataSet.GetXml())) Dim trans As Xsl.XslCompiledTransform = New Xsl.XslCompiled...

Is there a VB.net equivalent for C#'s ! operator?

Hi all. After two years of C#, I'm now back to VB.net because of my current job. In C#, I can do a short hand testing for null or false value on a string variable like this: if(!String.IsNullOrEmpty(blah)) { ...code goes here } however I'm a little confused about how to do this in VB.net. if Not String.IsNullOrEmpty(blah) then ...

GridView RowDataBound doesn't fire on postback

On an ASP.NET page, I have a GridView populated with the results of a LINQ query. I'm setting the DataSource in code, then calling DataBind on it. In the GridView's RowDataBound event, I'm selectively hiding links in some GridView fields based on the query results. (For instance, I hide the "Show Parent" link of the row in question ha...

How do I retrieve the properties of a photo taken on a digital camera using .NET?

Preferably in VB.Net, but c# is fine, how can I access the extra properties added to a file by my digital camera, like "Date Picture Taken", "Shutter Speed" or "Camera Model"? ...

How do I create a menu separator bar in WPF using code

I am creating menus in WPF programatically using vb.net. Can someone show me how I can add separator bar to a menu in code? No xaml please. ...

how to pass an event from a child object in a generic list to the parent?

hi, here is my example code: Public Class Parent Private _TestProperty As String Private WithEvents _Child As IList(Of Child) Public Property Test() As String Get Return _TestProperty End Get Set(ByVal value As String) _TestProperty = value End Set End Property ...

Generically typed expression weirdness

The code below gives an error: Property 'Int32 Key' is not defined for type 'ConsoleApplication1.IKeyed`1[TKey]' when the expression e is created but is fine when func f is created, can anyone explain why and if there is a way to fix it? Module Module1 Sub Main() Dim g = New keyedThingGetter(Of KeyedThing, Integer) ...

Good VB.Net 2008/3.5 Reference Book?

I am starting a new job in a few weeks and am going to have to transition from C# to VB. I know that the differences are largely syntactic, but I would love to have a good reference book to help me figure out what those syntactic differences are when I run across them. I've looked on Amazon, of course, but would like to hear if anyone ...

Does VB.NET trash Access databases?

Grasping at straws here... I work with a VB6 desktop system using several 2003-style Access databases (.MDB). Recently, I changed the first function from VB6 to VB.NET, still using an Access database. This is more than a conversion, but a rewrite with additional functionality. It is still fairly simple functionality, with a low-volume...

Use a separate scroll bar for a textbox

I am developing a touch screen application that has to display a possibly large amount of text. The problem I am having is that the default scroll bar attached to text boxes is just too small to be practically used in a touch screen application. I have tried adding a separate scroll bar control and using it to control the scrolling of th...

How do I get a human-readable file size using .NET?

I assume this was already answered somewhere on SO, but I must be looking for the wrong keywords. I'll gladly remove this question if its a dup. If not, let's answer the question here. Example: Take input 7,326,629 and display 6.98 MB ...

How do I find the remote host name in asp.net?

Hi, I used code like this to find the remote user name: banner_label.Text = "Welcome, <B>" + User.Identity.Name + "</B>!" I'd also like to find the remote host name. My production environment will be a corporate intranet with active directory. ...