vb6

Visual Modeler in VS 6

Till date I have used only VB6 Professional for developing apps. But recently I have joined a company which owns VS 6 Enterprise (or some such version) I was just exploring what is available in VS 6 Ent. and I found Visual Modeler. The tutorial provided with it is not good enough. I was wondering if there is any detailed tutorial(s) ...

VB6 IDE is changing the case of my enumeration names

I'm required to maintain a few VB6 apps, and I have run into a weird problem when it comes to enumeration names. The way Intellisense in VB6 is supposed to work is that if my variable name is defined as, say, Dim Abraxis as String, and I type abraxis while coding, the IDE changes it to Abraxis on the fly as I leave the word. However, I...

How can I make mousewheel work in VB6 IDE?

One annoying behavior of the VB6 IDE editor, especially when switching back to it from more recent tools like VS.NET, is that it doesn't recognize the mousewheel! Maybe VB6 was brought out when most mice didn't have one, but is there a way to fix it so it does recognize the mousewheel? ...

How do you make a MsgBox with a "Do Not Ask This Again" or "Don't Ask Me Again" Checkbox in VB6?

I ask this partly because I want to know the best practice way of doing this, and partly because the top google result I got was a forum thread from 2002 in which the question wasn't even answered. I inherited some VB6 code, and there are some MsgBox calls in said code, many of which display messages that end users would probably find v...

VB6 executable icons

I have quite a large VB6 project, with many forms, classes, modules and user controls. When I create a shortcut to the compiled executable and choose "change icon" for the shortcut there are multiple icons that I can select from. This indicates that there are multiple icon resources being compiled into the executable. The first icon is...

How to calculate log of a complex number to a base other than 'e'?

I have this bit of VB6 sliced out of a project I'm working on: Public Function C_Ln(c As ComplexNumber) As ComplexNumber Set C_Ln = toComplex(Log(C_Abs(c)), Atan2(c.Imag, c.Real)) End Function The VB6 Log() function is base-e. I'd like to cook up versions of this to do base-2, base-10 and base-n. Where do I start? ...

Windows 7 & VB Classic Code: Any runtime issues?

Microsoft has promised that VB6 code will continue to work on Windows 7, but has anyone noticed any gotchas specific to running VB6 code in the Windows 7 RC? And for that matter, any issues with COM objects and ActiveX controls outside of VB6? I remember Microsoft saying that they'll ensure THEIR controls continue to work and end it at...

How can I tell what module my code is executing in?

For a very long time, when I have an error handler I make it report what Project, Module, and Procedure the error was thrown in. I have always accomplished this by simply storing their name via constants. I know that in a Class you get the name programmatically with TypeName(Me), but obviously that only gets me one out of three pieces o...

Best way of sending a file to SQL server and save it, then reading it from DB?

Hi I am developing a software with vb6.0 :( . I wanna to know that what the best code for saving a file in SQL server and then reading from it is? I should say that I use ADODB.Stream when saving file..... what is you suggestion? ...

How do I change the font color in VB6?

I have some code that displays values from a record set. If the value is less than 8000, I wish to change the color of the displayed text. I tried this: If (recordset(1).Value) < 80000 Then font.color = &HFFEFEF End If But it didn't work. How do I do it? ...

run-time error '713' - Application-defined or object-defined error

Hi I have a software written in vb6.0 that uses SQL Server.... What causes this error? ...

Legacy VB6 COM+ DLL calling into native Win32 DLL -- threading issues with STA?

Hi all, Come across what looks at first sight like an MT-issue, but I'm trying to understand in detail the STA model used by COM+. Effectively, I have a legacy COM+ component, written in VB6, that calls into a native (i.e., not-COM) Win32 DLL written in C++. Having some intermittant (and impossible to reproduce in testing) problems wi...

A better CDate for VB6

We have a a VB6 app (in a COM component) which uses CDate() to take a string and cast it to a Date, for storing in a database. Depending on if we want the application to talk in dd/MM/yy or MM/dd/yy for example, we have to change the regional settings of the identity user for the COM application. (Right now the only option we have is a...

How do I convert the SERIESSUM function to VB6?

On the Daily Dose of Excel website, written by the late Frank Kabel, there are some formulae which can stand in for ATP functions. Not being an Excel guru, I'm struggling with converting one (so far!) to VB6. (Why I'm doing this I may relate once the NDA runs out.) The problem I'm having is with the code standing in for SERIESSUM, namel...

How to check table exist or not exist

How to check table is there or not? Using VB 6.0 cmd.CommandText = "drop table t1" cmd.Execute Above code is working fine, but if table is not exist then it showing “table does not exit” How to check table exist or table not exist? Need VB CODE help? ...

How to get one record before start date and end date

I want to get one record before start date and end date DtpFrom means – 'date picker from DtpTo means – 'date picker to VB 6 CODE sdate = DateToString(dtpFrom) edate = DateToString(dtpTo) QUERY Where DATE BETWEEN '" & sdate & "' AND '" & edate & "'" I want to get one record before sdate and edate I tried this code VB 6 CODE s...

how to insert record set value in to the table?

How to insert record set value Am having 6 fields in the record set I want to insert into the table? How can I insert. Used Query INSERT INTO table values (recordset (0), recordset (1) ….. recordset (6)) But It showing Undefined function “recordset” Please how to insert record set value in to the table? Query Help? ...

[winapi] Retrieving icons of current user printers

I'm trying to emulate MS Office print dialog's printer selection combobox. The drop-down list contains printer names with large printer icons to the left. On Vista fax printer has a nice fax icon, shared printers are marked, default printer too. Best would be to be able to view some more printer info too, like explorer does viewing Contr...

Stop Visual Basic 6 from changing my casing.

Very simple question that is apparently impossible to find a decent answer to: How can I make Visual Basic 6 stop changing my ^@#*ing variable casing!?! I know that the general opinion of a great many VB users is that this "feature" is actually quite helpful, but I doubt that they use it much with any source control system. This is abso...

When calling Marshal.GetActiveObject( class id here) what would cause error 800401E3 (Operation Unavailable)?

We have a scenario where some .NET code is attempting to access the current instance of a COM (actually DCOM) object. The object being accessed was developed in VB6. A current instance of it is available on the remote system, and appears to be accessed correctly from VB6 code. Attempting to call Marshal.GetActiveObject, specifying the ...