<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/1.5.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Helixoft Blog Comments</title>
	<link>http://www.helixoft.com/blog</link>
	<description>Peter Macej - lead developer of VSdocman - talks about Visual Studio tips and automation</description>
	<pubDate>Fri, 09 May 2008 19:32:14 +0000</pubDate>
	<generator>http://wordpress.org/?v=1.5.2</generator>

	<item>
 		<title>Comment on Multiline Search and Replace in Visual Studio by: Ramone Eduardo</title>
		<link>http://www.helixoft.com/blog/archives/15#comment-86</link>
		<pubDate>Wed, 07 May 2008 02:02:24 +0000</pubDate>
		<guid>http://www.helixoft.com/blog/archives/15#comment-86</guid>
					<description>Thank you!</description>
		<content:encoded><![CDATA[	<p>Thank you!
</p>
]]></content:encoded>
				</item>
	<item>
 		<title>Comment on How To Show Full File Path (or Anything Else) in VS 2005 Title Bar by: Derek Morin</title>
		<link>http://www.helixoft.com/blog/archives/32#comment-84</link>
		<pubDate>Wed, 02 Apr 2008 00:08:33 +0000</pubDate>
		<guid>http://www.helixoft.com/blog/archives/32#comment-84</guid>
					<description>Seems to work like a charm.  Too bad it is flashy, but sounds like that is visual studios problem, and you've managed a good workaround.</description>
		<content:encoded><![CDATA[	<p>Seems to work like a charm.  Too bad it is flashy, but sounds like that is visual studios problem, and you&#8217;ve managed a good workaround.
</p>
]]></content:encoded>
				</item>
	<item>
 		<title>Comment on How To Show Full File Path (or Anything Else) in VS 2005 Title Bar by: Peter Macej</title>
		<link>http://www.helixoft.com/blog/archives/32#comment-82</link>
		<pubDate>Mon, 03 Mar 2008 11:43:00 +0000</pubDate>
		<guid>http://www.helixoft.com/blog/archives/32#comment-82</guid>
					<description>Thank you Jimmy. You are right, the timer needs to be disposed when IDE closes. I have updated the code with your function.</description>
		<content:encoded><![CDATA[	<p>Thank you Jimmy. You are right, the timer needs to be disposed when IDE closes. I have updated the code with your function.
</p>
]]></content:encoded>
				</item>
	<item>
 		<title>Comment on How To Show Full File Path (or Anything Else) in VS 2005 Title Bar by: Jimmy</title>
		<link>http://www.helixoft.com/blog/archives/32#comment-81</link>
		<pubDate>Mon, 03 Mar 2008 11:31:24 +0000</pubDate>
		<guid>http://www.helixoft.com/blog/archives/32#comment-81</guid>
					<description>I solved all of the problems I mentioned in my Feb 5 post.

The crash on shutdown is due to the Timer not being Disposed(). I added the following to fix that:

    Public Sub DTEEvents_OnBeginShutdown() Handles DTEEvents.OnBeginShutdown
        If Not timer Is Nothing Then
            timer.Dispose()
        End If
    End Sub

Since I wanted the macro to display information on the solution, I changed the event to be this:

    Public Sub SolutionEvents_OnOpened() Handles SolutionEvents.Opened
        SetupTitlebar()
    End Sub

   Private Sub SetupTitlebar()
        Try
            If timer Is Nothing Then
                ' Create timer which refreshes the caption because
                ' IDE resets the caption very often
                Dim autoEvent As New System.Threading.AutoResetEvent(False)
                Dim timerDelegate As System.Threading.TimerCallback = _
                    AddressOf tick
                timer = New System.Threading.Timer(timerDelegate, autoEvent, 0, 1000)
            End If

            If DTE.Solution Is Nothing Then
                ideTitle = Nothing
            Else
                Dim StartIndex As Integer
                Dim EndIndex As Integer
                Dim Found As Boolean

                Found = False

                ideTitle = DTE.Solution.FullName

                StartIndex = InStr(ideTitle.ToLower(), &quot;:\&quot;)
                If (StartIndex &amp;#62; 0) Then
                    ideTitle = Mid(ideTitle, StartIndex + 2)
                    Found = True

                    StartIndex = InStr(ideTitle.ToLower(), &quot;dev\&quot;)
                    If (StartIndex = 1) Then
                        ideTitle = Mid(ideTitle, StartIndex + 4)
                    End If
                End If

                If (Found) Then
                    EndIndex = InStr(ideTitle, &quot;\&quot;)
                    If (EndIndex &amp;#62; 0) Then
                        ideTitle = Left(ideTitle, EndIndex - 1)
                    End If
                End If
            End If

            showTitle(ideTitle)
        Catch ex As System.Exception
        End Try
    End Sub

This also fixed the focus problems with FindInFiles</description>
		<content:encoded><![CDATA[	<p>I solved all of the problems I mentioned in my Feb 5 post.</p>
	<p>The crash on shutdown is due to the Timer not being Disposed(). I added the following to fix that:</p>
	<p>    Public Sub DTEEvents_OnBeginShutdown() Handles DTEEvents.OnBeginShutdown<br />
        If Not timer Is Nothing Then<br />
            timer.Dispose()<br />
        End If<br />
    End Sub</p>
	<p>Since I wanted the macro to display information on the solution, I changed the event to be this:</p>
	<p>    Public Sub SolutionEvents_OnOpened() Handles SolutionEvents.Opened<br />
        SetupTitlebar()<br />
    End Sub</p>
	<p>   Private Sub SetupTitlebar()<br />
        Try<br />
            If timer Is Nothing Then<br />
                &#8216; Create timer which refreshes the caption because<br />
                &#8216; IDE resets the caption very often<br />
                Dim autoEvent As New System.Threading.AutoResetEvent(False)<br />
                Dim timerDelegate As System.Threading.TimerCallback = _<br />
                    AddressOf tick<br />
                timer = New System.Threading.Timer(timerDelegate, autoEvent, 0, 1000)<br />
            End If</p>
	<p>            If DTE.Solution Is Nothing Then<br />
                ideTitle = Nothing<br />
            Else<br />
                Dim StartIndex As Integer<br />
                Dim EndIndex As Integer<br />
                Dim Found As Boolean</p>
	<p>                Found = False</p>
	<p>                ideTitle = DTE.Solution.FullName</p>
	<p>                StartIndex = InStr(ideTitle.ToLower(), &#8220;:\&#8221;)<br />
                If (StartIndex &gt; 0) Then<br />
                    ideTitle = Mid(ideTitle, StartIndex + 2)<br />
                    Found = True</p>
	<p>                    StartIndex = InStr(ideTitle.ToLower(), &#8220;dev\&#8221;)<br />
                    If (StartIndex = 1) Then<br />
                        ideTitle = Mid(ideTitle, StartIndex + 4)<br />
                    End If<br />
                End If</p>
	<p>                If (Found) Then<br />
                    EndIndex = InStr(ideTitle, &#8220;\&#8221;)<br />
                    If (EndIndex &gt; 0) Then<br />
                        ideTitle = Left(ideTitle, EndIndex - 1)<br />
                    End If<br />
                End If<br />
            End If</p>
	<p>            showTitle(ideTitle)<br />
        Catch ex As System.Exception<br />
        End Try<br />
    End Sub</p>
	<p>This also fixed the focus problems with FindInFiles
</p>
]]></content:encoded>
				</item>
	<item>
 		<title>Comment on How To Show Full File Path (or Anything Else) in VS 2005 Title Bar by: yusheng</title>
		<link>http://www.helixoft.com/blog/archives/32#comment-80</link>
		<pubDate>Mon, 03 Mar 2008 08:11:13 +0000</pubDate>
		<guid>http://www.helixoft.com/blog/archives/32#comment-80</guid>
					<description>This article is very useful for me. I want to write a samilar macros, however, there are some errors.
when the WindowActivated event occurs, I want to adjust the activetated document window. I try to set the GotFocus.Width, it throws an Exception. Then I use the SetWindowPos for a try. But the value of GotFocus.HWnd is zero. The HWnd property is only used for Microsoft in MSDN. I'm not good at VB. I hope you can give me some suggestion about how to adjust the window in this situation. Please email me, yusheng9966@gmail.com</description>
		<content:encoded><![CDATA[	<p>This article is very useful for me. I want to write a samilar macros, however, there are some errors.<br />
when the WindowActivated event occurs, I want to adjust the activetated document window. I try to set the GotFocus.Width, it throws an Exception. Then I use the SetWindowPos for a try. But the value of GotFocus.HWnd is zero. The HWnd property is only used for Microsoft in MSDN. I&#8217;m not good at VB. I hope you can give me some suggestion about how to adjust the window in this situation. Please email me, <a href="mailto:yusheng9966@gmail.com">yusheng9966@gmail.com</a>
</p>
]]></content:encoded>
				</item>
	<item>
 		<title>Comment on Macro for Adding New Property by: JM</title>
		<link>http://www.helixoft.com/blog/archives/14#comment-79</link>
		<pubDate>Tue, 19 Feb 2008 13:33:03 +0000</pubDate>
		<guid>http://www.helixoft.com/blog/archives/14#comment-79</guid>
					<description>These lines will prevent the document from losing focus in VS2008:
        DTE.ActiveDocument.Selection.StartOfLine(0)
        DTE.ActiveDocument.Selection.LineDown(False, 9) 'the 9 comes from the numbers of lines in propertyProcedure
        DTE.ActiveDocument.Selection.EndOfLine()
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Activate() ' else the cursor is gone or so, a little bit strange (focus is lost)
        DTE.UndoContext.Close()

It also sets the mouse cursor beneath the property which is very usefull when adding a lot of prop's.

Thanks for the macro.</description>
		<content:encoded><![CDATA[	<p>These lines will prevent the document from losing focus in VS2008:<br />
        DTE.ActiveDocument.Selection.StartOfLine(0)<br />
        DTE.ActiveDocument.Selection.LineDown(False, 9) &#8216;the 9 comes from the numbers of lines in propertyProcedure<br />
        DTE.ActiveDocument.Selection.EndOfLine()<br />
        DTE.ActiveDocument.Selection.NewLine()<br />
        DTE.ActiveDocument.Activate() &#8216; else the cursor is gone or so, a little bit strange (focus is lost)<br />
        DTE.UndoContext.Close()</p>
	<p>It also sets the mouse cursor beneath the property which is very usefull when adding a lot of prop&#8217;s.</p>
	<p>Thanks for the macro.
</p>
]]></content:encoded>
				</item>
	<item>
 		<title>Comment on How To Disable &#8220;A first chance exception of type&#8230;&#8221; Messages in VS 2005 by: Don</title>
		<link>http://www.helixoft.com/blog/archives/24#comment-77</link>
		<pubDate>Tue, 05 Feb 2008 17:17:47 +0000</pubDate>
		<guid>http://www.helixoft.com/blog/archives/24#comment-77</guid>
					<description>Thank you for this tip! I've had this &quot;A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll&quot; trash obscuring my output window for far too long (making it almost impossible to find the output I really care about).

Too bad VS doesn't provide a more useful filter. As mkmcgregor points out you have to do an ALL or NOTHING filter on exceptions in the output window, but you can still set the Debug:Exceptions to break your code in the debugger for the ones you care about, and ignroe the rest.

Thanks again!</description>
		<content:encoded><![CDATA[	<p>Thank you for this tip! I&#8217;ve had this &#8220;A first chance exception of type &#8216;System.Net.Sockets.SocketException&#8217; occurred in System.dll&#8221; trash obscuring my output window for far too long (making it almost impossible to find the output I really care about).</p>
	<p>Too bad VS doesn&#8217;t provide a more useful filter. As mkmcgregor points out you have to do an ALL or NOTHING filter on exceptions in the output window, but you can still set the Debug:Exceptions to break your code in the debugger for the ones you care about, and ignroe the rest.</p>
	<p>Thanks again!
</p>
]]></content:encoded>
				</item>
	<item>
 		<title>Comment on How To Show Full File Path (or Anything Else) in VS 2005 Title Bar by: Jimmy</title>
		<link>http://www.helixoft.com/blog/archives/32#comment-76</link>
		<pubDate>Mon, 04 Feb 2008 23:20:58 +0000</pubDate>
		<guid>http://www.helixoft.com/blog/archives/32#comment-76</guid>
					<description>I love this macro but I noticed it causes some undesirable side effects in the IDE:

1) Find in Files window has focus taken away from it when I click in it. The workaround is to first click the titlebar for the window and then I can navigate around in it, but the usability is really hampered here.

2) The IDE usually crashes on shutdown. The crash happens in the VS Macros host.

3) The macro only works if a source file is opened. Is there a way to have it use the path of the open Solution instead in that case?

Any ideas how these issues could be worked around?</description>
		<content:encoded><![CDATA[	<p>I love this macro but I noticed it causes some undesirable side effects in the IDE:</p>
	<p>1) Find in Files window has focus taken away from it when I click in it. The workaround is to first click the titlebar for the window and then I can navigate around in it, but the usability is really hampered here.</p>
	<p>2) The IDE usually crashes on shutdown. The crash happens in the VS Macros host.</p>
	<p>3) The macro only works if a source file is opened. Is there a way to have it use the path of the open Solution instead in that case?</p>
	<p>Any ideas how these issues could be worked around?
</p>
]]></content:encoded>
				</item>
	<item>
 		<title>Comment on How To Show Full File Path (or Anything Else) in VS 2005 Title Bar by: Peter Macej</title>
		<link>http://www.helixoft.com/blog/archives/32#comment-75</link>
		<pubDate>Wed, 30 Jan 2008 08:05:16 +0000</pubDate>
		<guid>http://www.helixoft.com/blog/archives/32#comment-75</guid>
					<description>You are right. You have probably set Option Strict On in your macros. The solution is simple. Just use:
SetWindowText(New System.IntPtr(DTE.MainWindow.HWnd), ideTitle &amp;#38; &quot; - &quot; &amp;#38; DTE.Name)
I will update the main post as well.</description>
		<content:encoded><![CDATA[	<p>You are right. You have probably set Option Strict On in your macros. The solution is simple. Just use:<br />
SetWindowText(New System.IntPtr(DTE.MainWindow.HWnd), ideTitle &amp; &#8221; - &#8221; &amp; DTE.Name)<br />
I will update the main post as well.
</p>
]]></content:encoded>
				</item>
	<item>
 		<title>Comment on How To Show Full File Path (or Anything Else) in VS 2005 Title Bar by: santosh</title>
		<link>http://www.helixoft.com/blog/archives/32#comment-74</link>
		<pubDate>Wed, 30 Jan 2008 04:46:19 +0000</pubDate>
		<guid>http://www.helixoft.com/blog/archives/32#comment-74</guid>
					<description>The Macro is not compiling [ok I am trying this for VS 2003]
        SetWindowText(DTE.MainWindow.HWnd, ideTitle &amp;#38; &quot; - &quot; &amp;#38; DTE.Name)
HWND is integer whereas it is expected System.IntPtr. 

Did you try this with 2003 as well? or is there some setting with that IDE?

Thanks for your time!!</description>
		<content:encoded><![CDATA[	<p>The Macro is not compiling [ok I am trying this for VS 2003]<br />
        SetWindowText(DTE.MainWindow.HWnd, ideTitle &amp; &#8221; - &#8221; &amp; DTE.Name)<br />
HWND is integer whereas it is expected System.IntPtr. </p>
	<p>Did you try this with 2003 as well? or is there some setting with that IDE?</p>
	<p>Thanks for your time!!
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
