vb

How do I Refresh Excel whilst Debugging

If I am debugging (in this case a Visual Studio assembly called by Excel) and the code updates the Excel worksheet, how do I get Excel to redraw the current sheet / window whilst paused in the debugger? ...

Converting VB code tied to Access into C# / .NET

Hi, I am facing problems in converting code from VB to C# / .NET. The database backend is Access. Thanks in advance, Mahesh ...

Visual Studio Macro - Code Gen Language

I am writing a macro for Visual studio that will generate some code. I would like for the macro to generate for both C# and VB, is there a way to determine what language is being used in the active (current) document? ...

VB control crashes my app

I am using this - otherwise excellent - vb tab control in one of my c# apps. When the app using it is installed on another machine, Windows tells the user in its usual friendly and descriptive manner that "The application encountered a problem and needs to close". I guess the control has some hidden vb-related dependency, but what can th...

The best way to check if SQL CE is installed, and if so what version?

I've written a VB.NET application that uses SQL CE 3.5. I'm curious if anyone has any best practice or code to help check if A) SQL CE is installed and B) If so, what version. I searched msdn and google for anything but I didn't find anything helpful. I was poking around the registry and found this key: HKEY_LOCAL_MACHINE\SOFTWARE\...

Why would a typebuilder spit out two .ctor methods?

I have a typebuilder that is generating two identical .ctors one that is has no method body and the other that has all the init code. I am defining a field from another type and a property to access the type and therefore need to init it in the .ctor Where should I start looking Code as follows Public Sub ctor(ByVal type As TypeBuild...

Viewing selected columns

Hi all, I'm doing .NET 3.5 programming in VB for a class. I have a .mdb database with 3 related tables, and a table adapter with some queries on it that look like this: SELECT PropertyID, Street, Unit, City, Zip, Type, Bedrooms, Bathrooms, Area, MonthlyRent FROM tblProperties Then in a form i have a DataGridView. What i w...

Updating a Database from DataBound Controls

Hi. I'm currently creating a WinForm in VB.NET bound to an access database. Basically what i have are two forms: one is a search form used to search the database, and the other is a details form. You run a search on the searchForm and it returns a list of Primary Keys and a few other identifying values. You then double click on the entr...

Which .net programming language should I learn as a web developer?

I'm a web developer who is still 'stuck' in the classic asp world. I want to step up to .net but I am unsure of which language to learn - most likely out of VB or C#. Are there any compelling arguments to choose one over the other? ...

Detect whether adobe reader is installed using VB code

hi i want to detect whether adobe reader is installed using VB6. Also if detected that its not installed what would be the best solution. ...

Hide a form's taskbar button without using WS_EX_TOOLWIN

I need to hide a Windows form from the taskbar but I can't use WS_EX_TOOLWINDOW because I need the system menu and min/max buttons on the form's title bar. If I switch the form to a tool window at runtime the form skinning is stuffed up. From searching on the Web I see that VB has a ShowInTaskbar property and I'm wondering if this woul...

Visual basic auto imports namespaces

In C# some of default name space such as System.Collections are listed without typing in using blah. In visual basic, they are not imports for you. Is there a way to force vb to auto imports some of default name space or VB work differently than C#? ...

HOw to create a calendar event / appointment in Exchange Server 2003 without using Outlook ?

hi , Is there any way to create - manipulate calendar events in Exchange Server 2003 ? I'm using Vb .NET 2005. I don't want to use MAPI because everytime I will have to type user name and passwords. Is there any other way ? I used redemption.dll but everytime I want to add for eg a calendar event it displays the login screen. Any sugges...

How do I set up radio buttons in Excel?

I want to use Excel to capture survey results. I want to have a large number of questions each with 5 radio buttons ranging from Excellent to Poor. Each radio button should correspond to a numerical value stored in a set of data cells somewhere (e.g Excellent = 13, Poor = 10, Good = 5 etc). I would like to be able to cut and paste these ...

Handling custom .Net exceptions in COM+ (VB)?

Hi, I'm about to start writing a .Net component which will be called from a VB COM+ service (the new component is a DLL which calls out to a webservice and returns based on the response). I'm not sure how to handle error conditions that might occur in the .Net code in the calling VB. The two types of errors I'm worried about are: exc...

Writing a more efficient clock function.

I have a clock feature in a VB.NET program that displays the time including the seconds. I currently have a timer constantly polling using NOW. I have to poll the system clock quite often because I need to have the second update in sync with the system clock. Is there a more direct to access the time only when the seconds change? Is th...

Editing Web.config programatically

What is a good way to edit a Web.config file programatically? I looked into System.Xml but couldn't find any obvious answers. Incidentally, ctrl-k seems to insert a code sample tag in the input box here. This is a bit annoying as ctrl-k is typically (in Emacs and Cocoa applications) used for killing a line of text. ...

How do I replace text from one file with text from another file using vbscript?

How do I replace text from one file with text from another file using vbscript? The text being replaced is somewhere in the middle of the file. ...

Vb Compile Error expected: list separator or )

Line of code is: BreakDown(Full As String, FName As String, PName As String, Ext As String) As Integer took this from a tutorial so not sure what I'm doing wrong :/ thats a new function if it isn't obvious ...

Going through a text file line by line in vb 2005

So my program needs to go through a plain text file line by line essentially: Read line 1: Do commands loop Read line2: Do Commands loop etc until its done with the entire file does anyone know any good coding examples for this, all the tutorials seem to show open and writing/reading textfiles but nothing on how to do it line by line. ...