Results 1 to 5 of 5

Thread: SendMessage to DOS window...

  1. #1
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 01
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    59,495

    SendMessage to DOS window...

    Is there another way to send information to a DOS window.

    The SendMessage API doesn't work for "ConsoleWindowClass".
    The message stream is restricted by windows for this class.
    I don't want to use the SendKeys function because its flakey.
    I need something solid. I am shelling out the command window
    to run a program under the Administrator group at logon.

    Any ideas or help is greatly appreciated.
    Last edited by RobDog888; Nov 23rd, 2002 at 09:42 PM.

  2. #2
    Hyperactive Member
    Join Date
    Jul 02
    Posts
    296
    VB Code:
    1. Shell ("ping 127.0.0.1")
    Kevin Carpenter
    Currently Working in the CAOS (CA Operating System) Group

  3. #3
    New Member
    Join Date
    Jul 12
    Posts
    2

    Re: SendMessage to DOS window...

    Ten years later I find myself digging through forums begging this same question. Has anyone a solution other than SendKeys? I find that not only is it flakey, I get "\", backslashes, entered on the DOS window for new lines or "enters" from the vba SendKey function.

    Is the edit window of the DOS seperate from the "ConsoleWindowClass", and if so, how is that handle accessed for SendKeys to function?

    Help is much appreciated.

  4. #4
    New Member
    Join Date
    Jul 12
    Posts
    2

    Re: SendMessage to DOS window...

    Had much better luck with this VBSendKeys code. It worked well with my DOS application:

    http://www.devx.com/vb2themax/Tip/19094

  5. #5
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 01
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    59,495

    Re: SendMessage to DOS window...

    I wrote this back in 2005 and can be a possible work around for you

    http://www.vbforums.com/showthread.php?t=364654
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (VBA, VB 6, VB.NET, C#)
    Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Star Wars Gangsta Rap Reps & Rating PostsVS.NET on Vista (New)Multiple .NET Framework Versions (New)Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel Core 2 Extreme Ed., 2 WD Raptor 10K RPM 150 GB HDs RAID 1, 2 GBs DDR2 667 MHz RAM, 3 Viewsonic 17" LCDs, Windows Vista RTM, IE 7, Office 2007

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •