Thanks, it does work now. But I don't want a message box, but one line of code in Private Sub CommandButton_Click() only when the OS is Windows NT.
The line of code I need is:
sBat = sBat & "echo." & vbCrLf & "pause"
This is to put the command "pause" at the end of...
It would be very useful if it worked, but I get a compile error: "User-defined type not defined" on "Dim OSInfo As OSVERSIONINFO"
Speek
I need to query if the OS is Win9x or WinNT. I know this can be done with sysinfo.ocx, but can it also be done without sysinfo.ocx? (My VB6 Learning Edition nags about a license when I try to use sysinfo.ocx)
OK, here it is:
Public Sub INI_LoadForm(ByVal frm As Form, Optional ByVal INIFile As String, Optional ResetFile As Boolean = False)
' This is for incase the file was already deleted
On Error Resume Next
' Create a generic INI name from the App title
If INIFile =...
The values of option buttons are stored in the ini-file as true/false. When I start the program these values are not loaded. But if I change true/false in the ini-file manually to 1/0, the values are loaded correctly. Is this a known VB6 problem? What should I change to make things work?
Speek
How to remove the last character of a string (of unknown length)?
Explanation:
The user selects a path. The program adds a backslash at the end of the path. But in one case this backslash must be removed.
Speek
I don't know where I got it. I will copy it here (hope it's OK to post so much text):
Option Explicit
' Read INI functions
Private Declare Function GetPrivateProfileInt Lib "kernel32" Alias "GetPrivateProfileIntA" (ByVal lpApplicationName As String, ByVal lpKeyName As...
I don't know where I got it. I will copy it here (hope it's OK to post so much text):
Option Explicit
' Read INI functions
Private Declare Function GetPrivateProfileInt Lib "kernel32" Alias "GetPrivateProfileIntA" (ByVal lpApplicationName As String, ByVal lpKeyName As...
Well other other controls get their values from the ini file correctly. So the loading of the ini-file seems to work fine. The INI module contains the function INI_LoadControlValues and in that function "OptionButton" is one of the cases. So I really can't grasp what's going wrong.
Yes, the ini-file is in the same directory as the executable. I'm using VB6.
The ini-file works fine with all other controls. That's why I don't understand why it doesn't work with option buttons. The values of the option buttons are in the ini-file and the ini-loads when the program is...
I'm working on a program with some option buttons. The values of these option buttons are stored in an ini-file when the program is closed. When I check the ini-file the correct values are there. But when I start the program all the option buttons are set to false (while there must always be one...
I've made a frontend for a MP3 encoder (executetable console program). Until now the frontend created and launched a batch file. The downside of batch files is that it doesn't work if the filenames of the files that must be encoded contain accented characters. So now I want to use the...
Sacsac,
I tried your code and it works to some extend. The problem I still have is that I don't know under what Private Sub I should put your code.
If I put it under Private Sub Combo1_Change() then the combobox stays empty at runtime. Only when you type letters in the combo box there appears...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.