Has anyone got any suggestions for unit testing a Managed Application Add-In for Office? I'm using NUnit but I had the same issues with MSTest.
The problem is that there is a .NET assembly loaded inside the Office application (in my case, Word) and I need a reference to that instance of the .NET assembly. I can't just instantiate the ...
I don't seem to be able to close the OledbDataReader object after reading data from it. Here is the relevant code -
Dim conSyBase As New OleDb.OleDbConnection("Provider=Sybase.ASEOLEDBProvider.2;Server Name=xx.xx.xx.xx;Server Port Address=5000;Initial Catalog=xxxxxxxxxx;User ID=xxxxxxxx;Password=xxxxxxxxx;")
conSyBase.Open()
Dim cmdSy...
In ASP.NET, if I databind a gridview with a array of objects lets say , how can I retrieve and use foo(index) when the user selects the row?
i.e.
dim fooArr() as foo;
gv1.datasource = fooArr;
gv1.databind();
On Row Select
Private Sub gv1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArg...
Is anyone aware of a reasonably well documented example of simulated annealing in Visual Basic that I can examine and adapt?
...
I'd like to know if it's possible to capture the text when a user right-click's on an Outlook message, and then add items to the right-click menu depending on the type of text.
This is an example of what I'd like to do. If there's a message (mail item) with the following content: "Hello, please call me at 555-8474 regarding item A1234...
I am currently using the following code to create a web request:
Dim myRequest As WebRequest = WebRequest.Create("http://foo.com/bar")
Dim myResponse As WebResponse = myRequest.GetResponse()
The problem is that this "locks" up the program until the request is completed (and program will hang if the request never completes). How do yo...
.Net has a lot of complex data structures. Unfortunately, some of them are quite similar and I'm not always sure when to use one and when to use another. Most of my C# and VB books talk about them to a certain extent, but never really go into any real detail.
What's the difference between Array, ArrayList, List, Hashtable, Dictionary, S...
I have a third party COM dll that I'm trying to add to a vb.net (2008 express) project. I put the dll in C:\WINDOWS\system32\ and registered it with "regsvr32 vxncom.dll". When I go to projects > add reference and go to the COM tab it shows up in the list of available components/libraries. But, when I select the library and hit ok, visua...
I have a page in my vb.net web application that needs to toss a bunch of data into a text file and then present it to the user for download. What's the best / most efficient way to build such a text file on a .net web server?
Edit: to answer a question down below, this is going to be a download once and then throw-away kind of file.
U...
Assuming I have only the class name of a generic as a string in the form of "MyCustomGenericCollection(of MyCustomObjectClass)" and don't know the assembly it comes from, what is the easiest way to create an instance of that object?
If it helps, I know that the class implements IMyCustomInterface and is from an assembly loaded into the...
I'm not that up on VB.NET, the application I'm working on was not written by myself.
It works fine through the IDE but once I run it from the exe it gives me the above error.
Any clues?
This is really hacking me off!
...
I have been getting an error in VB.net "object reference not set to an instance of object". Can you tell me what are the causes of this error? thanks..
...
I'm looking to pick up either C# or VB.Net. I'd done a fair bit of VB6 programming in the past.
I'm looking at getting the book, Visual Basic .NET or C#, Which to Choose? but I'm hoping that someone has read it, or used both languages and can offer advice.
Should I just RTFB?
Edit: Anders Sandvig raised a valid question. I'm intend...
Hi
I am writing an application in VB.NET 2008 that manages software deployment and I want to display a "deployment overview" grid.
The grid will be populated with the names of each application (top row) and the name of each workstation (1st column). The remaining cells will be populated according to whether the corresponding software t...
I have a .NET application which has different configuration files for Debug and Release builds. E.g. the debug app.config file points to a development SQL Server which has debugging enabled and the release target points to the live SQL Server. There are also other settings, some of which are different in debug/release.
I currently use t...
I am moving from classic ASP to ASP.NET and have encountered what many of you already know as "viewstate". I might be jumping the gun with my assumption, but it looks highly cumbersome. I have developed many ASP forms in the past and never had issues with keeping state. Is there another way OR am I going to have to learn this Viewstat...
Hello,
I'm looking for a code snippet that can delete all emails and text messages on a Windows Mobile device. Preferably the code would delete items in the Sent and Drafts folders as well as the Inbox.
My platform is Windows Mobile (5.0 SDK) and .net 2.0 compact framework (C# / VB.NET)
Many thanks
...
I need to create a multi-dimensional (nested) hashtable/dictionary so that I can use syntax like
val = myHash("Key").("key")
I know I need to use Generics but I can't figure out the correct syntax using VB in ASP.NET 2.0, there are plenty of c# examples on the net but they aren't helping much.
Cheers!
...
I've created a VB 2008 program to track work requests. It all works perfectly on a VISTA box, but I am having an issue with the program on an XP environment with adding new records.
Basically I've got 2 tabs: TAB 1 holds a datagridview with limited info and a calendar. Selecting dates on the calendar change the info in the datagridvi...
Right now, I have code that looks something like this:
Private Sub ShowReport(ByVal reportName As String)
Select Case reportName
Case "Security"
Me.ShowSecurityReport()
Case "Configuration"
Me.ShowConfigurationReport()
Case "RoleUsers"
Me.ShowRoleUsersReport()
Case ...