Search Results - VBForums

Search:

Type: Posts; User: Bonnie West

Page 1 of 13 1 2 3 4

Search: Search took 0.09 seconds.

  1. Re: CreateProcess with cmd and multiple parameters with spaces?

    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...
  2. Re: How to read a unicode text file line by line.

    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&

    With...
  3. Replies
    36
    Views
    611

    Re: If Registry Key Exist

    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...
  4. Replies
    36
    Views
    611

    Re: If Registry Key Exist

    Yes. The predefined keys' values are defined in WinReg.h:



    //
    // Reserved Key Handles.
    //

    #define HKEY_CLASSES_ROOT (( HKEY ) (ULONG_PTR)((LONG)0x80000000) )
    #define...
  5. Replies
    36
    Views
    611

    Re: If Registry Key Exist

    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...
  6. Re: How to pass values into a running program?

    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...
  7. Re: How to pass values into a running program?

    http://www.vbforums.com/image.php?u=147151&type=sigpic&dateline=1374042884
  8. Replies
    36
    Views
    611

    Re: If Registry Key Exist

    Try this modification of jmsrickland's test project.



    127855
  9. Re: How to pass values into a running program?

    The demo project here shows yet another method using the WM_COPYDATA message.



    http://www.vbforums.com/attachment.php?attachmentid=98017&d=1363908751
  10. Replies
    36
    Views
    611

    Re: If Registry Key Exist

    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...
  11. Replies
    36
    Views
    611

    Re: If Registry Key Exist

    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...
  12. Replies
    36
    Views
    611

    Re: If Registry Key Exist

    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:

    ...
  13. Replies
    22
    Views
    691

    Re: wanted: PSC CDs

    Please rip these sites before they too R.I.P.: :bigyello:


    A1VBCode
    ActiveX Components by Alvaro Redondo
    Aivosto - Resources for developers
    AllAPI
    BlackBeltVB (archived versions of old...
  14. Replies
    36
    Views
    611

    Re: If Registry Key Exist

    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...
  15. Re: Question about CreateFile parameter dwCreationDisposition

    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...
  16. Replies
    36
    Views
    611

    Re: If Registry Key Exist

    Elevating the process shouldn't be necessary because the function above opens the specified registry key only for "reading" (KEY_READ), not "writing".



    @ Coding

    Try adding a MsgBox "RV = " &...
  17. Replies
    3
    Views
    188

    Re: VB6 Equivalent of C #ifdef directives

    The #Const directive doesn't allow the data type clause. ;)



    The VB6 manual discusses them here.
  18. Re: Question about CreateFile parameter dwCreationDisposition

    A quick test revealed that the TRUNCATE_EXISTING action allows writing to the file but not reading from it.
  19. Replies
    36
    Views
    611

    Re: If Registry Key Exist

    Try this:



    Option Explicit 'In a standard module

    Public Enum PredefinedRegKeys
    HKEY_CLASSES_ROOT = &H80000000
    HKEY_CURRENT_USER = &H80000001
    HKEY_LOCAL_MACHINE = &H80000002
  20. Re: Open .txt file and delete string between two values (RegEx?)

    Option Explicit 'Copy & paste all of these in a standard module

    Public Enum IOMode
    ForReading = 1
    ForWriting = 2
    ForAppending = 8
    End Enum
    #If False Then
    Dim ForReading,...
  21. Replies
    8
    Views
    2,705

    Re: access 64 bit registry from 32 bit app

    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...
  22. Replies
    8
    Views
    2,705

    Re: access 64 bit registry from 32 bit app

    Well, I could search for examples, ... or I could make one for you. Can you describe the specific details of your problem?
  23. Replies
    8
    Views
    2,705

    Re: access 64 bit registry from 32 bit app

    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...
  24. Re: [RESOLVED] How to prevent to open a new dynamical form in runtime in this case?

    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...
  25. Re: [RESOLVED] How to prevent to open a new dynamical form in runtime in this case?

    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).
  26. Replies
    4
    Views
    218

    Re: How changing textBox caption

    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...
  27. Re: [RESOLVED] How to prevent to open a new dynamical form in runtime in this case?

    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...
  28. Re: [RESOLVED] How to prevent to open a new dynamical form in runtime in this case?

    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...
  29. Re: cannot select text in textbox control after subclassing

    Here's yet another way that avoids issues associated with subclassing:
  30. Re: Working with the List View control in VB6

    Henry Smith, are you also Arnav Shah?



    If so, please don't start more than 1 thread per topic.
  31. Re: Trying to implement IShellItem - where'd I go wrong?

    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...
  32. Replies
    4
    Views
    209

    Re: PASSING VALUES FROM VB6 to VBS

    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...
  33. Re: Something New (For Me) - Shelling Program - Btn Click

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



    Send...
  34. Replies
    3
    Views
    241

    Re: Flexgrid mouseover event

    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,...
  35. Re: Questions about STARTUPINFO structure in VB6

    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...
  36. Re: Question about CreateProcess and closing handles

    According to Terminating a Process:
  37. Re: What happens if we "Re New" an object?

    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...
  38. Re: RegEx with lookahead, lookbehind and capturing groups

    According to the Regular Expression Syntax, positive & negative lookahead and submatches are supported:




    (pattern)
    Matches pattern and saves the match. You can retrieve the saved match from...
  39. Re: [ALMOST resolved] USB ports enable/disable by code

    Probably the RegWrite method of the WshShell object:


    CreateObject("WScript.Shell").RegWrite "HKLM\SYSTEM\CurrentControlSet\services\USBSTOR\Start", 3&, "REG_DWORD"
  40. Replies
    1
    Views
    149

    Re: SHELL execute via code

    #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...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width