dcsimg

Search:

Type: Posts; User: BrianPaul

Page 1 of 8 1 2 3 4

Search: Search took 0.10 seconds.

  1. Replies
    14
    Views
    7,195

    Re: How to get Process ID from hwnd?

    Of course the PID is going to be different every time you launch the program. The reason I couldn't use the code you posted above is because it doesn't seem to really give the process id and hence...
  2. Replies
    14
    Views
    7,195

    Re: How to get Process ID from hwnd?

    What I am doing is launching a VPN program that happens to be a command line program. Then I need to send username and password. I tried using SendMessage and PostMessage and every other method...
  3. Replies
    14
    Views
    7,195

    Re: How to get Process ID from hwnd?

    When you open a program like notepad, that process has the same PID until it is closed. Of course if you launch notepad 50 times, there will be 50 different PIDs, but each one of those windows keeps...
  4. Replies
    14
    Views
    7,195

    Re: How to get Process ID from hwnd?

    Yes, that's the exact document I was looking at... it's were I found the GetWindowThreadProcessId function. Errr... VB6 is frustrating! I need to use ShellExcute in order to hide the DOS window...
  5. Replies
    14
    Views
    7,195

    Re: How to get Process ID from hwnd?

    So I use your code and I get the number 47408. Looking in Task Manager, the PID of notepad.exe is 41132. If I run...

    retVal = Shell "notepad.exe"

    The return value is the PID. How can I get...
  6. Replies
    14
    Views
    7,195

    How to get Process ID from hwnd?

    I have this code to get the Process ID from the hwnd, but it does not return the Process ID. What am I doing wrong?


    Option Explicit

    Private Declare Function ShellExecute Lib "shell32.dll"...
  7. Re: How to minimize another program when you have the pID

    Would the API ShellExecute function also return the process id, or does it return the handle? I use "AppActivate pID" before sending keystrokes to the dos window. Not sure if that would work with a...
  8. Re: How to minimize another program when you have the pID

    Ok, vbMinimizedFocus worked. Anyway I can hide this window?
  9. Re: How to minimize another program when you have the pID

    Or maybe I can launch it minimized? I tried using vbHide, but I'm guessing you can't hide a dos window?
  10. [RESOLVED] How to minimize another program when you have the pID

    I launch a command line program and it is running in a dos box. How can I minimize this dos window? When I launch the program, I grab the pID...

    pID = Shell("dosProgram.exe", vbNormalFocus)

    I...
  11. Re: [RESOLVED] JoinDomainOrWorkGroup fails on Windows 8

    Is it possible to include "elevated rights" within the code so that the program does not need to be launched in this way?
  12. Re: JoinDomainOrWorkGroup fails on Windows 8

    I will check on that tomorrow, but I would think it would be more likely to work if it was disabled.
  13. Re: JoinDomainOrWorkGroup fails on Windows 8

    It was an admin user in both Win7 and Win8 (never a non-admin). The other day I was working with Microsoft on a KMS licensing issue and the engineer would always launch programs (even the command...
  14. Re: JoinDomainOrWorkGroup fails on Windows 8

    We are using Win8 Pro. I found out that I had to run the vb program as administrator (even though I was already logged in as an administrator!). I right clicked on the program and chose "Run as...
  15. [RESOLVED] JoinDomainOrWorkGroup fails on Windows 8

    Does anyone know why the following line of code would fail in Windows 8?

    ReturnValue = objComputer.JoinDomainOrWorkGroup(strDomain, strPassword, strDomain & "\" & strUser, strOU, JOIN_DOMAIN +...
  16. Re: Check if a process is running on Win7 64bit

    For some strange reason, I don't have the code tag. I have tags for links, email, and images, but the code tag seems to be missing. I've used it many times in previous posts, but it seems to be...
  17. Re: Check if a process is running on Win7 64bit

    Here is the code I have...

    Public Function GetProcesses(ByVal EXEName As String) As Boolean

    Dim booResult As Boolean
    Dim lngLength As Long
    Dim lngProcessID As Long
    Dim...
  18. Check if a process is running on Win7 64bit

    I have a vb6 function that determines if a process is running. This worked on 32bit systems, but it is not working 64bit Win7. How can I check if a process is running on a 64bit OS?

    Thanks!...
  19. Re: [RESOLVED] How to save a bitmap to a file

    Even with that code, I'm still getting the error. Here is the entire code... any ideas why I'm getting Invalid property value on the last line?


    Private Declare Sub keybd_event Lib "user32"...
  20. Re: [RESOLVED] How to save a bitmap to a file

    One last question. I put this in a module and for some reason, this statement now doesn't work...

    SavePicture GetScreenBitmap(True), "c:\test.bmp"

    It is saying "Invalid property value"... any...
  21. Re: How to save a bitmap to a file

    That's awesome... thanks guys!
  22. [RESOLVED] How to save a bitmap to a file

    I found some awesome code that will take a snapshot of the active window. My question is, how can I save the bitmap that it captures to a file?

    Thanks! Here's the code...


    Private Declare...
  23. VS 2010 Re: Error: Conversion from string "" to type 'Integer' is not valid

    maybe I should do something like this...

    strTemp = InputBox("how many?", "how many?")

    If strTemp Not = "" Then amount1 = strTemp
  24. VS 2010 [RESOLVED] Error: Conversion from string "" to type 'Integer' is not valid

    I have an InputBox where I want someone to input a number. The number would be an integer. The line looks like this...

    amount1 = InputBox("how many?", "how many?")

    If they click cancel, it...
  25. VS 2005 Re: Converting vb scritpt statement to vb.net

    I have objCommand declared this way...

    Dim objCommand As New ADODB.Command
  26. VS 2005 Converting vb scritpt statement to vb.net

    In a vb script program, I have the following code...

    objCommand.Properties("Page Size") = 9999

    I have converted most of the vb code over, but this statement gives me a "Property Item is...
  27. Is there a way to launch a program as the local system account?

    Within my VB6 program, I want to launch an exe as the local system account. Anyway to do this?
  28. Re: How to add a message to the event log?

    Works great... THANKS!
  29. Re: How to add a message to the event log?

    No, not sure how to do that. What do I need to give for the target?
  30. [RESOLVED] How to add a message to the event log?

    How do I add a message to the event log? I tried...

    App.LogEvent "Error Occured", vbLogEventTypeError

    It didn't give me an error, but there wasn't a message in my Win7 event log. What am I...
  31. [RESOLVED] Need to display a number in the system tray

    We have Virtual Desktops that have a number in the computer name. For example, VM-1, VM-2, etc. What I want to do is pull out the number and have it appear in the system tray so we know which VM we...
  32. Re: Need to keep checking a value

    Ok, went with a timer and it does work great. Thanks for the help!
  33. Re: Need to keep checking a value

    This program is not freezing up, but I did something similar and had to put DoEvents to keep it from freezing. I was thinking of using a timer unless there is a better way?
  34. Re: Need to keep checking a value

    I have code to do that... I just need to be able to keep Text1.Text update every couple seconds after the first command button is clicked, but then I need it to stop when the second command button is...
  35. [RESOLVED] Need to keep checking a value

    I have a program that will have two buttons on the form...

    Add Printer and Set Default - this button will pop up the Add Printer window.

    Set Default for Everyone - this will set the default...
  36. Replies
    1
    Views
    794

    Re: Automation error

    Nevermind... forgot set the value for strComputer.
  37. Replies
    1
    Views
    794

    [RESOLVED] Automation error

    I'm getting "Automation error" on this line of code...

    Set objComputer = GetObject("winmgmts:{impersonationLevel=Impersonate}!\\" & strComputer & "\root\cimv2:Win32_ComputerSystem.Name='" &...
  38. Re: Need a vb script to delete subfolders

    Thanks... I ended up using this, which might be the same as your code:

    Set oFS = CreateObject("Scripting.FileSystemObject")

    sFolder = "C:\test"

    For Each subfolder in...
  39. [RESOLVED] Need a vb script to delete subfolders

    I have a directory filled with subdirectories. I need vb script that will go into each subdirectory and delete all files and folders within each subdirectory. For example, take the location
    ...
  40. Re: [RESOLVED] How to have Command1 launch when enter key is pushed?

    Well I would only want command1 to happen if the enter key is pressed while the cursor is in text1 textbox, which I think Rhino's first posting is the only one that accomplishes that. I haven't...
Results 1 to 40 of 294
Page 1 of 8 1 2 3 4



Featured


Click Here to Expand Forum to Full Width