vb6

Modal forms get in the way of processing

I’m working on an interface in VB6 to interact with a sound editor to automate certain tasks mainly using the editor’s object handles and activating them through SendMessage/PostMessage. In general it works OK, except that the editor has some dialog boxes that open in modal mode and freeze everything on the interface, including the timer...

Best tools to create valid XML files from an Excel file

I need to create a script that extracts some data from a complex Excel 2003 file (with multiple sheets and different tables inside a single sheet) and produces different XML files that need to be validated against a given XSD file. My preferred language is Python; to create and validate XML files i would go with lxml. What do you sugges...

How to prevent GUI (VB6) program from returning control when run from a command line?

There is a VB6 application. It can be run with command line parameters to create some report in a text file. The problem is that when started from a batch file, application returns control immediately, so the following commands start executing. I need these following commands to wait until the VB6 app finishes its work. How to achieve ...

Are folks using the VB6 "Common Controls Replacement Project" controls? Any caveats or showstoppers?

I'm considering using the VB6 Common Controls Replacement Project controls and would like to see what other's experiences with them are. Specifically: What do you need to distribute with them? (I assume just the .OCX file) Do I need to register the .ocx file or just include in the app directory? Do these controls depend on any other o...

How do you verify that 2 copies of a VB 6 executable came from the same code base?

I have a program under version control that has gone through multiple releases. A situation came up today where someone had somehow managed to point to an old copy of the program and thus was encountering bugs that have since been fixed. I'd like to go back and just delete all the old copies of the program (keeping them around is a com...

Multiple ports listed in SQL Server connection string

I have a legacy VB6 app where the servername, databasename, username, etc are defined in an INI file, but the port number for the connection string (the default 1433) is hard coded in the app. It's being moved to a new sql server back end that runs off a different port number. I'm trying to avoid having to alter and recompile the appli...

With which IDE develope in VB6?

Hi, I musst have a IDE vor VB6. I can't use DotNet, because I will not have to install a Framework on a computer in which I will use my application and I know VB.Net, so I decide to VB6 (I am open for other openions). Which IDE do you prefer for VB6? ...

Is using the windows script host, especially the FileSystemObject hereof a good idea?

Recently I have been asked to do some maintenance on a VB6 application. This involves some file IO. I find the IO operations offered by referencing the windows script host and using the FileSystemObject a lot friendlier than the IO operations that come with VB6. But will this cause problems because of security issues, or because of the ...

How to serialize treeview nodes in VB6?

How can we serialize treeview nodes in VB6? I am unable to figure out how to traverse and preserve the relationships between the nodes for serialization. ...

Get the installation path of winzip in vb6

How can I get the path of an application installed in the machine from a VB6 application? For me, I need to get the path for WinZip. ...

How to tell if a DLL function is being called from a VB6 exe?

I have an old VB6 app and I'm not sure which code was used to compile it. One revision of the source makes a call to Sleep in kernel32.dll. Is there a way to find out if the exe calls a specific function in a DLL? I can see that kernel32.dll is linked by using the "Dependency Walker" tool but that doesn't seem to tell me that a specifi...

Is there a way to read an .ini file into memory and then read particular values from it?

I've got a situation where an ini file is in memory (in a string variable) and I'd like to read values out of it without writing the ini file data to disk. UPDATE:This is data that I do not want to write to the HD. I'm downloading it from a web server into memory and then getting some data. Is there any way to do that in VB6? Maybe wi...

Windows 7 UAC manifest file for some VB6 application

Hi, all, I have an old VB6 application which should run on Windows 7 (with UAV set to the default level, 3 of 4 IMHO). It has the functionality to update itself, and Windows 7 is now complaining that it would modify the computer (At least windows 7 is right here). I was able to run it in Vista with some kind of manifest file, but this...

VB6 App + .Net component working as compiled app but not in VB6 IDE

I have a VB6 App that uses a .Net component (via a .tlb reference in the VB6 app) which is working fine when executed as a compiled app, but it produces an error from the VB6 IDE a certain point when it is trying to use the .NET component. I should note that the error occurs when the .NET component is meant to be invoking a third party ...

Weird Excel Formatting

Recently a new co-op was hired at our company and has been tasked to run a report. The report queries the database and returns a resultset and from there procedes to create the spreadsheets. Depending on the number of days selected a different number of reports are generated but I do not believe that is relavent to the question. Basicall...

How to preselect Administrator when running an application using ShellExecuteEx with verb "runas"? (Windows XP)

I have an application which runs another application (mine) using the WinAPI "ShellExecuteEx" with the verb "RunAs" so that the other application should start with "Administrator" credentials. My OS is Windows XP. (Do not bother about other operating system, as I have specific code in place) The only problem with this thing is that the...

Empty Datagrid problem in VB6

Hello Recently, i encountered a problem; when I bind a recordset to datagrid ,and run the application the datagrid is not populated even though recordset has data I use the following code Option Explicit Dim conn As New ADODB.Connection Dim cmd As New ADODB.Command Dim recordset As New ADODB.recordset Private Sub InitializeConnec...

Updating access 2000 database through code in VB6

I have an application that uses an access 2000 database currently in distribution. I need to update one of the recordsets with additional fields on my customer's computers. My data controls work fine as I have them set to connect in access 2000 format but when I try to open the database in code, I get an unrecognized data format error. W...

VB6 Require some help with looping

Hi, I am trying to convert a source from C++ to vb6: C++: static double mdArray[3][3]; static double mdArray2[3][3]; for (i = 0; i < 3; i++) for (j = 0; j < 3; j++) { double sum = 0; for(k = 0; k < 3; k++) sum = sum + mdArray[k][i] * mdArray[k][k]; mdArray2[i][j] = sum } VB6: dim mdArray(0 to 2, 0 to 2) as integer dim m...

Software loading error problem

VB6 & SQL Server 2005 When i run the Windows based Software exe file, it is showing the login page, after login page - no screen is displaying, I checked the task manager, in task manager it is showing as software as running, But there is no page is appearing. Is any firewall blocking or some other issue. But software is running wi...