Все вопросы: [vb6]

934 вопросов

похожие теги: vb6-migration
5
голосов
4ответов
4212 просмотров

How can I get the current user's SID in VB6?

I have some old code that we have to maintain in VB6. We need to add the ability for it to look up the current user's SID. Can anyone point me to some code that shows how to do that? Thanks in advance for your help!

3
голосов
2ответов
1637 просмотров

Good tutorial for Visual basic 6?

I am C++ programmer and I need to make some changes to VB6 code. And I am looking for a good VB6 tutorial to get started. Thanks a lot .

2
голосов
3ответов
1379 просмотров

VB6 binary compatibility - adding new Events

In a VB6 ActiveX exe project, is there any way to preserve the GUID for the events dispinterface if and when new events are added? Obviously changing existing events breaks compatibility. Adding a new one doesn't cause the VB6 IDE to issue a warning. This doesn't really surprise me, though, as i...

2
голосов
7ответов
524 просмотров

Is it necessary to free the memory in .Net as if in VB6?

I was reading about the Form's events in VB6 such as "Unload" "QueryUnload" and "Terminate", and about the "End" statement: https://web.archive.org/web/1/http://articles.techrepublic%2ecom%2ecom/5100-10878_11-5533338.html http://visualbasic.freetutes.com/learn-vb6-advanced/lesson6/p5.html I used...

3
голосов
4ответов
2481 просмотров

Alternate use of the Array() function in VBA?

We generally use the array function is VBA as : Dim A As Variant A = Array("B", 1) This will give me the first element in A as "B" and second element as 1 However I want to decide the contents of A at run-time so is it possible for me to do something like Dim str As String Dim A As Variant ...

2
голосов
2ответов
2011 просмотров

How can I detect if there is a webcam connected to the PC?

I have the source code for taking a picture via webcam, but I need to know if there's a webcam connected to the PC. If there's no webcam, the program won't call the function for taking photos. If necessary, I need to know which window's Api I have to use in this case. Language: Visual Basic 6 us...

15
голосов
12ответов
99251 просмотров

How do I Merge two Arrays in VBA?

Given Dim arr1 As Variant Dim arr2 As Variant Dim arr3 As Variant arr1 = Array("A", 1, "B", 2) arr2 = Array("C", 3, "D", 4) What kind of operations can I do on arr1 and arr2 and store result in arr3 such that: arr3 = ("A", "C", 1, 3, "B", "D", 2, 4)

5
голосов
3ответов
6930 просмотров

Remove scroll bars from Web Browser control

How can I remove the scrollbars from a web browser control using VB6?

4
голосов
3ответов
5963 просмотров

Getting Error on while reading a blank text file?

Using VB6 When I Reading the blank text file, showing error as Input Past end of file Code. Dim fso As FileSystemObject Dim TS As TextStream Dim TempS As String Dim Final As String Set fso = New FileSystemObject Set TS = fso.OpenTextFile(txtSourceDatabaseFile & "\" & FileName, ForReadi...

1
голосов
1ответов
65 просмотров

Replacing a filename problem?

Using VB6 In a folder, am having n number of text files, file names are like abc.mis-.txt, [email protected], so i want to rename the filenames like abcmis.txt, deffin.txt. I used a function for renaming. Code Dim filename3 As String filename3 = Dir$(txtSourceDatabaseFile & "\*.txt", vbDirector...

1
голосов
1ответов
50 просмотров

vb6 Multimedia query

How can I add an animated file on VB form? What extention does it support?

1
голосов
2ответов
103 просмотров

How to delete the filename?

Using VB6 I want to delete the last 5 words of the filename, then i want to give so other filename.\ Code. Name FileName As NewFileName The above code is working for rename, but i don't want to rename, i want to delete the last 5 letter of the filename. Expected Output Filename sufeshcdk....

1
голосов
3ответов
9114 просмотров

Does the ReDim statement initialise String Arrays with empty strings?

Given the following statements in VBA: Assume that val = 4 and Option Base 0 Dim dataStr() As String ReDim dataStr(val) Will the ReDim statement initialise the String array dataStr to 5 empty string elements(0 to 4). What exactly will be the contents of the Array after the execution of the R...

9
голосов
4ответов
52081 просмотров

How to select a folder only by using common dialog control

Using VB6 Code. CommonDialog1.DialogTitle = "Open File" CommonDialog1.Filter = "*.*" CommonDialog1.FilterIndex = 1 CommonDialog1.Flags = cdlOFNAllowMultiselect + cdlOFNExplorer CommonDialog1.Flags = cdlOFNFileMustExist + cdlOFNHideReadOnly CommonDialog1.CancelError = True On Error Resume Next C...

1
голосов
1ответов
703 просмотров

How to select a file automatically?

Using VB6 Now I am using a Browse button in my software to select the text file, then it is converted in to mdb (access). I don’t want to select the text file. Once I installed my software in any system, the text file should automatically select in a specified path. Then the text file automati...

1
голосов
2ответов
1462 просмотров

Handling a VB6 event in C# - why does it only work sometimes?

I have a VB6 application implemented as an ActiveX exe. I also have a C# application that interacts with the VB6 app via COM. This all works fine except in one scenario. If the VB6 app is kicked off from the C# app, everything is fine. If, however, the VB6 app is already running stand-alone, t...

2
голосов
2ответов
740 просмотров

C# Monitor.Wait and VB6 message pumping and events

I have a com callable wrapper written in C#. The wrapper uses a Socket internally to SendAsync and ReceiveAsync. In order to make this appear synchronous to the VB6 code that calls this wrapper, I use Monitor.Wait. I can't figure out if Monitor.Wait pumps messages while it blocks. According to c...

7
голосов
2ответов
3169 просмотров

Reg Free COM - Isolating COM Reference - missing value '(Default)'

So I have a registration free VB6 DLL referenced by my .NET 3.5 assembly library that's ultimately referenced by a .NET 3.5 WinForms application (not sure it's relevant, but included to paint a picture). I am getting the error 'Problem isolating COM reference 'SomeVBDll': Registry key 'HKEY_CU...

1
голосов
2ответов
1751 просмотров

Need recordset behavior in VB.NET w/ADO help

VB.NET newbie here. I've learned (through this site) how to negotiate a dataset via: For Each dRow In quanDS.Tables(0).Rows 'do something to each row Next I now need to figure out now to loop through a subset of the records returned in the dataset - here's a VB6 example I need to convert: ...

11
голосов
2ответов
55996 просмотров

COM Add-in for Excel doesn't load when Excel is launched by opening file

Several users have reported that if they launch Excel by double-clicking an Excel file, the add-in will not load. But, if they open Excel via the Start menu (or Quick launch toolbar) the add-in loads fine. Some details, in case they help: It is a COM add-in, written in VB6. The problem has bee...

0
голосов
4ответов
8592 просмотров

Visual basic 6 textbox autocomplete feature?

How can i add an autocomplete feature in a textbox? As soon as i write something in a textbox(whether 1 character or 2 or 3), it should match it with the student name in the database and complete the name.

1
голосов
2ответов
2055 просмотров

Visual basic 6 events

How can i restrict an event to occur? Suppose i don't want textbox change event to occur when i press backspace.

0
голосов
1ответов
3772 просмотров

VB Form Resize Event Problem?

Using VB6 Using MDI Forms, sub Forms also When I run the Software in More than 15 Inch Screen, Crviewer Control, Frame Control, Everything is appearing in 75% of the screen, I Wrote the code for Crviewer Control in the form resize event. Code Private Sub Form_Resize() CRviewer2.Top = 1450...

1
голосов
2ответов
1556 просмотров

ADODB Connection Problem

I am trying to perform a database operation from a VB 6.0 application (connecting to SQL 2000). The application is running fine in my local and test machines, but it gives the following error in the UAT environment. dbConn - Nothing lErrorNum = -2147024770 sErrorDesc = Method '~' of object '~' f...

1
голосов
5ответов
1782 просмотров

How to avoid the White Blank Screen?

Using VB6 At the time of executing, it showing white blank screen while it was working with database, How to avoid the white blank screen in VB6. WHITE BLANK SCREEN MEANS HANGING (WHEN IT WAS WORKING WITH DATABASE). How to avoid that?

11
голосов
4ответов
47789 просмотров

How to solve TimeOut Expired Problem?

Using SQL Server 2005 and VB6 When I executing for yearly data or more than 3 months' data, it is showing "Timeout Expired" error. It is not executing completely. My Connection String ConnectionString = "Provider=SQLOLEDB.1;" & _ "Persist Security Info=False; " & _ "User ID=" &...

8
голосов
3ответов
6692 просмотров

Unit Testing in VB 6 with SimplyVBUnit

I've recently decided to start using some light unit testing to see if it adds any value to our project, but I'm having trouble finding documentation for SimplyVBUnit. Any suggestions?

1
голосов
1ответов
393 просмотров

VB6 GUI not working in multithreaded COM environment

I have a VB6 COM client that makes calls to an inprocess STA ATL/COM server. One of the Server methods, X, can take a while to finish so I need to be able to cancel it. What I tried was to run the method code in a new thread and include another method, Y, that does a timed WaitForSinleObject. So ...

1
голосов
1ответов
1013 просмотров

SQL Server Connection String problem?

Using VB6, SQL Server 2000 I want to connect to others system database. Code: ConnectionString = "Provider=SQLOLEDB.1;" & _ "Persist Security Info=False; " & _ "User ID=" & SQL_Username & "; Password = " & SQL...

3
голосов
3ответов
260 просмотров

Visual Basic 6 form

How can I know that the form (other than the one I'm working upon) is open or closed?