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
18
votes
7 answers

Escaping quotes in a string in VB6

I am trying to make some small changes to an old VB web app I need to add quotes inside of a string I've had no luck so far. The string is Dim sql As String = "Select * from Usertask Where UserId = " & Session("UserId") & " and JobID=" &…
Adonis L
  • 1,679
  • 4
  • 20
  • 23
17
votes
2 answers

Can't move controls in VB6

I'm working on a small project in VB6, and am trying to fiddle with the positions and sizes of the controls in the Design View. But they won't move or resize; one grabs the little handles and nothing happens. Does anyone know why, and what to do…
Brian Hooper
  • 21,544
  • 24
  • 88
  • 139
17
votes
8 answers

Reg Free Com with VB6.exe on Windows 7

I have some .NET code I use from VB6 code. I have always developed this on an XP machine by creating a VB6.exe.manifest file that listed the dependent .NET assemblies. For example, say my 2 .NET assemblies are Some.Assembly.A.dll and…
user210757
  • 6,996
  • 17
  • 66
  • 115
17
votes
2 answers

How to automatically toggle Airplane mode on Windows

On my laptop I can toggle Airplane mode manually by pressing FN+F12, I want to do the same thing automatically from VB6 project or VBA. I did a lot of search and only found answers about Enable/Disable wireless adapter or using Sendkeys for Windows…
Fadi
  • 3,302
  • 3
  • 18
  • 41
17
votes
6 answers

Opening vbp Visual Basic Project

I have got some old sources written in Visual Basic. There are *.bas, *.cls, *.frm and *.vbp files. As I understand, vbp is a project file. But I cannot open it with my Visual Studio 2008. What version of VS should I install to open *.vbp file?…
Roman
  • 4,531
  • 10
  • 40
  • 69
17
votes
3 answers

Access-SQL: Inner Join with multiple tables

i have multiple tables in a database: tblOjt ID studentid courseid companyid addresseeid dateadded datestarted dateended ojthours 1 3 1 1 1 9/25/2013 …
Kay Singian
  • 1,301
  • 8
  • 20
  • 33
16
votes
2 answers

Significance of an ampersand in VB6 function name?

I just got a bunch of legacy VB6 (!) code dumped on me and I keep seeing functions declared with an ampersand at the end of the name, for example, Private Declare Function ShellExecute& . . .. I've been unable to find an answer to the significance…
Ickster
  • 2,167
  • 4
  • 22
  • 43
16
votes
3 answers

What is the operator precedence order in Visual Basic 6.0?

What is the operator precedence order in Visual Basic 6.0 (VB6)? In particular, for the logical operators.
Oskar
  • 2,234
  • 5
  • 28
  • 35
16
votes
4 answers

How to check if text1 contains text2 using vb6?

How to check if text1 contains text2 using vb6 ? Dim text1 as string Dim text2 as string text1 = "hello world I am Anas" text2 = "Anas" if (check if text2 is in text1) 'the result should be true or false
faressoft
  • 19,053
  • 44
  • 104
  • 146
16
votes
3 answers

File -> Make... menu option is disabled in VB6 IDE

VB6 IDE can get into a state when the Make XXXX menu option under the File Menu is disabled.
Gary Kindel
  • 17,071
  • 7
  • 49
  • 66
16
votes
5 answers

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?
Clay Nichols
  • 11,848
  • 30
  • 109
  • 170
16
votes
3 answers

Embedding an application manifest into a VB6 exe

I have recently gone through a bunch of standalone utility apps written in VB6 to make sure that registry virtualization is turned off for Windows Vista and above. I created a standalone manifest file for each exe, set the requestedExecutionLevel…
Christian Hayter
  • 30,581
  • 6
  • 72
  • 99
16
votes
1 answer

How to get the full path of the current executable file in VB?

I have created one windows application using VB. Whenever I executing the exe, I want to get the current directory of the exe file programatically. For example, Now, I am executing the exe file in d:\myApp\test.exe. Whenever I double click the exe…
Saravanan
  • 11,372
  • 43
  • 143
  • 213
16
votes
5 answers

Multithreading in visual basic 6.0

How to implement multi-threading in visual basic 6.0. It would be great if someone can give an example.
ravi
  • 787
  • 3
  • 11
  • 16
16
votes
4 answers

How to write to a debug console in VB6?

I am new to VB. I want to test some old VB code, but I need the ability to print to the console to be able to test certain values that are set in the code. How to print to the console from VB?
CodeBlue
  • 14,631
  • 33
  • 94
  • 132