What is ExcelHelper? I am guessing the the bug is in its TerminateExcel function. I am going to guess this is uesd to get around the issue with COM Reference counting. For a full explanation take a look at this Microsoft Knoledge Base Article Office application does not quit after automation...
It sound's like that shouldn't be happening. You should be able to open two separate Excel files at the same time and not have them interfere with each other. How exactly are you opening and closing the files? Would it be possible for you to give us a couple of short code snippets?
Given that there a a huge number of ways the excel file could be open before your open file dialog is run I don't think blocking the open menu item is going to solve your headaches. The best thing to do is to check if the file is already open when you open it and display a dialog to the user...
It goes something like this assuming a table with three columns called ID, Column1 and Column2:
Try
connection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\db1.mdb")
connection.Open()
Dim command As New OleDbCommand()...
The only thing you seem to get from using the GAC is a reduction in hard disk space when multiple applications use the same dlls. But why bother when 100Gb disks are so cheap.
On the flip side with the GAC you get a big headache when it comes to deployment. Using the GAC you can no longer...
There are lots of possibilities for this. Can you tell us what your application is going to do? It might give us a clue as to what the appropriate answer to this is.
...engine to do a little less work than using replace.
function test()
{
var input = "FAX: 111.222.3333";
var re = /FAX:.*(\d{3}.\d{3}.\d{4})/;
var match = re.exec(input);
var s;
if (match != null)
s = match [1];
else
s =...
I assume you are using a System.Windows.Forms.Timer control. This control uses Windows Messages to launch the Tick event and as such the tick will always be on the UI thread. To get each tick to be on a separate thread you would do the following but be warned if the UI thread is busy when the...
It may be that your connection to VSS is a touch slow, or your solution is very big. What is happening is that Visual Studio is doing its status checks in the background. This enables you to get working on your project quicker because you don't have to wait for the status checks to be performed...
I've just noticed something rather annoying about custom error pages. Wanting to show users a nice message when they try to load a non-existent aspx page I set my web.config up like this:
<configuration>
<configSections>
<system.web>
<customErrors mode="On"...
I'm developing a photo sharing application and I have a requirement to allow users to upload multiple files to a database (50-100 at a time). The target market is a bit specialist and has a high proportion of Mac users so I'm looking for a cross platform solution so ActiveX is a non-starter. I...
Did you write the exe? The best thing to do is to make the exe do the database upgrade when it first runs. Then all you need to do is deploy a new exe to the program files dir.
In short the comments should be on both.
The interface should detail what someone that implements the interface may want to know and the class should details things specific to that implementation. So the exceptions should only go on the class. You may want to put something in the interface's...
Inheritance just to include generic library functions? No! Don't do it!
In answer to your question, putting static library functions in a separate class does not break encapsulation at all. The idea of encapsulation is that when you are looking at code in a class you can see all the points...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.