Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / September 2006

Tip: Looking for answers? Try searching our database.

Macro: OutputWindowPane.OutputString() is delayed

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Boris - 21 Sep 2006 20:28 GMT
I want to output some data in OutputWindowPane while a rather lengthy macro
is running. The problem is that I don't see any output until the macro is
finished - then all the output appears at once.

When you click on the IDE of Visual Studio 2005 while the macro is running
you see a delay notification dialog. While this dialog is displayed output
appears in the OutputWindowPane one after another.

It seems like output is cached and you must force the IDE to display it.
Does anyone know how to do this?

Boris
Oenone - 27 Sep 2006 16:12 GMT
> I want to output some data in OutputWindowPane while a rather lengthy
> macro is running. The problem is that I don't see any output until
> the macro is finished - then all the output appears at once.

I'm afraid I can't (currently) help with the problem, but I am curious as to
how you're getting any output to appear at all.

I have a macro that runs on the OnBuildDone event, and I've tried everything
I can think of to get it to communicate with the user that initiated the
compilation. The only thing I've managed to do is display a MsgBox(), which
is much too intrusive for what I'm trying to do.

If you could let me see how you're getting text to the OutputWindowPane I'd
be most grateful. In return I'll see if I can find any way to get it to
display immediately.

TIA,

Signature

(O)enone

Boris - 28 Sep 2006 01:32 GMT
> [...] If you could let me see how you're getting text to the
> OutputWindowPane I'd be most grateful. In return I'll see if I can
> find any way to get it to display immediately.

Check out the Utilities module in the Samples project. There is a function
called GetOutputWindowPane. I copied this function to my own project and use
it like this:

Dim outputWindowPane As EnvDTE.OutputWindowPane
outputWindowPane = GetOutputWindowPane("My report")
outputWindowPane.OutputString("Test" + vbLf)

HTH,
Boris
Dirk - 28 Sep 2006 02:03 GMT
>> I want to output some data in OutputWindowPane while a rather lengthy
>> macro is running. The problem is that I don't see any output until
>> the macro is finished - then all the output appears at once.
>
> I'm afraid I can't (currently) help with the problem, but I am curious as
> to how you're getting any output to appear at all.

I have the same problem as the original poster. The output is only visible
when the macro has finished. I hope there is something like Excel's
Application.ScreenUpdating. Here is how I display the output.

' Prepare output pane
With DTE.ToolWindows.OutputWindow.OutputWindowPanes
Try
 ' Get existing "Macros" pane
 outputPane = .Item("Macros")
Catch ex As ArgumentException
 ' Does not exist yet, create new one
 outputPane = .Add("Macros")
End Try
outputPane.Clear()
outputPane.Activate()
End With
' Make output window visible
DTE.ToolWindows.OutputWindow.Parent.Visible = True

' Then call this method during macro execution to display something
' Writes a single line including line feed to the output pane.
Private Sub OutputWriteLine(ByVal format As String, ByVal ParamArray args As
Object())
 outputPane.OutputString(String.Format(format, args) & vbCrLf)
End Sub

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.