Results 1 to 5 of 5

Thread: SendMessage to DOS window...

  1. #1

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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 10:42 PM.

  2. #2
    Hyperactive Member
    Join Date
    Jul 2002
    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 2012
    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 2012
    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

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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 (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions 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 i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

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



Click Here to Expand Forum to Full Width