Questions tagged [vb6]

Visual Basic 6.0 (VB6) was the final COM-based version of the VB programming language and IDE, last updated in 2004. It is the predecessor to the modern VB.NET.

Visual Basic 6.0 () is the third generation event-driven programming language and integrated development environment (IDE) from Microsoft for its COM programming model. It is also considered a relatively easy programming language to learn and use, because of its graphical development features and BASIC heritage.

The final release of the COM-based Visual Basic was version 6 in 1998. It was last updated in 2004 through Service Pack 6.

  • The designated successor language is . For things like writing COM addins for Microsoft Office you would use or .
  • Support for the VB6 IDE ended on April 8th, 2008.
  • The runtime is supported as part of Windows Vista, 7, 8, 8.1 and 10 and Windows Server 2008, 2012 including R2 and 2016.

Resources:

10799 questions
25
votes
9 answers

Will Windows 7 support the VB6 runtime?

I can't seem to find a straight answer on this. It appears that Visual Studio 6 won't be supported, but I'm only concerned with the runtime. We have some legacy apps that we'd rather not rewrite, but our customers will expect them to run on Windows…
Jon B
  • 51,025
  • 31
  • 133
  • 161
24
votes
4 answers

Debug Mode In VB 6?

How can I do something similar to the following C code in VB 6? #ifdef _DEBUG_ // do things #else // do other things #end if
Nahum
  • 6,959
  • 12
  • 48
  • 69
24
votes
4 answers

C/C++ 'continue' Equivalent in VB6

Is there a VB6 equivalent to the C/C++ 'continue' keyword? In C/C++, the command 'continue' starts the next iteration of the loop. Of course, other equivalents exist. I could put the remaining code of the loop in an if-statement. Alternatively, I…
Steven
  • 13,501
  • 27
  • 102
  • 146
24
votes
4 answers

What is the difference between VB and VB.NET?

What is the difference between VB and VB.NET? Explanation with examples is preferred.
user287745
  • 3,071
  • 10
  • 56
  • 99
23
votes
5 answers

How to convert char * to BSTR?

How can I pass a char * from C dll to VB Here is sample code: void Cfunc(char *buffer,int len) { BSTR buf_bstr = SysAllocString((BSTR)buffer); VBptr.VBfunc(buf_bstr,len); } This function is not working, In actual some other values are sent to…
Joseph_blr
23
votes
4 answers

What does "DoEvents" do in vb6?

What does "DoEvents" do in vb6 ? Why do I get the error message "Out of stack space" ? What does it mean ?
faressoft
  • 19,053
  • 44
  • 104
  • 146
23
votes
3 answers

Get/post to RESTful web service

I need to do some GETing and POSTing to a RESTful web service from VB6. What is the best and simplest way to do that?
23
votes
3 answers

How do you deal with Visual Basic 6.0 frm and frx files in source control?

This is always a pain, no matter what source control system I have used (Visual SourceSafe, CVS, ClearCase, etc.). The binary .frx files always cause a problem when merging Visual Basic forms. I know...I know...why are you using Visual…
Andy Slater
  • 231
  • 1
  • 2
  • 4
23
votes
9 answers

How to migrate ugly and undocumented VB6 Code to .NET

I know that there are already Questions about VB6 migration, but the code base of my project brings some new questions here. I have to say the Code quality, structure and architecture is just a nightmare. There are 2 Big Projects: Nr.1 with 40…
marcus
  • 231
  • 2
  • 4
23
votes
12 answers

Using colons to put two statements on the same line in Visual Basic

Is it considered bad practice to use colons to put two statements on the same line in Visual Basic?
Kyle
23
votes
1 answer

How can I pretty-print XML source using VB6 and MSXML?

I've been looking after this for months now and I mostly found sites asking the same question. The answers I did found were always for .NET or C++ or involved XSLT.
Daniel Rikowski
  • 71,375
  • 57
  • 251
  • 329
22
votes
2 answers

Are array indexes 0-based in VB6?

I'm reviewing an automatic translation of VB6 code to C# and the convertor translated someArray(3) to someArray[3]. But accordingly to the old code documentation it should pick the third element not the fourth as it is doing in the translated…
Jader Dias
  • 88,211
  • 155
  • 421
  • 625
22
votes
4 answers

VB6 overflow error with large integers

I am trying to set an integer value as such: Dim intID as integer intID = x * 10000 This works ok when x is 3 or less. But when x is 4, this gives me the error: run-time error 6 Overflow I don't understand why this is. I can set intID to 40000…
Urbycoz
  • 7,247
  • 20
  • 70
  • 108
22
votes
4 answers

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

VB6 classes have no parameterized constructors. What solution have you chosen for this? Using factory methods seems like the obvious choice, but surprise me!
Dabblernl
  • 15,831
  • 18
  • 96
  • 148
22
votes
4 answers

How does Windows decide whether to display the UAC prompt?

In my VB6 application I open other EXE files. My application runs without any UAC prompt, but I have an EXE which checks for updates to software. This prompts the UAC prompt. So how does Windows decide whether to show the UAC prompt? I saw this link…
IT researcher
  • 3,274
  • 17
  • 79
  • 143