vb.net

VB.NET 2005 problems with Designer not being able to process a code line.

Hi, I have a problem in my project with the .designer which as everyone know is autogenerated and I ahvent changed at all. One day I was working fine, I did a back up and next day boom! the project suddenly stops working and sends a message that the designer cant procees a code line... and due to this I get more errores (2 in my case), I...

Collection initialization syntax in VB 2008?

I'm trying to determine if there's a way in Visual Basic 2008 (Express edition if that matters) to do inline collection initialization, a la JavaScript or Python: Dim oMapping As Dictionary(Of Integer, String) = {{1,"First"}, {2, "Second"}} I know VB2008 supports array initialization like this, but I can't seem to get it to work for co...

How do I create a folder in VB if it doesn't exist?

I wrote myself a little downloading application so that I could easily grab a set of files from my server and put them all onto a new pc with a clean install of windows, without actually going on the net. Unfortunately I'm having problems creating the folder I want to put them in and am unsure how to go about it. I want my program to ...

VB6/Microsoft Access/DAO to VB.NET/SQL Server... Got Advice?

I can make a DAO recordset in VB6/Access do anything - add data, clean data, move data, get data dressed in the morning and take it to school. But I don't even know where to start in .NET. I'm not having any problems retrieving data from the database, but what do real people do when they need to edit data and put it back? What's the e...

Does anyone have a good example of controlling multiple Excel instances from a .Net app?

We have an Excel 2002/XP based application that interacts with SQL 2000/5 to process fairly complex actuarial calculations. The application performs its function well, but it's difficult to manage. We're trying to create a "controller" application or service that can manage and monitor these various instances of Excel (start/stop/proces...

Silverlight Datagrid Control - How do I stop the sorting on a column?

Continuing my problem from yesterday, the Silverlight datagrid I have from this issue is now causing Stack Overflow errors when sorting a column with a large amount of data (Like the text column that contains a where clause for a SQL statment). When you sort, it'll fire the SelectedIndexChanged event for the datagrid and then still try ...

textboxes in Datarepeater dynamicly 'databound'

I need to know if it is possible to dynamically bind a textbox residing within a datarepeater to a 'dynamically' created BindingSource. I am using VB.net. The database I am using is a MySQL database. I have to use the connection dynamicly due to the fact that the database my not permanently reside on the same server. [edit] ok, so ...

What is the best C# to VB.net converter?

While searching the interweb for a solution for my VB.net problems I often find helpful articles on a specific topic, but the code is C#. That is no big problem but it cost some time to convert it to VB manually. There are some sites that offer code converters from C# to VB and vice versa, but to fix all the flaws after the code-conversi...

Track installs of software

Despite my lack of coding knowledge I managed to write a small little app in VB net that a lot of people are now using. Since I made it for free I have no way of knowing how popular it really is and was thinking I could make it ping some sort of online stat counter so I could figure out if I should port it to other languages. Any idea ...

How does a program ask for administrator privileges?

I am developing an application using vb.net. For performing some tasks the application needs administrator privileges in the machine. How to ask for the privileges during the execution of the program? What is the general method of switching user accounts for executing an application? In other words, is there some way for an application ...

How does a program ask for administrator privileges?

I am working on a small application in VB.NET. The program needs administrator privilege for doing some tasks. Is there a way to ask for administrator privileges during the execution if the program? What is the general way of changing the user account under which the application is running? ...

Can you register an existing instance of a type in the Windsor Container?

In the Windsor IOC container is it possible to register a type that I've already got an instance for, instead of having the container create it? ...

How do I get my C# program to sleep for 50 msec?

How do I get my C# program to sleep for 50 milliseconds? This might seem an easy question, but I'm having a temporary brain failure moment! ...

Mercury Quick Test Pro and Virtual machines: Works from one client machine but not another

I have a virtual machine (VMware) with Mercury Quick Test Professional 9.2 installed. I have a script to test an application, written in VB.NET using the Infragistics library. If I access this virtual machine using my laptop (using Remote Desktop), everything works fine, the script completes without a problem. My laptop runs XP, with Wi...

How to wrap an existing memory buffer as a DC for GDI

I have a memory buffer corresponding to my screen resolution (1280x800 at 24-bits-per-pixel) that contains my screen contents at 24bpp. I want to convert this to 8-bpp (ie. Halftone color palette in Windows). I currently do this: 1. Use CreateDIBSection to allocate a new 1280x800 24-bpp buffer and access it as a DC, as well as a plain me...

HTTP GET in VB.NET

What is the best way to issue a http get in VB.net? I want to get the result of a request like http://api.hostip.info/?ip=68.180.206.184 ...

Converting large ASP.NET VB.NET project to C# - incrementally?

Was looking for some approaches to incrementally converting an large existing ASP.NET VB.NET project to C# while still being able to deploy it as a single web application (currently deployed on a weekly basis). My thoughts were to just create a new C# ASP.NET project and slowly move pages over, but I've never attempted to do this and ...

Return to an already open application when a user tries to open a new instance

This has been a problem that I haven't been able to figure out for sometime. Preventing the second instance is trivial and has many methods, however, bringing back the already running process isn't. I would like to: Minimized: Undo the minimize and bring the running instance to the front. Behind other windows: Bring the application t...

How do I modify a ReadOnly Linq property

I have a LINQ to SQL generated class with a readonly property: <Column(Name:="totalLogins", Storage:="_TotalLogins", DbType:="Int", UpdateCheck:=UpdateCheck.Never)> _ Public ReadOnly Property TotalLogins() As System.Nullable(Of Integer) Get Return Me._TotalLogins End Get End Property This prevents it from being changed e...

VB.Net (or C#) 2008 Multi Threaded Import

I am looking to build a multi-threaded text import facility (generally CSV into SQL Server 2005) and would like to do this in VB.NET but I am not against C#. I have VS 2008 trial and just dont know where to begin. Can anyone point me in the direction of where I can look at and play with the source of a VERY simple multi-threaded appli...