vb6

How can I get the name of a Visual Basic control given its HWND?

I'm working on a little macro record/replay tool which can automate a few very old Visual Basic 6 GUIs we have. To do so, I'm identifying the controls by their name (the value of the name property of a control, that is). One part of this tool needs to determine the name of a control given its HWND. For newer Visual Basic applications wh...

"not enough storage is available to complete this operation" error on stream.read

I have a dll with following code: `Dim x As ADODB.Stream Dim strmAssembly As ADODB.Stream Dim strmReturnStream As ADODB.Stream Dim alLengths() As Long Dim abyteData() As Byte Set x = New ADODB.Stream x.Type = adTypeBinary x.Open Set strmAssembly = New ADODB.Stream strmAssembly.Type = adTypeBinary strmAssembly.Open Set...

Stack Trace in VB6

Is it possible to get the stack trace information in Visual Basic 6.0. I mean I want to find out the function name and exact line that causes the error similar to .NET stack trace. I have created an ActiveX DLL which works fine in my test environment but it throws an error in production environment(error : 91-Object variable or With bloc...

Internal allocation VB

Let's say I have any array Trial() As Integer I have two following variables defined as Integer: Dim Left As Integer Dim Right As Integer Now I am increasing the array index of trial ReDim Preserve Trial(Left+Right) Now If My total (Left+Right) exceeds Integer limit the above will give error. And if redeclared Left as Long then...

VB6 Package and deploy setup ask system restart

hi, I found Vb6 tools package and deployment. I used it and created a package or setup file from my running vista operating system. Later when i tried deploying it in clients computer with winxp, it asks for update of system file and ask to restart. The process never ends just ask for update and restart. how should i create setup file t...

Why can I access a WSDL file from a browser, but not from application?

We've having trouble deploying a web service that works in our development environment, but not in production. Part of the problem is that our production servers are load-balanced, so to upgrade one of the servers, we have to take it out of the load-balance and try to test the sever in isolation, which is a challenge. The computer I'm ...

Debugging VB6 in VS2008 with non-VB6 objects

Hi there, I have an exe in Csharp that references a C++ dll and a VB6 dll. I can successfully step into the C++ from the Csharp in Visual Studio 2008 when I open the corresponding files. I achieved the same ability to step into the VB6 from the Csharp by generating a pdb file along with the VB6 dll. The only issue I have is that when ...

Display Image from Windows Folder in Crystal Reports 8.5 or 9

I am Storing unique Picture name in database. In Picture folder same name is applying for picture also. I need to load picture from the picture folder with respect to the name stored in database. Is it possible? ...

VB6 getting ride of large spaces

Hey all, i am trying to replace large spaces between text with just one. My output looks like this right now: 5964215"> This is just the first example of the spaces 5964478"> This would be the 2nd example of showing how many spaces this thing has in each sentence. 5964494"> That comes from a textbox that has ...

How have you dealt with the lack of constructors in VB6?

VB6 class modules have no parameterized constructors. What solution have you chosen for this? Using facory methods seems like the obvious choice, but surprise me! ...

VB6 mySQL update problem

Hey all, i am having a weird problem with trying to update a record in my mySQL 5 database using VB6. This is my code when i log in: connDB Set rst = New ADODB.Recordset strSQL = "SELECT id, fName, lName, theCode, theDate, clockin FROM clockinout WHERE theCode = '" & theUsersUniqueID & "' AND theDate = '" & Format(Now, "YYYY/MM/DD") &...

C#: Properly disposing C# objects when created via COM Interop from VB6.

Im writing a C# class library component which is going to act as a TCP server. It will listen for and receive XML via a specific port, deserialize it and then raise events containing the resulting object as an event argument. The class library itself will be consumed by a VB6 application which will receive and handle the events and asso...

VB6 Exception Handling within the calling procedure

I have two procedures procA and procB. procA is calling procB. An exception occurs within procB. I can handle the exception within procB, but i like to handle it within procA and this is what i did not get to work. I'm not very familiar with VB6 but i think this should be possible because MSDN says: If an error occurs while an error...

How are new instances of IE NewWindow created on the parent form from within a custom usercontrol?

I am trying to create an IE replacement browser ActiveX (usercontrol) in VB6, through pure coding. In simple terms: I am trying to open additional instances of the browser window (overlaying the existing window) when a link is clicked - without using a visible tabstrip control. I plan to control the arrayed windows (possibly multiple l...

Changes to a dialog wont appear when i run it in Visual Basic using VB Editor 6.0

hi guys, I have this huge VB project which i just got from some one. i want to add a check box to a dialog in it so i opened Main2.frm and added a check box using ide. but now when i run the application the dialog resized to its orignal size hence not showing the new check box which is at the bottom. I know that this means somewhere in t...

vb6, ZPL, socket printing

Hi there, I have done this programming in java and it works but can't make it run in vb6 (and I need to) Basically I need to send data to zebra printer over the network. The whole process works (no error reported but the printer does not print. In Java I have used: public void printOnions(ArrayList<String> DataArr){ // LH is x...

JNI_ENOMEM from JNI_CreateJavaVM when calling dll that uses JNI from VB6

I work on a legacy system that has a VB6 app that needs to call Java code. The solution we use is to have the VB app call a C++ dll that uses JNI to call the Java code. A bit funky, but it's actually worked pretty well. However, I'm moving to a new dev box, and I've just run into a serious problem with this. The built VB app works fi...

Calculating wage by hours worked

Hey all, i am trying to figure out how to calculate the wage for an employee when they clock out. This is the code i am currently using: Dim theStartTime As Date Dim theEndTime As Date Dim totalTime As String theStartTime = "16:11:06" theEndTime = "18:22:01" totalTime = Format(CDbl((theEndTime - theStartTime) * 24), "#0.0") So ...

traceroute ipv6 using vb6

Hello guys, Am trying to do traceroute using vb6, but don;t have any idea. Am thinking of using dos to do the job, and then capturing the output of dos in my app another idea is converting the address from ipv6 to ipv4 and the do the trace route in case teh hardware doesnt support ipv6 any ideas? ...

What is the advantage in reducing variables in vb6?

Hi, I have a code written in VB6. There I have some variable which can be removed by some code manipulation? Is there any advantage of removing one or two extra variables? ...