<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>Dmytro Lapshyn's Blog</title><link>http://blogs.vbcity.com/dmytrol/</link><description>Dmytro Lapshyn's Blog at vbCity</description><managingEditor>Dmytro Lapshin</managingEditor><dc:language>en-US</dc:language><generator>.Text Version 0.95.2004.102</generator><item><dc:creator>Dmytro Lapshin</dc:creator><title>Remote Assistance available programmatically</title><link>http://blogs.vbcity.com/dmytrol/archive/2006/06/12/Remote_Assistace_from_your_code.aspx</link><pubDate>Mon, 12 Jun 2006 12:16:00 GMT</pubDate><guid>http://blogs.vbcity.com/dmytrol/archive/2006/06/12/Remote_Assistace_from_your_code.aspx</guid><description>&lt;FONT face=Georgia&gt;There was an interesting question in a Microsoft newsgroup - can one create Remote Assistance requests programmatically? As it turns out, the answer is yes, and the API to use is called &amp;#8220;PC Health SDK&amp;#8221;. It is a COM API, so even though I am unaware of any managed code solution, one can easily consume the PC Health SDK functionality by building their own interop assembly.&lt;/FONT&gt;&lt;img src ="http://blogs.vbcity.com/dmytrol/aggbug/6044.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Dmytro Lapshin</dc:creator><title>Copperfield's Envy: Disappering Windows Forms Controls</title><link>http://blogs.vbcity.com/dmytrol/archive/2006/05/06/Disappearing_Windows_Forms_Controls.aspx</link><pubDate>Sat, 06 May 2006 14:51:00 GMT</pubDate><guid>http://blogs.vbcity.com/dmytrol/archive/2006/05/06/Disappearing_Windows_Forms_Controls.aspx</guid><description>&lt;P&gt;&lt;FONT face=Georgia size=2&gt;Visual Studio .NET 2003's Windows Forms designer can do better than world's best magicians - it can make controls disappear from a form without any apparent reason. Anyone expecting it not to turn the development process to a magic show should read these KB articles:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.microsoft.com/kb/842706/en-us"&gt;&lt;FONT face=Georgia size=2&gt;http://support.microsoft.com/kb/842706/en-us&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.microsoft.com/kb/818220/en-us"&gt;&lt;FONT face=Georgia size=2&gt;http://support.microsoft.com/kb/818220/en-us&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.microsoft.com/kb/911952/en-us"&gt;&lt;FONT face=Georgia size=2&gt;http://support.microsoft.com/kb/911952/en-us&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.microsoft.com/kb/322730/en-us"&gt;&lt;FONT face=Georgia size=2&gt;http://support.microsoft.com/kb/322730/en-us&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;img src ="http://blogs.vbcity.com/dmytrol/aggbug/5991.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Dmytro Lapshin</dc:creator><title>Keyboard Accords</title><link>http://blogs.vbcity.com/dmytrol/archive/2006/04/26/Keyboard_Accords.aspx</link><pubDate>Wed, 26 Apr 2006 11:52:00 GMT</pubDate><guid>http://blogs.vbcity.com/dmytrol/archive/2006/04/26/Keyboard_Accords.aspx</guid><description>&lt;P&gt;&lt;FONT face=Georgia&gt;My home computer's mouse practically died several days ago. And while I am quite busy to go out and buy a new one, I still have to use my home PC, so my only choice is to use the keyboard.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Georgia&gt;It was not until now&amp;nbsp;when I felt what a great job Microsoft did to enable keyboard support. While I still feel somewhat awkward without the mouse, I nevertheless can access all the features I need in Windows, Outlook and Word. However, certain 3&lt;SUP&gt;rd&lt;/SUP&gt; party applications and Web sites are a different story&amp;nbsp;- they imply that all their users utilize a pointing device. Not always the case, you know :)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Georgia&gt;Moral: If you are working on a client application, make sure the mouse and the keyboard&amp;nbsp;users are equal. Go even as far as putting away your mouse and trying to use your application only with the keyboard. Believe me, your karma will be wa-a-y cleaner! ;)&lt;/FONT&gt;&lt;/P&gt;&lt;img src ="http://blogs.vbcity.com/dmytrol/aggbug/5976.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Dmytro Lapshin</dc:creator><title>A must-read article for anyone dealing with COM interop</title><link>http://blogs.vbcity.com/dmytrol/archive/2006/04/18/COM_Interop_MustRead.aspx</link><pubDate>Tue, 18 Apr 2006 09:40:00 GMT</pubDate><guid>http://blogs.vbcity.com/dmytrol/archive/2006/04/18/COM_Interop_MustRead.aspx</guid><description>&lt;P&gt;&lt;FONT face=Georgia&gt;I was doing a research on a COM interop question posted in microsoft.public.dotnet.framework.interop newsgroup. COM interop is known to be somewhat arcane knowledge, and MSDN seems to give only the very basics. However, there's this guy Aravind C who wrote a very detailed article on COM interop, and I recommend this article to anyone dealing with such bridging &amp;#8220;in the trenches&amp;#8220;:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.codeproject.com/dotnet/cominterop.asp"&gt;&lt;FONT face=Georgia&gt;http://www.codeproject.com/dotnet/cominterop.asp&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Georgia&gt;There's another nice presentation on the same topic prepared by Andrew Troelsen himself (required Acrobat Reader or other software capable of displaying PDF documents):&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://center.org/p/docs/events/715/ComNetInterop.pdf"&gt;http://center.org/p/docs/events/715/ComNetInterop.pdf&lt;/A&gt;&lt;/P&gt;&lt;img src ="http://blogs.vbcity.com/dmytrol/aggbug/5965.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Dmytro Lapshin</dc:creator><title>The right way to update the data source</title><link>http://blogs.vbcity.com/dmytrol/archive/2006/04/13/DataGrid_DataSource_Update.aspx</link><pubDate>Thu, 13 Apr 2006 14:54:00 GMT</pubDate><guid>http://blogs.vbcity.com/dmytrol/archive/2006/04/13/DataGrid_DataSource_Update.aspx</guid><description>&lt;P&gt;&lt;FONT face=Georgia&gt;There are two alternatives when one needs to update a data grid's data source:&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Georgia&gt;By setting the &lt;FONT face="Courier New"&gt;DataSource&lt;/FONT&gt; (and probably the &lt;FONT face="Courier New"&gt;DataMember&lt;/FONT&gt;) properties' values.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Georgia&gt;By using the &lt;FONT face="Courier New"&gt;SetDataBinding&lt;/FONT&gt; method.&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Georgia&gt;In my experience, the latter is &lt;STRONG&gt;the&lt;/STRONG&gt; right way. It just looks like the &lt;FONT face="Courier New"&gt;SetDataBinding&lt;/FONT&gt; method fully updates the grid's state, while just setting the properties does not trigger the complete internal state update sequence.&lt;/FONT&gt;&lt;/P&gt;&lt;img src ="http://blogs.vbcity.com/dmytrol/aggbug/5963.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Dmytro Lapshin</dc:creator><title>Tricking HTML Help Workshop</title><link>http://blogs.vbcity.com/dmytrol/archive/2006/04/12/Tricking_HTML_Help_Workshop.aspx</link><pubDate>Wed, 12 Apr 2006 15:42:00 GMT</pubDate><guid>http://blogs.vbcity.com/dmytrol/archive/2006/04/12/Tricking_HTML_Help_Workshop.aspx</guid><description>&lt;FONT face=Georgia&gt;HTML Help Workshop has an&amp;nbsp;unreasonable limitation - it won't allow you to add anything but HTML files as the topic files. And it does not always recognize files of other types being referenced from an HTML topic. Hence, the workaround is to edit the .hhp file manually and to add the desired topic files to the list. The .hhp files are just plain text files resembling INI files, so the editing is a piece of cake.&lt;/FONT&gt;&lt;img src ="http://blogs.vbcity.com/dmytrol/aggbug/5961.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Dmytro Lapshin</dc:creator><title>Bridging Windows Forms and VB6 UIs</title><link>http://blogs.vbcity.com/dmytrol/archive/2006/04/12/5960.aspx</link><pubDate>Wed, 12 Apr 2006 11:14:00 GMT</pubDate><guid>http://blogs.vbcity.com/dmytrol/archive/2006/04/12/5960.aspx</guid><description>&lt;P&gt;&lt;FONT face=Georgia&gt;I wouldn't say that bridging non-visual .NET and COM components is an easy task, but at least this one is quite well documented nowadays. However, sometimes one needs to plug in a piece of UI developed in VB6 into a .NET client (or vice versa).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Georgia&gt;Well, I do know this is not a recommended scenario and a bad design practice. But if only all applcations we deal with were designed properly... the world would be a much better place! But since we leave in the real world, it's gonna cost us some sweat to &amp;#8220;befriend&amp;#8221; the legacy and the managed code.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Georgia&gt;Apparently, we need a common deniminator. And the good old window handle (HWND) will serve as the one. Both VB6 and .NET Windows Forms can easily give us the handle of a form. And both can rather easily consume Windows API. So-o... guess what? We are going one level down and employing the API level to establish the parent and child relationship between, say, the main .NET form and a child VB6 one through the SetParent API.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Georgia&gt;So, basically, what we need to do is to pass the handle of the parent window to the other side of the &amp;#8220;bridge&amp;#8221; and use the passed handle properly to become a &amp;#8220;docile child&amp;#8221;.&lt;/FONT&gt;&lt;/P&gt;&lt;img src ="http://blogs.vbcity.com/dmytrol/aggbug/5960.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Dmytro Lapshin</dc:creator><title>Painful Recycle</title><link>http://blogs.vbcity.com/dmytrol/archive/2006/04/11/Painful_Recycle.aspx</link><pubDate>Tue, 11 Apr 2006 10:42:00 GMT</pubDate><guid>http://blogs.vbcity.com/dmytrol/archive/2006/04/11/Painful_Recycle.aspx</guid><description>&lt;P&gt;&lt;FONT face=Georgia&gt;I was helping out a colleague with a nasty ASP .NET problem the other day. The problem we&amp;nbsp;were&amp;nbsp;dealing with was related to an application pool that became irresponsive once in a while. The system event log indicated some problems, but we couldn't figure out how the events logged were related to the problem itself - as usual, the event descriptions were less than helpful. At that time, the only thing I could suggest was looking up Google groups and the MS KB for any articles that could provide insight into the strange thing happening.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Georgia&gt;Several days later, I followed up with the guy and he told me they found the root cause. I am posting it here with his permission.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Georgia&gt;So, the root cause was related to the application pool being recycled too often (every 20 min. or so). Given that it was a production Web server under quite a high load, the situation was like this: &lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Georgia&gt;IIS was still trying to shut down the old instance still dealing with a queue of requests&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Georgia&gt;While the old instance was still running, the new instance of the pool couldn't be started&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Georgia&gt;As a consequence, new requests were plainly rejected with a non-descriptive ASP .NET error&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Georgia&gt;Morale: Watch out for IIS application pool recycle and health settings. When improperly configured, these can cause you a lot of trouble.&lt;/FONT&gt;&lt;/P&gt;&lt;img src ="http://blogs.vbcity.com/dmytrol/aggbug/5957.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>