Type: Posts; User: Bonnie West
Search took 0.09 seconds.
That does appear to be what's happening according to the quick help of the cmd command:
If /C or /K is specified, then the remainder of the command line after
the switch is processed as a...
Here are (late-bound!) examples of the 2 simplest solutions commonly used for this kind of task:
Private Sub Form_Load()
#If UseADO Then
Const adReadLine = -2&
I don't think you fully understood what I wrote in post #33. Did you even bother to visit the links I gave there? Those links points to a couple of MSDN topics which explains well the issue you're...
Yes. The predefined keys' values are defined in WinReg.h:
// Reserved Key Handles.
#define HKEY_CLASSES_ROOT (( HKEY ) (ULONG_PTR)((LONG)0x80000000) )
According to your latest screenshot, the "HKEY_LOCAL_MACHINE\SOFTWARE\WinRAR" subkey exists only in the 64-bit view of the registry. In my post #20, I began to suspect that this was probably the...
Yeah, I know. ;) I just thought the OP might be interested in seeing a description of how that simple technique works, hence my link to penagate's short article about it.
Yep, posting a...
Try this modification of jmsrickland's test project.
The demo project here shows yet another method using the WM_COPYDATA message.
A return value of 2 means that "The system cannot find the file specified."
Hmm... Is your version of WinRAR 64-bit? If so, try specifying KEY_WOW64_64KEY for the WOW64_Flags parameter of the...
Coding, you mentioned that you are "running Windows 7 Ultimate 64-bit". Your screenshots of your's and jmsrickland's test projects, however, seems to suggest otherwise. Are you absolutely sure that...
It seems you have a typo in the registry subkey you're passing to both functions. ;)
As I've stated in post #9, the MsgBox "RV = " & RV, vbInformation line is supposed to be inserted here:
Please rip these sites before they too R.I.P.: :bigyello:
ActiveX Components by Alvaro Redondo
Aivosto - Resources for developers
BlackBeltVB (archived versions of old...
Did you remember to insert the MsgBox statement I told you in post #9 before compiling that code and running it? What was the message?
Have you also already tried my previous suggestion about...
Yes, that is correct.
I did. However, I've now realized why my code appeared to fail reading the file - I forgot to reset the file pointer. Sorry about that.
Here's the test code I used to...
Elevating the process shouldn't be necessary because the function above opens the specified registry key only for "reading" (KEY_READ), not "writing".
Try adding a MsgBox "RV = " &...
The #Const directive doesn't allow the data type clause. ;)
The VB6 manual discusses them here.
A quick test revealed that the TRUNCATE_EXISTING action allows writing to the file but not reading from it.
Option Explicit 'In a standard module
Public Enum PredefinedRegKeys
HKEY_CLASSES_ROOT = &H80000000
HKEY_CURRENT_USER = &H80000001
HKEY_LOCAL_MACHINE = &H80000002
Option Explicit 'Copy & paste all of these in a standard module
Public Enum IOMode
ForReading = 1
ForWriting = 2
ForAppending = 8
#If False Then
OK, the following example might help you get going:
Option Explicit 'In a standard (.BAS) module
Private Const ERROR_SUCCESS As Long = 0
Private Const HKEY_LOCAL_MACHINE As...
Well, I could search for examples, ... or I could make one for you. Can you describe the specific details of your problem?
dilettante already gave a link to the MSDN topic that discusses how it can be done. Here's an excerpt of the relevant parts:
The example here shows how to open and delete a 64-bit key and...
Great catch! :thumb:
The best way, it seems, to fix that issue is by combining both of our approaches. The revised code in post #12 now has the best of both worlds and with none of the...
The second Form (Form2) is supposed to be an MDIForm. ;) A VB6 project cannot have MDIChild(s) without their parent MDIForm. The project's Startup Object should be the first Form (Form1).
Here are a couple more examples. :bigyello: The API version uses the EM_SETCUEBANNER message (which requires that a manifest specifying Comclt32.dll v6.0 be provided) while the pure VB6 code version...
Did you perform the following steps exactly as I wrote above?
Start a new Standard EXE project.
Make the default Form an MDIChild.
Add an MDIForm and a standard Module.
Copy & paste the...
Here's an example that demonstrates another simple approach that doesn't require APIs. Instead, it relies on the Deactivate event of a Form. Start a new Standard EXE project, make the default Form an...
Here's yet another way that avoids issues associated with subclassing:
Henry Smith, are you also Arnav Shah?
If so, please don't start more than 1 thread per topic.
I don't think a method's number of arguments has anything to do with its offset from the VTable. As you know, a VTable is just an array of pointers to the methods of an interface. It doesn't specify...
What exactly do you mean by "VBS TEXTBOX"? If it is also an Edit control just like VB6's TextBox control, you can copy the contents of your VB6 TextBox to the target Edit control via the WM_SETTEXT...
You could use either the FindWindowEx function (if you know the buttons' class names and captions beforehand) or the GetDlgItem function (if you know the buttons' control IDs in advance).
This example might give you some ideas on how to accomplish your objective:
Option Explicit 'Add an MSFlexGrid control to a blank Form
Private Sub MSFlexGrid1_MouseMove(Button As Integer,...
They have an example in the KB article How To Launch a Win32 Application from Visual Basic.
Chapter 6 of Steven Roman's book Win32 API Programming with Visual Basic thoroughly explains...
According to Terminating a Process:
You're probably talking about .NET's Garbage Collection. ;) In Classic VB, it is a bit different:
In bPrice's example above, the old Collection object dies as soon as the c variable is no...
According to the Regular Expression Syntax, positive & negative lookahead and submatches are supported:
Matches pattern and saves the match. You can retrieve the saved match from...
Probably the RegWrite method of the WshShell object:
CreateObject("WScript.Shell").RegWrite "HKLM\SYSTEM\CurrentControlSet\services\USBSTOR\Start", 3&, "REG_DWORD"
#If UseAPI Then
Private Declare Function ShellExecuteW Lib "shell32.dll" (ByVal hWnd As Long, ByVal lpOperation As Long, ByVal lpFile As Long, ByVal lpParameters As Long, ByVal lpDirectory As...
Click Here to Expand Forum to Full Width