Open documents in VS

Open documents in VS

Post by Mark » Wed, 28 May 2003 18:01:30



Hello,
I'm having the following problem. When I open about 10 documents in VS then
the names don't appear on the tabs. The tooltiptext does appear but not the
names on the tabs. I don't have this problem when I run VS on Win2000, only
on XP.
Any suggestions ?

TIA,

Mark

 
 
 

Open documents in VS

Post by Mark » Wed, 28 May 2003 21:26:08


I solved it myself. It was the driver of the video card that was out of date
!


Quote:> Hello,
> I'm having the following problem. When I open about 10 documents in VS
then
> the names don't appear on the tabs. The tooltiptext does appear but not
the
> names on the tabs. I don't have this problem when I run VS on Win2000,
only
> on XP.
> Any suggestions ?

> TIA,

> Mark


 
 
 

1. Document object leak with DTE.Documents.Open

Hi!

I am working on a VS.NET macro that is opening and closing a lot of files.
Currently I am using DTE.Documents.Open to open a file. That function
returns a Document object which I am storing, using and closing at the
end using Document.Close(). But looking at DTE.Documents.Count I see that
studio is not closing the documents correctly.
When using DTE.ItemOperations.OpenFile to open the file, that error does
not occur. Still I would prefer DTE.Documents.Open because it returns a
Document object.
You can test it really simple:
1. call TellNumberOfOpenDocuments
2. call open1
3. call TellNumberOfOpenDocuments (incremented by one)
4. close the window in the GUI
5. call TellNumberOfOpenDocuments (original value)

6. call open2
7. call TellNumberOfOpenDocuments (incremented by one)
8. close the window in the GUI
9. call TellNumberOfOpenDocuments (still incremented)

Of course the file still is open (not in a window!) when I close it in
the macro. I just present it with the GUI close to show that is it not
only an error in my closing code.
The error also occurs when i replace open2 with
Dim doc as Document = DTE.Documents.Open("C:\boot.ini")
doc = Nothing

Am i doing anything wrong, or is it a bug in VC.NET?

Kind regards,
Werner Henze...

Option Strict On
Option Explicit On
Imports EnvDTE
Imports System.Diagnostics
Public Module Temp

Sub TellNumberOfOpenDocuments()
    MsgBox(CStr(DTE.Documents.Count))
End Sub

Sub open1()
    DTE.ItemOperations.OpenFile("C:\boot.ini")
End Sub

Sub open2()
    DTE.Documents.Open("C:\boot.ini")
End Sub

End Module

2. Q: Color Printer Options

3. Visual studio add-ins - documented?

4. PGP 5 menu... Is this a bug?

5. .NET Add-ins in Excel do not show up in Add-ins

6. Time Expired Software!

7. VS.NET add-ins events

8. ===> A "Runner's Log" for the Amiga <===

9. VS.NET Add-ins: How to customize ToolBox programmatically?

10. Vs Add-ins

11. Outlook 2002 COM Add-ins in VS.Net RTM

12. developing VS.Net Plug-Ins

13. VS.NET add-ins and customization.