Results 1 to 4 of 4

Thread: [RESOLVED] programmatically clear the immediate (debug) window

  1. #1

    Thread Starter
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,422

    Resolved [RESOLVED] programmatically clear the immediate (debug) window

    how can i programmatically clear the immediate (debug) window?

    thanks for your help

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: programmatically clear the immediate (debug) window

    http://www.codeguru.com/forum/showthread.php?t=393558

    Second result in a Google search for clear immediate window.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,422

    Re: programmatically clear the immediate (debug) window

    for anyone else looking for that, its:

    vb Code:
    1. Imports Extensibility
    2. Imports EnvDTE
    3. Imports EnvDTE80
    4.  
    5. Private Sub ClearImmediateWindow()
    6.     Dim dteObject As EnvDTE.DTE = System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.9.0") 'vb2008
    7.     Dim currentActiveWindow As Window = dteObject.ActiveWindow
    8.     dteObject.Windows.Item("{ECB7191A-597B-41F5-9843-03A4CF275DDE}").Activate() 'Immediate Window
    9.     dteObject.ExecuteCommand("Edit.SelectAll")
    10.     dteObject.ExecuteCommand("Edit.ClearAll")
    11.     currentActiveWindow.Activate()
    12. End Sub

  4. #4
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: programmatically clear the immediate (debug) window

    Dont forget to mark your thread as resolved
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


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