vb6

How to put error handlers in all vb functions

We have multiple vb projects.We want to put error handlers in all functions, and error handler should write to a file.Are there any tools available - we have looked at codesmart and vbwatch. ...

How does one parse an XML document after first validating against a DTD in VB6.

I am attempting to write a XML parser in VB6. The standards that the XML is based off of comes with a DTD to verify the XML before you begin parsing. I have also written a sample XML file so that I have something with which to test. I am able to load the XML via the vb6 code Dim objXMLDoc As MSXML.DOMDocument Set objXMLDoc = New MSXM...

Need to reference a variable using the value stored in a string vb6

I am looping through some code using a For loop. The iterative variable is "i". I have dimensioned the following variables prior to the For Loop. L1, L2, L3, L4 as strings. I want to reference these strings inside the For loop by somehow referring to "L" & char(i). So like a comparison of a value "Foo" <> "L" & Char(i), should result is ...

Are there any good TDD tools or resources for VB6?

Hi Guys, Yea i know i'm way behind times but what i've got here is a antique VB6 editor app which i believe that no one will be upgrading to .NET soon. It uses a couple of third party DLLs tools and as it's still using the good old RichEdit control i basically can raise my own Bug farm with just this tool alone. So enough is enough and...

VB6 Can IsNumeric be wrong?

Is it possible to test a string with IsNumeric() and for it to return true, but when you cast that same string to an integer using CInt() and assign it to a variable of type integer that it will give a type mismatch error? I ask because I was getting a type mismatch error, so I used IsNumeric() to check the string was numeric before try...

using ini file in vb6, problem with path to file

I have read many articles about how to use an INI file within my VB6 project. I don't have a problem with the methods, my problem is how to make the EXE file find the INI file. I don't want to hard code the path in the program. I simply want the EXE to expect the INI file to be present in the same folder the EXE is executed from. When I...

(VB6) Convert a 32bit Long to a String*6 [A-Z].

Hello I wish to convert a 32bit Long to a String*6 which will only use the characters [A-Z]. Using VB6 (don't ask!). I've calculated that a single letter uses 5 bits, so I can get 6 letters out of a 32 bit long. Can anyone give me a pointer on how to do this, as I have no clue. ...

VB6 compilation from command line

Anyone knows how to compile a vb6 webclass dll from a command line? I am trying to build a tool for automating version building, but it fails with an 'Compile Error in File '[file name]', Line xxxx : Variable not defined' alert displayed. ...

What does the Call keyword do in VB6?

There's some code in our project that looks a bit like this: Private Sub Method1() Call InnerMethod End Sub Private Sub Method2() InnerMethod End Sub Private Sub InnerMethod() '' stuff End Sub What's the advantage of doing Method1 over Method2? ...

Which local database fits my situation?

I will be building a set of applications. One of these apps is unattended application (written in VB6) which will write data it receives from various sources to a local database. All the other applications (will be written in VS 2008/c# 3.0) will read this data for mostly reporting reasons. I don't want SQL Server/MySql/Sybase or even...

VB6 Oracle Retrieving Clob into an array

I am trying to retrieve an oracle field with datatype clob into a VB array without reformating the retrieval SQL string (simply SELECT * FROM my_table). I am using an ADO recordset. The clob values are lost when I close the connection or do any other action with the recordset. How can I achieve this. ...

How to find out who's causing an access violation error?

I'm getting reports that my app is causing a GPF on some Vista machines. The error message is something like this: access violation at 0x75784062 ( tried to write to 0x00000006) In order to fix this, I first need to know exactly who is causing this GPF: my main exe, some third party component, one of my own activex components, a dll, e...

Why is my Access database not up-to-date when I read it from another process?

In my application I do the follwing things: Open a Access database (.mdb) using Jet/ADO and VB6 Clear and re-fill a table with new data Close the database Start another process which does something with the new data. The problem is that sometimes the second process cannot find the new data. Sometimes the table is just empty, sometim...

VB6 - How to automatically break compatibility from command line (or msbuild)

We're implementing Team Build and know we need to write MSBuild scripts to build our legacy VB 6 app. It's configured to use Binary Compatibility and we break Compatibility occassionally and we'd like our new automated build process to be able to Break Compatibility automatically. Anyone know how to do this or if it's even possible? Al...

How can I edit a registry key with VB.NET or VB6?

I need to edit a registry key and set the data value to "4" I know how to do it through the command prompt but am trying to find some Visual Basic code to do it. If it helps, this is the key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR\Start ...

Double-Buffering VB6 with BitBlt help

Edit: I updated version 2. Now It's monochrome. I tried to fix it by making sure to call CreateCOmpatibleBitmap with the window's DC rather than the memdc (as written), but it is still wrong :( Below are 3 different simplified versions of functions I have written. Version 1 works perfectly (but has flicker, obviously), version 2 does...

How do I perform my own redraw in the Paint event of a VB6 PictureBox?

A coworker is encountering an error when he tries to run a VB6 app we're working on. The error is, "480: Can't create AutoRedraw image". Microsoft's documentation says this is because "There isn't enough available memory for the AutoRedraw property to be set to True. Set the AutoRedraw property to False and perform your own redraw in ...

How do you calculate the height of the title bar in VB6?

I'm trying to display one form relative to a Button on a control below it. But Button.top is relative to the titlebar of the bottom form, and the top form will be relative to the screen. So, to compensate for that I need to now how tall the titlebar is. I've used Form.height-Form.ScalehHeight but ScaleHeight doesn't include the title ...

How do you Unit Test an .EXE with 3rd party dll?

I'm still learning the dark arts of TDD and recently I've been trying to learn how to do TDD in VB6 and what I basically narrow down the list to was the free simplyvbunit and the most costly vbunit3. My application is an richtext editor with plenty of 3rd party dll and I was scouring high and low in Google to find how to do unit test t...

Should we select VB.NET or C# when upgrading our legacy apps?

At the company where I work, we have a number of legacy apps written in Visual Basic 6.0. Without casting aspersions on the developers who wrote them, suffice it to say we have decided to rewrite the applications from scratch due to several compelling factors: 1.) Lack of documentation. 2.) Lack of exception handling. 3.) Lack of logg...