I have imported the kernel32 library. So, I have the createMutex function available but I am not quite sure of the various parameters and return values.
This is classic Visual Basic, not Visual Basic.NET but I can probably work with either language in the form of an answer.
I am attempting to launch the .NET CF installer from a VB6 app using the following code (for the sake of brevity I have replaced the full path to the installer with "(full path)"):
Shell "C:\WINDOWS\system32\msiexec.exe /fa ""(full path)\NETCFSetupv35.msi"""
I've run this on four machines so far. On two it works fine, on the other two it fails. When it works, the CF installer just runs. When it fails, the first thing it does is pop up a dialog saying, "The feature you are trying to use is
Can a VB6 program that does not contain the keyword 'New' have memory leaks?
If so, please provide an example.
Is there any IsDouble() function in VB6? If I'm not mistaken, Double data type in VB6 is equivalent to float in SQL Server 2000.
Your advice would be much appreciated.
I want to search a file from the path.
Path = "C:\Newfolder\"
file name = *.txt, *.fin
I want to get all the *.txt, *.fin file from the new folder.
I'm trying to use Winsock to download some files and save them.
In my case, I have a MSHFlexGrid with 2 columns: one with URL and the other with the "path+filename" (where the file is going to be saved).
I'm iterating through all rows calling the next function:
Public Function DownloadSock(ArqURL As String, ArqDestino As String) As Boolean
'ArqURL is the file URL
'ArqDestino is where the downloaded file is going to be stored, in my hard disc
Dim arquivo() As Byte
Dim ficheiroID As Integer
I'm stuck with VB6 and I'm using Form.Controls.Add(...) to create a bunch of controls at runtime.
Unfortunately this seems to be a very slow process, with heavy flickering.
Is there any way to speed up the process? Perhaps it's possible to somehow notify VB6 that I'm doing a mass-insert of new controls.
I have a vatabpro control version 2.0.46 by Farpoint technologies in VB6 on a form.
In the form activate event some code is run to show and hide the certain tabs in the va tab pro control.
After this a normal option button on one of the tabs is set to true.
When the form is displayed all the radios on the tab are unchecked even though they were explicitly set in code and I can see this happening on a breakpoint.
I have a weird feeling i've seen this before and suspect it might be something t
I'd like to run a script to do a SVN checkin automatically when exiting the VB6 IDE.
Is there any easy way to do that from within the IDE? (I guess I could write a script that launches the vb6 ide, waits for it to exit, then runs the script, but I'm hoping for something simpler).
i want to replace the alphabets with numbers from a text box and display in the result in another test box.Do not know how to achieve this.Please help.
Private Sub Form_Load()
txtID.Text = "a s d f"
txtSerial.Text = txtID.Text
Private Sub cmdGet_Click()
Dim i as Integer
fsID = UCase(Replace(txtID.Text, " ", "")) ' Remove all spaces '
For i = 1 To Len(fsID)
ch = Mid(fsID, i, 1)
' Decoder '
How to navigate using WebBrowser Control? I want to open a C:\file1.html... an example code would be appreciated.
In VB6 (and earlier), is there a way to have the default response in an InputBox to be non-highlighted?
OK, so I have the joyous task of writing a command-line build for a bunch of legacy VB6 ActiveX DLLs (so that we can integrate this into our TFS builds).
I've installed a copy of VB6 on our build server, and I'm trying, as a first step, to get one of the projects building from the command line thusly:
> VB6.EXE /make path\to\project.vbp
The result is an error dialog telling me:
Unexpected error occurred in code generator or linker. [OK] [Help]
Can anyone point me in the direction of a
I'm not sure if this is right, but I can't view the "code behind" in VB6. Everytime I click the "view code" for an object (for example a button), the code does not display.
Can you help me with this or any workaround for this? I need to do a breakpoint on this.
How do I find the date of the first day of week given any date of current week in vb6 or classic asp?
How can we determine the type of a recordset as a normal or hierachical?
I want to make a program that does the following:
1) Allow users to select a bunch of files
2) Allow users to select a folder to copy the files into
3) Copy all the files into the specified folder
In reality the program needs to do much more than this but that gets the idea across of what I want.
The SSTab does hide/show the child controls by shifting them to/from a negative value. Basically all child controls do have the SSTab control instance as parent HWND.
Is there any way to determine the tab index for the child controls - any other than looping the SSTab.Tab property? How does the SSTab instance manage the child controls to tab association?
I have a VB6 program which tries to run a DLL written in C#.
This DLL has a COM interface so I can create an object of a class in it with "CreateObject".
The problem is that it runs and works well when I run it from the VB6 IDE, but when I make an EXE and try to run it, it throws the exception:
"Automation error. The system cannot find the file specified (-2147024894)."
Why is it happening and how can i solve it?
I have an app that once compiled runs perfectly fine. However, if I start it in VB6 environment, it crashes the IDE constantly and pretty randomly, but only when I take action with the application (e.g. move mouse over it, click on something, move a window, etc...)
The application does a lot of things that one does not associate with VB6: SIP, virtual sound card interfaces, audio encoding/decoding, etc...so it could be that, but the crashes seems so random.
The crash always occurs in the vba6
Just doing a bit of self teaching on visual basic, I have a list of buttons and when clicked I want to disable then and highlight them as red. I am ok on getting the button functions to work and I understand how to publish the gui as an .exe
Is it possible to save it so if i click on the button and it turns red and then i close the .exe and open it again the button stays red?
I'm working on a program that will disable access to shared folders on a document server if the hard drive is getting close to being full. Currently, I am just renaming them to something different to prevent the app server from being able to send more documents over. I'm wondering if there is a way to somehow lock down a folder programmatically, either setting it to read only, or disable its share status. From what I've seen, changing a folder to read-only directly in windows doesn't prevent
I have an Array named Menus. It contains a form name per element.
How can I call them dynamically?
For example, if Menus(1) = "Login", and Menus(2) = "Logout" I need to say
but I want to do this using the Array name. I clearly can't do this:
Is this possible in VB or is there a way around this?
Thanks in advance!
I have an array of 50k items. I want to load all the items into my listview control as fast as possible. Using a loop is not the solution as a loop is very slow.
I need a better solution for handling unready drives and want to be able to see and change files in my rw-drive. Unfortunately it always gives drive unready error and the only thing that I can do is handle the error.
So far I've done this:
Private Sub imperialdrive_Change()
On Error GoTo I_have_a_baad_feeling_about_this
imperialdir.Path = RootPathOnDrive(imperialdrive.Drive)
If Err.Number = 68 Then
MsgBox "The selec
I have a hierarchical flexgrid control with the ToolTipText property set, and when I run from source the tooltip displays as it should. But when I compile it and run that way, the tooltip doesn't display.
I've tried to remove anything listening to MouseMove in the hopes that that would fix it, and when I add some code to put the tooltip text into a message box, it appears to be set correctly. Can anyone think of why this would be happening?
Update: It appears that the problem arises when I h
I made one exe file in vb6 which is using the reference of one dll file. When I try that exe in other system i am getting following error :
Error 429, Activex component cant create object
Please help me for the same.
How to read a file and write into a text file?
I have a search facility where items are displayed in a ListView. These items are read in from a file. When I select an item in the ListView I want to be able to remove it from the text file as well.
At the moment, it is is only removed from the ListView but when I search again it still displays so it isn't being deleted from the text file.
Basically my program is a list of products with their barcodes and quantities. Th
Is there any way to convert from \Device\HarddiskVolume1\programfile\explorer.exe to C:\programfile\explorer.exe in visual basic 6?
I'm having a bit of an issue. I'm trying to run this VB6 application that my company uses, but I get the below popup. Now, I've installed VB6 run-time, I've re-registered the vbalTab6.ocx. After some googling, I've even tried installing Microsoft Office and Access, and installing VB6 IDE. All with no joy. Any ideas? Thanks for any and all help.
This is the code am using for zoomed out web browser
Const OLECMDID_OPTICAL_ZOOM = 63
Const OLECMDEXECOPT_DONTPROMPTUSER = 2
Web1.ExecWB OLECMDID_OPTICAL_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER, CLng(35), vbNull
when i use the code i get the following runtime error:
-2147221248 (80040100): Automation Error
I use the code given by you. It works fine in debug mode once i take exe and run it shows the following error.
I have to modify an old VB6 program that uses ActiveReports 2.0 at work and I am having some problems (BTW I have never used this program before and only have a basic knowledge of VB6)...
I have to make some text boxes biggers which is pretty easy to do but as soon as I move them a whole section of text (and not simply the content of that text box) disappear.
I have noticed that it was in some sort of section (sorry, I don't know how they call that) which englobed those text boxes so I made i
Is there any way to export VB project to DLL? I just found only way to export VB project (VB6) as .exe file. Please help me if you have experience about that.
Say I have 2 forms named, Form1 and Form2. I want to call a function abc() in Form2 from Form1. Which one is better and why?
Dim oFrm As New Form2
I am getting the error "Publisher could not be verified. Are you sure you want to run this software" while opening an exe from UNC path. when I am trying to open an exe from UNC path (\abcserver\apps). There were two possible solutions but didn't work as I want.
This is an application accessing by 50+ people from the network share. As per the given solutions on the forums, I've added the intranet security to the zone with all options on.
(------Open Internet Explorer | Tools | Internet Option
I am trying to do a calculation in a function to work out a percentage. However the percentage variable comes out as 0. What am I doing wrong?
Public FullLoopNum as Integer
Public ReportPercentage As Integer
Public ReportRecordNum As Integer
Public Function WebOutput
ReportRecordNum = 1
FullLoopNum = 4
ReportPercentage = (ReportRecordNum \ FullLoopNum)
ReportPercentage = ReportPercentage * 100
My problem is to get a string as described above ! In my case
The string,I want is "0020001212" , My known words are ";".
I tried Mid() but my value is not stable , variable !
so, please help me to find this answer. Thank y
when i tried to connect to sql database it is giving me the following error
MULTIPLE STEP OLEDB OPERATION GENERATED ERRORS
MY CODE IS
Public Sub connect(sql As String)
con.Open "Provider=Microsoft.SQLSERVER.CE.OLEDB.4.0;Data Source=" & App.Path & " \HMS.sdf;"
If rs.State Then rs.Close
rs.Open sql, con, adOpenKeyset
I am working on a legacy ADO .Net code in VB6. The current code iterates through a dictionary and creates a new record for the RecordSet, rs, for each key in the dictionary. This is the current code (rs is a record set):
For Each k In dictionary.Keys
rs(field1) = value1
rs(field2) = dictionary(k)
I want to optimize the above code and add the records in a batch. Something like this:
Dim fieldOne As New Collection
Dim fieldTwo As New Collection
here is the code to connect ms access database with password protection. However it is giving an error 'Could not use ";file already in use' can you please tell me what could be the issue.
I have placed a mycmd.exe file in system32 folder under windows directory.
Strange thing is that this is accessible from command prompt but when i access this file as a shell command from my VB6 application it shows is "not recognized as an internal or external command"
I am running VB project as run as administrator and using win8 64bit.
Thanks for the anticipated help!!
First of all, I am using VB6, not VB.Net.
Now, I am trying to add events on dynamically-created array of controls. But when I try to add the WithEvents keyword to my array of controls, I get a "Compile Error: Expected: As" error.
Here's my code:
Dim WithEvents btnNumbers() as CommandButton
Private Sub Form_Load()
ReDim btnNumbers(1 to 10) as CommandButton
Dim i as Integer
For i = 1 To UBound(btnNumbers) Then
Set btnNumbers(i) = Controls.Add("VB.CommandB
I have used tamil font letters in vb6 text box. But it shows
How to display Tamil font letters in visual basic 6 ? please help me.
I modified my vb6 project to support unicode by using CyberActiveX UniListView100 (UniListView.ocx) controller. I updated my listview with uniListview and project is working well on my machine. But when I try to run it on another machine, it is giving 'Error in Loading DLL' error right after I click on the 'Step into' or 'Start' button.
Once I tried with VB Common Controls Replacement 1.4 Library and the similar scenario happened there as well, code is only running on the machine where it crea
I am working on some http requests and have hit a problem, one of the requests uses a tick mark (or "check mark") in the post params and I am struggling in VB6 to create it, it is a JSON post via Xmlhttp :
When I try to create the post query I am unable to send this character as VB6 see's it as a question mark, hence it does not know what the character is.
Just wondered if anybody has come across this and managed to resolve it ?
Thanks in advance for any help.
I have a question about MsFlexGrid VB6.
I have a grid containing coordinates of objects vertices. So for example, if I have 4 objects each one with 3 vertices, the number of rows is 4*3=12. What I would like to do is:
Loop through every three rows (the number of vertices) and get the maximum value and then have it appear in a MsgBox and then move to the next three vertices and do the same.
Is this possible?
I want to make command line VB6 application which prints its result to the command prompt (similar as printf in C). However, none of the found solutions does not work for me.
I have VB6 SP6, Windows 7 x64.
How to write to a debug console in VB6?
to accomodate this, but in this line
Public SIn As Scripting.TextStream
compiler returns an error: User-defined type not defined
Why this is not workin? Is there a way to do it?
I would prefer API solution (system independent).
I am compiling a VB 6 code which requires serial communication from ports. For performing serial communication, I need some software tool like SAX Commstudio Active X or MSComm.ocx. But the problem is I have downloaded Sax Commstudio Active X from the commstudio official website, but that was a trial version for 1 day only. then i tried to download the same software from
But the link is unavailable.
Now I am really in a fix how to get any of
Does anyone know of any Pattern I can use in order to iterate through a VB6 ListView? Ive run through what I see as available but keep getting errors.
Well i'm trying to create a form in VB6 to control my database that was created by access, i did everything and everything went perfect,until i notice that if you enter the same "ID" i get an erreur from access that there is multiple Ids with the same number,since i activated the primary key in access so it doesn't allow that,so what i'm trying to do is when the user move from the Id cell to other cell,visual basic scan the id cell first and check if there is no other id with the same number,if
1 2 3 4 5 6
... 下一页 最后一页
共 17 页