Results 1 to 5 of 5

Thread: outlining code [RESOLVED]

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489

    Resolved outlining code [RESOLVED]

    how do u make the source code automaticlly collapse to definitions when opening the file?

    I have outlining mode on but everytime I open a file, I need to manually collapse.
    Last edited by Andy; Apr 5th, 2005 at 08:55 PM.

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    I think it has to do with what's opwn/closed at the time you save the file.

    TG
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367
    Add this to the Enviorment Events in the MacroIDE
    VB Code:
    1. Private blnLoading As Boolean
    2.  
    3.     Private Sub DocumentEvents_DocumentOpened(ByVal Document As EnvDTE.Document) Handles DocumentEvents.DocumentOpened
    4.  
    5.         blnLoading = True
    6.  
    7.     End Sub
    8.  
    9.     Private Sub WindowEvents_WindowActivated(ByVal GotFocus As EnvDTE.Window, ByVal LostFocus As EnvDTE.Window) Handles WindowEvents.WindowActivated
    10.         If blnLoading Then
    11.             DTE.ExecuteCommand("Edit.CollapsetoDefinitions")
    12.             blnLoading = False
    13.         End If
    14.  
    15.     End Sub

  4. #4
    Hyperactive Member
    Join Date
    Jul 2004
    Location
    Kansas, USA
    Posts
    352
    How Does one edit the MacroIDE?
    Thanks,
    Eric
    --------------------------------------------------------------------------------------------------------------------
    VB.net/C# ... Visual Studio 2019
    "None of us are as smart as all of us."

  5. #5
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367
    Tools->Macros->Macro IDE
    or
    Alt-F11

    This may only be available in Enterprise or Professional (I am not sure which)

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