vb6

Capturing Ctrl+Shift+Esc Before Task Manager Does

I'm using the Windows API (SetWindowsHookEx) to capture keyboard events. I would like to pass the Ctrl+Shift+Esc combination to my application for processing but suppress Task Manager appearing. Unfortunately, it looks like the three key combination never gets as far as my Keyboard Hook routine; I only ever get two keys. I don't want ...

Is there a JSON parser for VB6 / VBA?

I'm trying to consume a web service in VB6. The service (which I control) currently can return a SOAP/XML message or JSON. I'm having a really difficult time figuring out if VB6's SOAP type (version 1) can handle a returned object (as opposed to simple types like string, int, etc.). So far I can't figure out what I need to do to get V...

Exporting a report from Crystal 8.5 causes the report to first refresh, then export, with unexpected consequences

We have a VB6 application that can generate reports using the Crystal Reports 8.5 runtime. To generate one of the more complicated reports we have, the VB app does the following: Deletes records from a SQL table (we'll call it Foo) based on the session ID of the user Performs a select statement, and populates the Foo table with the co...

"Invalid use of Null" when using Str() with a Null Recordset field, but Str(Null) works fine

I'm banging my head against the wall on this one. I was looking at some old database reporting code written in VB6 and came across this line (the code is moving data from a "source" database into a reporting database): rsTarget!VehYear = Trim(Str(rsSource!VehYear)) When rsSource!VehYear is Null, the above line generates an "Invalid us...

How do you copy VB6 user settings/preferences from one PC to another?

Where are all of the VB6 user preferences (like custom edits to the toolbar, etc.) stored? I'd like to copy all of those from an old PC to my new one. ...

Using the .NET BackgroundWorker from VB6 fails with an AccessViolationException

The following MSDN example promises to demonstrate how to use the .NET BackgroundWorker from VB6 but it fails with an AccessViolationException. The only workaround is to compile the VB6 code as P-code, but that is not a viable option for us. http://msdn.microsoft.com/en-us/library/aa719109(VS.71).aspx Here are lots of details of the p...

VB6 Serial port programming

I'm not much experienced in VB6 serial port programming. I need to control another circuit through serial port. (I have heard that pin 4 and pin 7 are used for that purpose. If these pins are incorrect please tell me what pins are used for such purposes) My requirement is to set those pins to high or low and read their levels(high or lo...

C# and com for vb6

Hi all I have an issue with C# and COM. :( [Guid("f7d936ba-d816-48d2-9bfc-c18be6873b4d")] [ComVisible(true)] [ClassInterface(ClassInterfaceType.None)] public class Process : IProcess { public Process() { } public int UpdateBalance(string accountNumber, string adminEventDescription, decimal curAmount) { re...

Iterate through a VB6 Dictionary

I'm a non-VB6 person who had the misfortune of inheriting a buggy legacy VB6/Classic ASP project. There's a section where a lot of entries are put into a Dictionary and I want to see all it contains. I tried this (oParams is a Dictionary): Dim o As Object Dim sDicTempAggr As String sDicTempAggr = "" For Each o In oParams sDicTempAgg...

Is it possible to read/write classes/structs written in C# from VB6?

I just wonder if that is possible. I know simple types can be read through com interface. Does anyone have experience with complex types as structs and classes? ...

Any way to automatically run some script/EXE when exiting from the VB6 IDE?

I'd like to run a script to do a SVN checkin automatically when exiting the VB6 IDE. Is there any easy way to do that from within the IDE? (I guess I could write a script that launches the vb6 ide, waits for it to exit, then runs the script, but I'm hoping for something simpler). ...

Convert VB6 to C# use NDDE ? help

i have a vb6 code i want to use http://ndde.codeplex.com/ , please help me convert to c# thanks Const TOPIC_SENSOR As String = "SeeLane|Sensor" Const TOPIC_GATE As String = "SeeLane|Gate" Const TOPIC_PIN As String = "SeeLane|Pin" Const ITEM_SENSOR_ACTIVATE As String = "Activate" Const ITEM_GATE_OPEN As String = "Open" Const ITEM_PIN_ON...

How to refactor VB6 code to prevent run-time errors

A VB6 app is experiencing a run-time errors at a variety of places. I know this is the result of poor error handling, but is it possible to analyse the code to see where it is susceptible to run-time errors? ...

If I use a Type Library (.tlb) in a VB6 project, do I need to distribute it with the .exe?

If I make use of a Type Library in a VB6 project do I need to distribute the .tlb file (and perhaps even register it?) with the compiled exe on the target computer? ...

Why does vbkeyup produce different results than vbkeydown does in this Code.

I have a VB6 app which consists of a flexgrid, two command buttons, and a text box. I have code to allow the user to press the up or down arrow key to switch rows in the grid. When the down arrow key is pressed the cursor is placed at the end of the text in the next row, but when the Up arrow key is pressed the cursor is placed in the ...

Avoid Microsoft Office 2000 Installation Prompt When Opening VB6 Project File or Dialog

I suddenly am tasked to debug an old project in Visual Studio 6. My PC setup contains an IME Microsoft Office 2000. Each time I try to open a .VBP file using Visual Studio, a Microsoft Office 2000 Installation CD dialog is shown. I could cancel the installation process but it does get bother some in repeating this again and again. I foun...

If a run-time error occus in a VB6 app, does this mean Error handling has been turned off?

If a run-time error occur in a VB6 app, does this mean Error handling has been turned off by use of the On Error Goto 0 statement? Can this assumption be made? Or are there other circumstances in which a run-time error could occur? If an error has been handled by either a Resume Next or a Goto then surely a run-time error would not oc...

How can I write to the same file without overwriting what is in it (VB6)?

Hey, I'd like to write to a text file to record a set of scores. However, everytime I write to it it overwrites what was originally in the file. Please can someone tell me how to not let it overwrite what is there or how to make it start writing in an empty space. Thank you in advance. ...

Migration of a VB6 application

Migation of a VB6 application to .NET platform is almost like a rewrite, no matter it is VB.NET or C#. Do you think it will require more effort to do it in Java platform, when compared to .NET platform, since it is a rewrite anyway? Please share your thoughts! ...

VB6 ActiveX exe - what is the proper registration sequence?

I have recently updated a Visual Basic 6 application that is an ActiveX exe, running on Windows XP. I have a couple of testers for this application who have received a copy of the exe and are attempting to run it. However, they are getting an error message "Unexpected error;quitting" when trying to do so. A key difference between their...