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.
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.