vb6

Outlook Add-In Inspector Window Loading

After experimenting with screenshots of programmatically sized Outlook Inspectors, I've noticed that resizing is not instant. (TakeScreenshot is done programaticcaly by creating a bitmap from the window's device context, then writing it to disk. Version A: Resize, Bringtofront, TakeScreenshot Version B:Resize, Bringtofront, threadslee...

Is it possible to use Netbeans for working on VB6 projects?

I have to work on several VB6 legacy projects and despite some good VB6 plugins (CodeSMART for example) I hate the IDE more an more, especially now where I have the opportunity to work with Java/Netbeans on a new project. Unfortunatly it will stay that way at least the next few years. So I'm asking myself: Can the Netbeans IDE be extend...

Monitoring processes to see if they've crashed in vb6

I've got a program that tends to crash quite often while I'm asleep and I need to keep it running. So I thought I might writeup a vb6 application that monitors the process list, if something disappears it will relaunch it. Anyone know of an easy way? ...

Problem with ssOption control in VB6: Text background color changes from Win 98 to Win XP

I'm using the ssOption control (Sheridan 3d Option control) in VB6. In Windows 98 the text area background color is the same color as the background color around the Option Circle, and that color is the default form color. So the Option button appears to be transparent. There is no Background color property and on Windows XP the back...

Sendkeys in vb6

Just trying to make the enter key pressed after a time delay in vb6, all the examples I find don't seem to be working, any help? Just trying to simulate a keystroke. Focus doesn't matter. ...

How do you deal with visual basic 6 frm and frx files in source control?

This is always a pain no matter what source control system I have used (source safe, cvs, clearcase...) the binary .frx files always cause a problem when merging visual basic forms. I know...I know...why are you using Visual Basic...because there are lots of legacy apps still written using it and although I hate to admit it I actually l...

Visual basic 6.0 hash function

In my application I need to hash a string before I save it to a text file. Does anyone know how to do that? ...

Run-time error 0 when populating a combo box in vb6

Strange error specific to a particular machine... I have a app in which a combo box's text value is set to the path of a document (i.e... cmbAIDFile.Text = clsTonyToolkit.GetSetting("ExportAIDFile",gtypmetadata.gcnnCentral) & "" Forget about all the GetSetting procedure etc, just that it returns a line of text and works fine. This w...

VB6: Capicom Crashes on WinXP

Any suggestions on figuring out this crash? The below code intermittently crashes between logging <part>14 and logging <part>15. Plaintext is a path string (in this case it is "C:\Documents and Settings\Brian\Desktop\Joy\", despite a clear lack of such joy. I have a sinking feeling this is a symptom of some sort of evil memory issue. ...

Generating large sets of random data vb6/vb net

Is there an easy way in either language to generate a large set of random data quickly so far all the functions I've tried haven't worked too well when I need to generate a group of say 500,000 characters :( Any ideas? ...

How can I use GNU gettext with VB6?

I've been using gettext in several private projects and now I want to use gettext to translate strings of a Visual Basic 6 application. I've checked the GNU gettext packages and it seems that I have to write quite some boilerplate code to get it working with VB6 and I fear that my boss won't allow it. Is there some out-of-the box pa...

Why are errors in classes only trapped at runtime?

I have a VB6 class with a method which raises an error: Public Sub DoSomething ... err.Raise 12345, description:="Error message" ... End Sub This method is called from a form: Public Sub ErrTest() On Error Goto err1 obj.DoSomething Exit Sub err1: MsgBox err.Description End Sub This works fine at runtime, but at design...

Using VB6, how do I get the current user and domain on Windows XP?

I need the current user and the domain. I am using a VB 6 application. Thanks ...

ole excel object manipulation causes run-time error '91'

I am maintaining an application that was written in VB6 and makes use of the several OLE controls with Excel.Sheet.8 class objects. Several users are getting the "Run-time error '91': Object variable or With block variable not set" error when they reach a point in code that attempts to manipulate the excel objects. Below are examples of ...

VB6 Program Crashing: Part 2. Advice on fixing Access Violation (0xC00000005)

Related to this question. Any advice on fixing the problem below? After a lot of experimentation with the program, I have discovered several things. It crashes relatively consistently (90% of the time or so) upon running the line of code, Set Message = New CAPICOM.EncryptedData. Note that the line above this is merely Dim Message As...

Concat strings returned from RegQueryValueEx

Hi, I want to read a string value from the registry and concatenate it with another certain string. I'm calling RegQueryValueEx() , like this: Dim lResult As Long Dim sLength As Long Dim sString As String sString = Space$(256) sLength = 256 lResult = RegQueryValueEx(hKey, "MyKey", 0, REG_SZ, ByVal sString, sLength) MsgBox sString & ...

VB6 P&D Installations, "The destination file is in use..."

I am maintaining an application written in VB6 and we currently use package and deployment wizard to create installations for our project. When most users try to install this software they get the error message: "C:\WINDOWS\system32\vbajet32.dll The destination file in in-use. Please ensure that all other applications are closed." Can...

accessing bitmap resources in a C++ DLL from VB6

I have a C++ DLL including bitmap resources created by Visual Studio. Though I can load the DLL in VB6 using LoadLibrary, I cannot load the image resources either by using LoadImage or by using LoadBitmap. When I try to get the error using GetLastError(), it doesnot return any errors. I have tried using LoadImage and LoadBitmap in anot...

How can you force VB6 to use the DLLs and OCXs from the app directory?

I want to put my dependent files in the app directory. I seem to remember that you can force VB6 to use the files in the local directory only. Any hints? ...

Question about CreateObject() in VB6 / VBA

I can do this: Dim fso As New FileSystemObject or I can do this: Dim fso As Object Set fso = CreateObject("Scripting.FileSystemObject") How do I know what string to use for CreateObject? For example, how would I know to use the "Scripting." part of "Scripting.FileSystemObject"? Where do you go to look that up? ...