vb6

VB6: Surely this simple Hex addition is wrong?

I'm getting odd results in some VB6 code which I've narrowed to this: Debug.Print Hex(&hEDB80000 + &h8300) Shows EDB78300 That can't by right can it? Surely it should be EDB88300? Am I going mad? ...

How are these extra error log files created?

One of our clients has been having a lot of network problems lately. When I went to retrieve the errors text file on their server computer I discovered about a dozen files, one was the correctly named file "errors.txt" but the others had names like "errors (computernameA v1).txt" "errors (computernameA v2).txt" "errors (computerna...

Migrate VB6 Data Report to Crystal Report within VS.NET

I am trying to convert a VB6 Data Report (.dsr file) to a Crystal Report through the migration process within Visual Studio. I have read articles that reference adding a Data Report to a Project from Visual Studio 2005/2008 and that it will convert the Data Report to a Crystal Report, but I have not been successful in doing so. Does the ...

Best setup for code promotion and feature branching in Subversion?

We're a 4-person team and haven't been far from our comfort zone in several years, but we're growing and would like to catch up to the times. I have been tasked with finding the best way to implement Continuous Integration (automated builds, branching for code maintenance and new features, etc). We are looking at switching from SourceS...

Converting VB6 PropertyBag in .NET

For certain file operations we use VB6's PropertyBag object to convert various items to a bytearray via the Content property. We then save the bytearray as part of a binary file. Later when we load the file we read back the file, read in the bytearray and reconstitute the item by using the propertybag's readproperty. We use this a lot to...

Can I spawn a synchronous process in VB6 and retrieve its return value?

Is it possible to spawn a synchronous process in VB6 (i.e. calling an external .exe), wait for it to terminate, and grab the return value? We have legacy code (in VB6 obviously) that we need to call a .NET application to perform some complicated tasks, and based on the .NET app's return value, either proceed or fail. Is there a better ...

How do I read the standard output from a child process in VB6?

When creating a process in VB6 (related to this question:), I'm using the following struct: Private Type STARTUPINFO cb As Long lpReserved As String lpDesktop As String lpTitle As String dwX As Long dwY As Long dwXSize As Long dwYSize As Long dwXCountChars As Long dwYCountChars...

What unloads the modules when a vb6 program terminates

The proper way to end a vb6 program is to do something like this : Dim frm As Form For Each frm In Forms Unload frm Next frm end That takes care of forms, what takes care of modules in memory? ...

Get files being deleted in windows

I want to create an application that will save the files being deleted from a flash drive into a part of the flash drive that acts as recycle bin. I want to capture the deletion event of windows so that I can copy the files marked as deleted. Is there a library that would notify my application if the delete event is being executed? If...

VB6 ssTab weirdness

I'm using the ssTab control (that's probably my entire problem) in a VB6 program, and I'm plotting data into a Picturebox located on Tab 0. When I redraw the graph (after a window resize, for example), the first thing I do is clear the box: Picture2.Line (0, 0)-(Picture2.Width, Picture2.Height), RGB(255, 255, 255), BF That works fine...

How to clone an object in VB6

I am trying to automatically clone an object without having to instantiate a new one and manually copy every single variable. I remember back in the day (when I did VB6 everyday) I came up with a method of cloning objects using the PropertyBag, which was pretty cool. But I've lost the code and don't remember how to do it anymore. Doe...

VS2005 C#: Reloading a reference

Similar to coryr (see this question), I am referencing a dll within a C# project. The DLL often changes but I the C# project does not recognize this. Unlike coryr, the DLL is a VB6 ActiveX DLL. Any suggestions for how to reload the reference other than removing and adding it? ...

Alias in Function Declaration overloaded?

I have some VB6 code that I am converting to VB.net and came across this section Declare Function TmSendByLen Lib "tmctl.dll" Alias "TmSendByLength"(ByVal id As Integer, ByRef msg As Any, ByVal blen As Integer) As Integer 'snip' Function TmSendByLength(ByVal id As Integer, ByVal msg As String, ByVal blen As Integer) As Integer TmSend...

Calling .net assembly from vb6 results in runtime error 424

Hi Everyone, I'm running into some trouble calling a .net assembly from vb6 and was hoping SO could help. In VB.net I built a ComClass and kept the default constructor and GUIDs. When deploying, I REGASM.exe the dll, which is located in the same folder as the VB6 exe. The .net dll references two other .net dll's, both of which are ...

What is LenB actually doing on none string parameters

I have this bit of code that is being converted from vb6 to vb.net. I need to know what LenB is doing in this bit of code. Dim singleValue As Single 'var for conversion use(4byte -> 1single)' Dim bytes() As Byte Dim valueB() As Byte 'this gets set elsewhere and is redim-d to its size' For n = 0 To CDbl(ItemNumberCombo.Text) - 1 'bytes...

What is the Best Practice for converting a vb6 standard exe to a activex exe?

Hi guys, i have a legacy massive vb6 editor with plenty of 3rd party libraries and controls and recently there is a need to set it up to make it multi thread so i can run a few other forms independently from the main editor form. Basically there's minimum communication between these other forms and the main editor except for running the ...

Debugging a program that doesn't start.

How would I go about determining why a VB6 (or 5) application doesn't start? I can't attach a debugger to it because of that. I have IDA Pro Freeware at my disposal, but need some pointers as to where to start with it. I don't have the source for this program, only the .exe. When I say it doesn't start, I double-click the .exe, and n...

Visual Basic 6 Tries to Complete Other Application Installs

Visual Basic 6 sometimes tries to install or complete the installation of other applications when it starts up. Why? I've seen this a number of times over the years and it's very annoying. Recently, I installed Business Objects, just the SDK, plus all service packs to 3.5 on a VM and the first time I go into VB6 it says Windows Instal...

Is it possible to use Cruise Control with VB6 ?

Hi ! I'm working on a visual basic 6 project and I would like to use a continuous integration software ... does anyone knows if its possible to use Cruise Control with VB6 ? If not ... is there another software that would do the job ? Thanks ! ...

How to gracefully exit from the middle of a nested subroutine when user cancels?

(I'm using VB6 but I imagine this comes up in most other languages.) I've got a GUI button that calls a routine that takes a minute or two to complete. I want impatient users to be able to click on the button a second time to have it gracefully exit out of the routine at any point. I used a static variable to make this work pretty wel...