<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-20437785</id><updated>2008-12-09T13:51:08.199-08:00</updated><title type='text'>VB .NET blog</title><subtitle type='html'></subtitle><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default?start-index=26&amp;max-results=25'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.dotnet4all.com/vb-net/atom.xml'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>702</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-20437785.post-113861119630084566</id><published>2006-01-30T00:53:00.000-08:00</published><updated>2007-12-19T22:08:07.069-08:00</updated><title type='text'>Q: For Each loops</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;Q: For Each loops&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Geoff Jones &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;Hi&lt;br /&gt;&lt;br /&gt;Suppose I have a For Each loop, for example,&lt;br /&gt;&lt;br /&gt;For Each x As DataRow In drMyData&lt;br /&gt;' Do stuff - calculation 1&lt;br /&gt;' Do more stuff - calculation 2&lt;br /&gt;' and even more stuff - calculation 3&lt;br /&gt;Next&lt;br /&gt;&lt;br /&gt;If after completing calculation 1, I discover that there is no point doing&lt;br /&gt;calculations 2 and 3, how do I jump back to the start to starting processing&lt;br /&gt;the next DataRow?&lt;br /&gt;&lt;br /&gt;I've tried adding a conditional statement something like:&lt;br /&gt;&lt;br /&gt;If (no point carrying on) Then&lt;br /&gt;    Next&lt;br /&gt;End if&lt;br /&gt;&lt;br /&gt;but I can't get it to compile.&lt;br /&gt;&lt;br /&gt;Can anybody please help?&lt;br /&gt;&lt;br /&gt;Thanks in advance&lt;br /&gt;&lt;br /&gt;Geoff&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;One Handed Man \( OHM - Terry Burns \) &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Simply structure your code differently with conditional branching such as&lt;br /&gt;select case and if's, if you cant cope with that then you could put a goto&lt;br /&gt;statement in, but I try to avoid this if possible&lt;br /&gt;&lt;br /&gt;if then goto continue&lt;br /&gt;continue:&lt;br /&gt;&lt;br /&gt;Next&lt;br /&gt;&lt;br /&gt;-- &lt;br /&gt;&lt;br /&gt;Terry Burns&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Anonymous&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;why not just do this?&lt;br /&gt; For Each x As DataRow In drMyData&lt;br /&gt; ' Do stuff - calculation 1&lt;br /&gt;&lt;br /&gt; ' Do more stuff - calculation 2&lt;br /&gt; ' and even more stuff - calculation 3&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Anonymous&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;not just do this?&lt;br /&gt; For Each x As DataRow In drMyData&lt;br /&gt; ' Do stuff - calculation 1&lt;br /&gt;  if calculation1ok then&lt;br /&gt; '   Do more stuff - calculation 2&lt;br /&gt;    if calculation2ok then&lt;br /&gt;     ' and even more stuff - calculation 3&lt;br /&gt;    end if&lt;br /&gt; end if&lt;br /&gt;Next&lt;br /&gt;&lt;br /&gt;hth&lt;br /&gt;guy&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;PAul Maskens &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Well, it is a FOR loop, how about using LOOP ?&lt;br /&gt;If you want to exit and stop processing any more rows, use EXIT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113861119630084566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113861119630084566' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861119630084566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861119630084566'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/q-for-each-loops.html' title='Q: For Each loops'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113861115912615988</id><published>2006-01-30T00:52:00.001-08:00</published><updated>2006-01-30T00:52:39.126-08:00</updated><title type='text'>How to find a list of SQL Servers?</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;Finding a list of SQL Servers&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Craig G &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;without using SQLDMO&lt;br /&gt;&lt;br /&gt;is there another way, i've used the SQLDMO way but have had a few issues&lt;br /&gt;with it.&lt;br /&gt;&lt;br /&gt;is there another way?&lt;br /&gt;&lt;br /&gt;Cheers,&lt;br /&gt;Craig&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;hirf-spam-me-here@gmx.at (Herfried K. Wagner [MVP])&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;br /&gt;P/invoke, a VB6 sample that needs to be translated before using it can&lt;br /&gt;be found here:&lt;br /&gt;&lt;br /&gt;&amp;lt;URL:http://vbnet.mvps.org/index.html?code/network/netserverenumver.htm&amp;gt;&lt;br /&gt;&lt;br /&gt;-- &lt;br /&gt;Herfried K. Wagner&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113861115912615988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113861115912615988' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861115912615988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861115912615988'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/how-to-find-list-of-sql-servers.html' title='How to find a list of SQL Servers?'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113861112364124113</id><published>2006-01-30T00:52:00.000-08:00</published><updated>2006-01-30T00:52:03.643-08:00</updated><title type='text'>How to find whether an Image is Color or b/w?</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;How to find whether an Image is Color or b/w&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Chellapa &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;For my ImageProcessing Application i need to find whether &lt;br /&gt;an Image is Color or B/W through code for GrayScale &lt;br /&gt;automation purpose, Iam using vb.net and photoshop for &lt;br /&gt;developing the application.&lt;br /&gt;&lt;br /&gt;Image Format is PNG&lt;br /&gt;&lt;br /&gt;Can any one help in this regard.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Chellapandian.S&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;One Handed Man \( OHM - Terry Burns \) &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;You didnt even answer my last reply to this question  !&lt;br /&gt;&lt;br /&gt;-- &lt;br /&gt;&lt;br /&gt; Terry Burns&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113861112364124113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113861112364124113' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861112364124113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861112364124113'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/how-to-find-whether-image-is-color-or_30.html' title='How to find whether an Image is Color or b/w?'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113861109067976904</id><published>2006-01-30T00:51:00.001-08:00</published><updated>2006-01-30T00:51:30.680-08:00</updated><title type='text'>Find Missing Data</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;Find Missing Data&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Justin Emlay &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;I'm hopping someone can help me out on a payroll project I need to&lt;br /&gt;implement.&lt;br /&gt;&lt;br /&gt;To start we are dealing with payroll periods.  So we are dealing with an&lt;br /&gt;exact 10 days (Monday - Friday, 2 weeks).&lt;br /&gt;&lt;br /&gt;I have a dataset as follows (1 week to keep it short):&lt;br /&gt;&lt;br /&gt;Employee 1 - Date 1&lt;br /&gt;Employee 1 - Date 2&lt;br /&gt;Employee 1 - Date 3&lt;br /&gt;Employee 1 - Date 4&lt;br /&gt;Employee 1 - Date 5&lt;br /&gt;Employee 2 - Date 1&lt;br /&gt;Employee 2 - Date 3&lt;br /&gt;Employee 2 - Date 4&lt;br /&gt;Employee 2 - Date 5&lt;br /&gt;&lt;br /&gt;You'll notice Employee 2 - Date 2 is missing.  I need to develop a routine&lt;br /&gt;that will give me all missed dates per employee.&lt;br /&gt;&lt;br /&gt;I'm open to any ideas/theories.  I have one of my own but before I get&lt;br /&gt;started on it I wanted some opinions on it.  I'm not sure how productive&lt;br /&gt;such a routine will be.  It sounds like a cluster f. to me.&lt;br /&gt;Create an array of unique employee numbers&lt;br /&gt;&lt;br /&gt;then&lt;br /&gt;&lt;br /&gt;Loop&lt;br /&gt;through that array and create a second array of unique dates.  If the ubound&lt;br /&gt;of that second array is &amp;lt; 9 then figure out missed date(s) (I have period&lt;br /&gt;start).  Dump employee number and date into a third array.  Destroy second&lt;br /&gt;array.&lt;br /&gt;Next&lt;br /&gt;Thoughts?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Cor Ligthert &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Hi Justin,&lt;br /&gt;&lt;br /&gt;I assume every date is a row.&lt;br /&gt;&lt;br /&gt;Seeing this than there are two question, you want to know if there are dates&lt;br /&gt;missing, that is easy, you set them employee by employee in a dataview, the&lt;br /&gt;count should always be 10.&lt;br /&gt;&lt;br /&gt;Than you can show which dates are there, it should than for every programmer&lt;br /&gt;be very easy to know what is missing.&lt;br /&gt;&lt;br /&gt;(I would first make an array with dates which should be and test when there&lt;br /&gt;is a missing one. The array because you have to deal with weekends which can&lt;br /&gt;make it complex when you do it in a direct routine calculating everytime the&lt;br /&gt;dates)&lt;br /&gt;&lt;br /&gt;I assume that you do not have to test on doubles, which is of course with&lt;br /&gt;that dataview as well a piece of cake.&lt;br /&gt;&lt;br /&gt;Or do I see this the simple?&lt;br /&gt;&lt;br /&gt;Cor&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113861109067976904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113861109067976904' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861109067976904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861109067976904'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/find-missing-data.html' title='Find Missing Data'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113861106234760682</id><published>2006-01-30T00:51:00.000-08:00</published><updated>2006-01-30T00:51:02.346-08:00</updated><title type='text'>Design Tutorials</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;Design Tutorials&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Anonymous&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;I need a couple free tutorials on application design,&lt;br /&gt;I am trying to build a project but i really lack in the design category and its is &lt;br /&gt;affecting my production.&lt;br /&gt;&lt;br /&gt;thanks for the help&lt;br /&gt;&lt;br /&gt;WStoryeII&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Ken Tucker [MVP] &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Hi,&lt;br /&gt;&lt;br /&gt;http://www.microsoft.com/resources/practices/default.mspx&lt;br /&gt;&lt;br /&gt;Ken&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;hirf-spam-me-here@gmx.at (Herfried K. Wagner [MVP])&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;URL:http://www.martinfowler.com/books.html#eaa&amp;gt;&lt;br /&gt;&lt;br /&gt;-- &lt;br /&gt;Herfried K. Wagner&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113861106234760682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113861106234760682' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861106234760682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861106234760682'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/design-tutorials.html' title='Design Tutorials'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113861102846294581</id><published>2006-01-30T00:50:00.000-08:00</published><updated>2006-01-30T00:50:28.463-08:00</updated><title type='text'>Dateformat on databound textboxes?</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;Dateformat on databound textboxes?&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Graham  Blandford &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;Hi all,&lt;br /&gt;&lt;br /&gt;Can anyone tell me how I go about setting a custom date format (or any other&lt;br /&gt;format for that matter) to a textbox that has a databinding?&lt;br /&gt;&lt;br /&gt;In VB6 I would do something like 'set text1.format = myformat', but that&lt;br /&gt;isn;t a format property in VB.NET.&lt;br /&gt;&lt;br /&gt;Any help would be gratefully received.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Graham&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;William Ryan  eMVP &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;You can use Format directly on a value, but if I understand your question&lt;br /&gt;correctly, you'll want to add a handler for the .Format and .Parse events.&lt;br /&gt;This explains it pretty well but let me know if you have any problems.&lt;br /&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscontrolclassbindingcontexttopic.asp&lt;br /&gt;&lt;br /&gt;-- &lt;br /&gt;W.G. Ryan&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113861102846294581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113861102846294581' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861102846294581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861102846294581'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/dateformat-on-databound-textboxes.html' title='Dateformat on databound textboxes?'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113861099705861190</id><published>2006-01-30T00:49:00.001-08:00</published><updated>2006-01-30T00:49:57.060-08:00</updated><title type='text'>Moveable Toolbars</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;Moveable Toolbars&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;VJ &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;I am looking to implement moveable toolbars like in Word, or Visual&lt;br /&gt;Studio... any pointers or articles would great..&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;VJ&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Cor Ligthert &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Hi VJ,&lt;br /&gt;&lt;br /&gt;I made this sample for John Crouse, however the only thing in my opinion&lt;br /&gt;what you have to change basicly are toolbars instead of labels.&lt;br /&gt;&lt;br /&gt;(You can open a windowform application, delete all the code, past this&lt;br /&gt;bellow in and try)&lt;br /&gt;&lt;br /&gt;I hope this helps.&lt;br /&gt;&lt;br /&gt;Cor&lt;br /&gt;&lt;br /&gt;\\Public Class Form1&lt;br /&gt;    Inherits System.Windows.Forms.Form&lt;br /&gt;    Public Sub New()&lt;br /&gt;        MyBase.New()&lt;br /&gt;    End Sub&lt;br /&gt;    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;        If disposing Then&lt;br /&gt;            If Not (components Is Nothing) Then&lt;br /&gt;                components.Dispose()&lt;br /&gt;            End If&lt;br /&gt;        End If&lt;br /&gt;        MyBase.Dispose(disposing)&lt;br /&gt;    End Sub&lt;br /&gt;    Private components As System.ComponentModel.IContainer&lt;br /&gt;    Private WithEvents Label1 As New System.Windows.Forms.Label&lt;br /&gt;    Private WithEvents Label2 As New System.Windows.Forms.Label&lt;br /&gt;    Private mouseX, mouseY As Integer&lt;br /&gt;    Private arLabels() As Label&lt;br /&gt;    Dim myMousedown As String&lt;br /&gt;    Private Sub Form1_Load(ByVal sender As Object, _&lt;br /&gt;    ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;        Me.ClientSize = New System.Drawing.Size(400, 400)&lt;br /&gt;        Label1.Name = "Label1"&lt;br /&gt;        Label2.Name = "Label2"&lt;br /&gt;        arLabels = New Label() {Label1, Label2}&lt;br /&gt;        Dim lblY As Integer = 100&lt;br /&gt;        For Each Lbl As Label In arLabels&lt;br /&gt;            Lbl.Location = New System.Drawing.Point(100, lblY)&lt;br /&gt;            Lbl.ForeColor = Color.Red&lt;br /&gt;            Lbl.BackColor = Color.Transparent&lt;br /&gt;            Lbl.TextAlign = ContentAlignment.MiddleCenter&lt;br /&gt;            Lbl.Text = Lbl.Location.X.ToString &amp; "." &amp;&lt;br /&gt;Lbl.Location.Y.ToString&lt;br /&gt;            AddHandler Lbl.MouseDown, AddressOf Label_MouseDown&lt;br /&gt;            AddHandler Lbl.MouseUp, AddressOf Label_MouseUp&lt;br /&gt;            AddHandler Lbl.MouseMove, AddressOf Label_MouseMove&lt;br /&gt;            lblY += 30&lt;br /&gt;            Me.Controls.Add(Lbl)&lt;br /&gt;        Next&lt;br /&gt;    End Sub&lt;br /&gt;    Private Sub Label_MouseDown(ByVal sender As Object, ByVal _&lt;br /&gt;        e As System.Windows.Forms.MouseEventArgs)&lt;br /&gt;        Dim lbl As Label = DirectCast(sender, Label)&lt;br /&gt;        myMousedown = lbl.Name&lt;br /&gt;        lbl.BringToFront()&lt;br /&gt;        mouseX = Cursor.Position.X - lbl.Location.X&lt;br /&gt;        mouseY = Cursor.Position.Y - lbl.Location.Y&lt;br /&gt;        lbl.Cursor = Cursors.Hand&lt;br /&gt;    End Sub&lt;br /&gt;    Private Sub Label_MouseUp(ByVal sender As Object, ByVal e As _&lt;br /&gt;            System.Windows.Forms.MouseEventArgs)&lt;br /&gt;        Dim lbl As Label = DirectCast(sender, Label)&lt;br /&gt;        myMousedown = ""&lt;br /&gt;        lbl.Cursor = Cursors.Default&lt;br /&gt;    End Sub&lt;br /&gt;    Private Sub Label_MouseMove(ByVal sender As Object, ByVal e _&lt;br /&gt;        As System.Windows.Forms.MouseEventArgs)&lt;br /&gt;        Dim lbl As Label = DirectCast(sender, Label)&lt;br /&gt;        Static LastCursor As Point&lt;br /&gt;        Dim NowCursor As Point = New Point(Cursor.Position.X,&lt;br /&gt;Cursor.Position.Y)&lt;br /&gt;        If Point.op_Inequality(NowCursor, LastCursor) Then&lt;br /&gt;            If myMousedown = lbl.Name Then&lt;br /&gt;                lbl.Location = New System.Drawing.Point(Cursor.Position.X _&lt;br /&gt;                               - mouseX, Cursor.Position.Y - mouseY)&lt;br /&gt;            End If&lt;br /&gt;            LastCursor = Cursor.Position&lt;br /&gt;            lbl.Text = lbl.Location.X.ToString &amp; "." &amp;&lt;br /&gt;lbl.Location.Y.ToString&lt;br /&gt;        End If&lt;br /&gt;    End Sub&lt;br /&gt;End Class&lt;br /&gt;///&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;hirf-spam-me-here@gmx.at (Herfried K. Wagner [MVP])&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;br /&gt;Do you want to implement that on your own or are you looking for&lt;br /&gt;(commercial) components?&lt;br /&gt;&lt;br /&gt;-- &lt;br /&gt;Herfried K. Wagner&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Tom Spink &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Hi, Check out this website:&lt;br /&gt;&lt;br /&gt;http://www.divil.co.uk&lt;br /&gt;&lt;br /&gt;I use his components and they are amazing! So long as the application you&lt;br /&gt;are writing is freeware, the license is free.&lt;br /&gt;&lt;br /&gt;-- &lt;br /&gt;HTH,&lt;br /&gt;-- Tom Spink&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113861099705861190/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113861099705861190' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861099705861190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861099705861190'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/moveable-toolbars.html' title='Moveable Toolbars'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113861096147353192</id><published>2006-01-30T00:49:00.000-08:00</published><updated>2006-01-30T00:49:21.473-08:00</updated><title type='text'>Help with hiding LinkButton in DataList</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;Help with hiding LinkButton in DataList&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;News &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;Hi,&lt;br /&gt;&lt;br /&gt;I need help with datalist and linkbutton.&lt;br /&gt;I need a LinkButton to be visible in datalist only on the condition when&lt;br /&gt;datafield "is_measure_customchecklist" in a db table set to true.&lt;br /&gt;&lt;br /&gt;Here is the code (in parts):&lt;br /&gt;&lt;br /&gt;&amp;lt;asp:DataList id="dtl1"&lt;br /&gt;runat="server"&lt;br /&gt;DataKeyField="program_id"&lt;br /&gt;OnItemCommand="DoItemSelect"&lt;br /&gt;OnItemCreated="Item_Created"&lt;br /&gt;OnItemDataBound="BindProgramGrid" &amp;gt;&lt;br /&gt;&amp;lt;ItemTemplate&amp;gt;&lt;br /&gt;&amp;lt;%# Container.DataItem("name") %&amp;gt; &amp;nbsp;&lt;br /&gt;&amp;lt;asp:LinkButton Visible="false" ID="managechecklist"&lt;br /&gt;CommandName="managechecklist" Text="Manage Checklist"&lt;br /&gt;CommandArgument='&amp;lt;%#DataBinder.Eval(Container.DataItem,&lt;br /&gt;Runat="server" /&amp;gt;&lt;br /&gt;&amp;lt;/ItemTemplate&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;SelectedItemTemplate&amp;gt;&lt;br /&gt;&amp;lt;b&amp;gt;&amp;lt;%# Container.DataItem("name") %&amp;gt;&amp;lt;/b&amp;gt; &amp;nbsp; &amp;lt;asp:LinkButton&lt;br /&gt;CommandName="Editprogram" Text="Edit Program" runat="server" /&amp;gt; &amp;nbsp;&lt;br /&gt;   &amp;lt;asp:LinkButton ID="managechecklist" CommandName="managechecklist"&lt;br /&gt;Text="Manage Checklist" CommandArgument='&amp;lt;%#&lt;br /&gt;DataBinder.Eval(Container.DataItem, "is_measure_customchecklist") %&amp;gt;'&lt;br /&gt;Runat="server" /&amp;gt;&lt;br /&gt;.....&lt;br /&gt;&amp;lt;/SelectedItemTemplate&amp;gt;&lt;br /&gt;1. I tried with this method (below) but can not get value of the&lt;br /&gt;CommandArgument of the LinkButton (understand that commandargument is not&lt;br /&gt;part of DataListItemEventArgs):&lt;br /&gt;&lt;br /&gt;Sub Item_Created(sender As Object, e As DataListItemEventArgs)&lt;br /&gt;If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =&lt;br /&gt;ListItemType.AlternatingItem Then&lt;br /&gt;     ' Retrieve the Label control in the current DataListItem.&lt;br /&gt;      Dim lbtnManageCheckist As LinkButton =&lt;br /&gt;CType(e.Item.FindControl("managechecklist"), LinkButton)&lt;br /&gt;&lt;br /&gt;  lbtnManageCheckist.visible = False&lt;br /&gt;  If lbtnManageCheckist.CommandArgument.toString() Then&lt;br /&gt;       lbtnManageCheckist.visible = True&lt;br /&gt;   End If&lt;br /&gt;&lt;br /&gt; End If&lt;br /&gt;End Sub&lt;br /&gt;2. I tried another way, here I can get the value of CommandArgument value&lt;br /&gt;but setting&lt;br /&gt;of the link button (lbtnManageCheckist.visible = True) to visible is not&lt;br /&gt;working:&lt;br /&gt;&lt;br /&gt;Sub DoItemSelect(sender As Object, e As DataListCommandEventArgs)&lt;br /&gt;If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =&lt;br /&gt;ListItemType.AlternatingItem Then&lt;br /&gt;     ' Retrieve the Label control in the current DataListItem.&lt;br /&gt;      Dim lbtnManageCheckist As LinkButton =&lt;br /&gt;CType(e.Item.FindControl("managechecklist"), LinkButton)&lt;br /&gt;&lt;br /&gt;  lbtnManageCheckist.visible = False&lt;br /&gt;  If lbtnManageCheckist.CommandArgument.toString() Then&lt;br /&gt;       lbtnManageCheckist.visible = True&lt;br /&gt;  End If&lt;br /&gt;&lt;br /&gt; End If&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Can anyone advise what is the better way to get this thing working. I need&lt;br /&gt;link button to appear in DataList on condition "is_measure_customchecklist"&lt;br /&gt;is true&lt;br /&gt;Thank you...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Cor Ligthert &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Hi News,&lt;br /&gt;&lt;br /&gt;Why do you not set that visible and not visible in the server side load&lt;br /&gt;event?&lt;br /&gt;&lt;br /&gt;Cor&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113861096147353192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113861096147353192' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861096147353192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861096147353192'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/help-with-hiding-linkbutton-in.html' title='Help with hiding LinkButton in DataList'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113861093973278025</id><published>2006-01-30T00:48:00.001-08:00</published><updated>2006-01-30T00:48:59.733-08:00</updated><title type='text'>Project converted from VB6 to VB.Net gets subclassed WndProc -- why?</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;Project converted from VB6 to VB.Net gets subclassed WndProc -- why?&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Rob Richardson &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;Greetings!&lt;br /&gt;&lt;br /&gt;I have a VB.Net 2003 project that was originally written in VB6, converted&lt;br /&gt;to VB.Net 2002, and then converted to VB.Net 2003.  I am trying to handle a&lt;br /&gt;form's Resize event.  I put a breakpoint in it and saw that that event got&lt;br /&gt;fired four times before the form's Load event got fired!  I then saw that I&lt;br /&gt;have the following routine in the form's code:&lt;br /&gt;&lt;br /&gt;Private Const WM_SHOWWINDOW = &amp;H18&lt;br /&gt;Private m_loaded As Boolean&lt;br /&gt;Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)&lt;br /&gt;    If m.Msg = WM_SHOWWINDOW Then&lt;br /&gt;        If Not m_loaded Then&lt;br /&gt;            MyBase.OnLoad(New System.EventArgs())&lt;br /&gt;        End If&lt;br /&gt;    End If&lt;br /&gt;    MyBase.WndProc(m)&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;And my form's Load event sets the m_loaded flag to true.&lt;br /&gt;&lt;br /&gt;I never put that routine in.  I presume it was added at some point in one of&lt;br /&gt;those conversions.  Why is it here?&lt;br /&gt;&lt;br /&gt;Thanks!&lt;br /&gt;&lt;br /&gt;Rob&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Tom Spink &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;It's because of the legacy way VB6 handled forms... VB6 was not&lt;br /&gt;Object-Oriented, not even Object-Based.... At a push, I'd call it&lt;br /&gt;Object-Aware....&lt;br /&gt;&lt;br /&gt;Stepping off the Soap Box, The code is designed to emulate the functionality&lt;br /&gt;of the 'Load' keyword in '6:&lt;br /&gt;&lt;br /&gt;&amp;lt;VB6&amp;gt;&lt;br /&gt;    Form1.Show()&lt;br /&gt;&amp;lt;/VB6&amp;gt;&lt;br /&gt;&lt;br /&gt;This will load the form, if not already loaded then show it. So, provided&lt;br /&gt;the Form hasn't been 'Load'ed yet, showing the window will cause the 'Load'&lt;br /&gt;event to occur. Whether you keep it or not is a personal decision... do you&lt;br /&gt;need the functionality that comes with this?&lt;br /&gt;&lt;br /&gt;-- &lt;br /&gt;HTH,&lt;br /&gt;-- Tom Spink&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113861093973278025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113861093973278025' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861093973278025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861093973278025'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/project-converted-from-vb6-to-vbnet.html' title='Project converted from VB6 to VB.Net gets subclassed WndProc -- why?'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113861090779395505</id><published>2006-01-30T00:48:00.000-08:00</published><updated>2006-01-30T00:48:27.793-08:00</updated><title type='text'>.Net says I'm not Online, but I am!</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;.Net says I'm not Online, but I am!&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Selden McCabe &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;While at a client's site today, I suggested looking at one of the .Net&lt;br /&gt;newsgroups.  When I pulled up the .Net start page, and clicked "Online&lt;br /&gt;Resources" it reported that we were not connected to the Internet.&lt;br /&gt;&lt;br /&gt;But we were!&lt;br /&gt;&lt;br /&gt;Does anyone have any idea why this was happening, and what to do about it?&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;   ---Selden McCabe&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Richard Myers &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Perhaps their browser IE was working offline?&lt;br /&gt;&lt;br /&gt;Richard&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113861090779395505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113861090779395505' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861090779395505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861090779395505'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/net-says-im-not-online-but-i-am.html' title='.Net says I&apos;m not Online, but I am!'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113861085454924500</id><published>2006-01-30T00:47:00.000-08:00</published><updated>2006-01-30T00:47:34.550-08:00</updated><title type='text'>Freeware/shareware Windows controls</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;Freeware/shareware Windows controls&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Richard L Rosenheim &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;I'm experimenting with .Net programming and is wondering what free (or&lt;br /&gt;low-cost) UI controls are available for non-commercial use.&lt;br /&gt;&lt;br /&gt;As I'm just playing around with code and concepts at the moment, I'm not&lt;br /&gt;really ready to go out and start purchasing commercial libraries at hundreds&lt;br /&gt;of dollars each.  For one thing, I'm not sure what I'm really looking for in&lt;br /&gt;a library yet.  My primary interest at the moment is playing around with&lt;br /&gt;simulating some of the look and feel of Office 2003 (such as the panels on&lt;br /&gt;the right side of Word, etc.).&lt;br /&gt;&lt;br /&gt;I have looked at various contributions to GotDotNet and I am aware of the&lt;br /&gt;Magic UI Library, which provides docking panels like Visual Studio uses.&lt;br /&gt;I'm wondering if anyone knows of, or care to, recommend any other such&lt;br /&gt;libraries.&lt;br /&gt;&lt;br /&gt;TIA,&lt;br /&gt;&lt;br /&gt;Richard Rosenheim&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;hirf-spam-me-here@gmx.at (Herfried K. Wagner [MVP])&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;br /&gt;Have a look at &amp;lt;URL:http://www.codeproject.com/&amp;gt;,&lt;br /&gt;&amp;lt;URL:http://www.gotdotnet.com/&amp;gt;, &amp;lt;URL:http://www.vbAccelerator.com/&amp;gt; and&lt;br /&gt;the Visual Basic .NET Resource Kit&lt;br /&gt;(&amp;lt;URL:http://msdn.microsoft.com/vbasic/vbrkit/&amp;gt;).&lt;br /&gt;&lt;br /&gt;-- &lt;br /&gt;Herfried K. Wagner&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Richard L Rosenheim &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Thanks.  Looked a little at codeproject.com, seems to be a lot of useful&lt;br /&gt;stuff there.&lt;br /&gt;&lt;br /&gt;Richard Rosenheim&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Oleg Zherebin &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;br /&gt;Try http://www.divil.co.uk/net/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113861085454924500/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113861085454924500' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861085454924500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861085454924500'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/freewareshareware-windows-controls.html' title='Freeware/shareware Windows controls'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113861080857698341</id><published>2006-01-30T00:46:00.001-08:00</published><updated>2006-01-30T00:46:48.576-08:00</updated><title type='text'>Combobox in datagrid?</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;Combobox in datagrid?&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;John Doe &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;Now i know how to manually add a combobox to a datagrid, &lt;br /&gt;but how would i handle the recordset below?&lt;br /&gt;&lt;br /&gt;ID | FirstName | LastName | Job&lt;br /&gt;--------------------------------&lt;br /&gt;1  |Joe        | Smith    | janitor&lt;br /&gt;1  |Joe        | Smith    | cashier&lt;br /&gt;2  |Bob        | Anderson | cook&lt;br /&gt;&lt;br /&gt;I want to bind the above datatable to a datagrid so that &lt;br /&gt;Job field will be a combobox of the appropriate list of &lt;br /&gt;jobs.  So for Joe Smith, it will have janitor and cashier, &lt;br /&gt;for Bob, it will only have cook.  So the datagrid would &lt;br /&gt;only display the two row (one for each person).  Is there &lt;br /&gt;a way to do this without having to look through the rows &lt;br /&gt;and manually adding to the combobox? Some kind of group by &lt;br /&gt;functionality?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Cor Ligthert &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Hi John,&lt;br /&gt;&lt;br /&gt;I assume you mean a dataset and not a recordset.&lt;br /&gt;There is no standard combobox for the datagrid, they all are inheritted&lt;br /&gt;ones, so the answer is  difficult to give with code.&lt;br /&gt;&lt;br /&gt;However the answer is most probably Yes most comboboxes for datagrid work&lt;br /&gt;the same as a normal combobox so you can add in your code the items you&lt;br /&gt;want.&lt;br /&gt;&lt;br /&gt;And when you want it from a datatable than you have to make that datatable.&lt;br /&gt;When you want the selectedvalue, than you need a columntype&lt;br /&gt;datagridcombobox.&lt;br /&gt;&lt;br /&gt;I hope this helps,&lt;br /&gt;&lt;br /&gt;Cor&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113861080857698341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113861080857698341' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861080857698341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861080857698341'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/combobox-in-datagrid.html' title='Combobox in datagrid?'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113861077758165383</id><published>2006-01-30T00:46:00.000-08:00</published><updated>2006-01-30T00:46:17.583-08:00</updated><title type='text'>To parenthesize or not...  Bug in VB.Net?</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;To parenthesize or not...  Bug in VB.Net?&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Anonymous&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;Call me a purist or picky but...&lt;br /&gt;&lt;br /&gt;I've found 2 instances where VB.Net considers parenthesis optional.  Consider the following property, sub, and function in VB.Net:&lt;br /&gt;&lt;br /&gt;Public Property TestProperty() As Integer&lt;br /&gt;    Get&lt;br /&gt;        Return 0&lt;br /&gt;    End Get&lt;br /&gt;    Set(ByVal Value As Integer)&lt;br /&gt;        End Set&lt;br /&gt;End Property&lt;br /&gt;&lt;br /&gt;Private Sub TestSub()&lt;br /&gt;    ' Do nothing&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Private Function TestFunction() As Integer&lt;br /&gt;    Return 0&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;VB.Net allows the following syntax in calling the previous routines:&lt;br /&gt;&lt;br /&gt;1. If Me.TestProperty = 0 Then...      'Looks ok&lt;br /&gt;2. If Me.TestProperty() = 0 Then...    'Huh?&lt;br /&gt;3. If Me.TestFunction() = 0 Then...    'Looks ok&lt;br /&gt;4. If Me.TestFunction = 0 Then...       'Huh?&lt;br /&gt;5. Me.TestSub()                               'Looks ok&lt;br /&gt;&lt;br /&gt;The interesting thing is if you remove the "Me." in call #4, the IDE forces both parenthesis in the syntax.  This leads me to believe #4 is a bug.  This call SHOULD look like #3 because VB.Net now requires parenthesis on all sub/function calls with parameters.  Why should the syntax be any different with a function call without parameters?&lt;br /&gt;&lt;br /&gt;The syntax in call #1 is consistent with the use of properties.  However call #2 looks like a function call, not a property query.  You could make a strong argument that this syntax is ok for two reasons.  First, properties can contain processing code just like a sub or function.  Second, VB.Net properties can take parameters just as a sub or function so they should include the parenthesis.  My argument is either force one syntax or the other, but not both and not neither.  I'd prefer to see #1 instead of #2 simply to tell that it a property that is being accessed as opposed to a function.&lt;br /&gt;&lt;br /&gt;To summarize, I believe call #4 is a bug which I'd like to see fixed.  I believe there is a bug allowing the syntax of both calls #1 and #2.  I'd like to see one or the other fixed.&lt;br /&gt;&lt;br /&gt;Are either of these considered bugs?  Has anyone else seen this?  I couldn't find any posts relating to this anomaly.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;David Browne &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;Consider the following property, sub, and function in VB.Net:&lt;br /&gt;&lt;br /&gt;Well you're certianly not a VB purist.  Empty parameter lists are optional&lt;br /&gt;in VB, they always have been.&lt;br /&gt;&lt;br /&gt;There is no ambiguity in VB like there would be in C or C# since the&lt;br /&gt;function name without the parameter list is not used as a function pointer.&lt;br /&gt;VB has the addressOf operator for that.&lt;br /&gt;&lt;br /&gt;But you wouldn't be the first person to hold the opinion that VB is a bit&lt;br /&gt;sloppy looking.&lt;br /&gt;&lt;br /&gt;David&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Cor Ligthert &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Hi David,&lt;br /&gt;&lt;br /&gt;A lot of other people have the opinion that C type languages are often very&lt;br /&gt;discipline acting as a puritan schoolteacher, who is not telling why however&lt;br /&gt;only that you should.&lt;br /&gt;&lt;br /&gt;:-)&lt;br /&gt;&lt;br /&gt;Cor&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;hirf-spam-me-here@gmx.at (Herfried K. Wagner [MVP])&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;br /&gt;The '()' for calling parameterless methods or accessing parameterless&lt;br /&gt;properties are always optional.  What you are experiencing may be caused&lt;br /&gt;by the IDE's pretty listing/reformatting feature.  Did you try to&lt;br /&gt;compile the code using "VBC.EXE" with and without the parenthesis?&lt;br /&gt;&lt;br /&gt;-- &lt;br /&gt;Herfried K. Wagner;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113861077758165383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113861077758165383' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861077758165383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861077758165383'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/to-parenthesize-or-not-bug-in-vbnet.html' title='To parenthesize or not...  Bug in VB.Net?'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113861073504692362</id><published>2006-01-30T00:45:00.000-08:00</published><updated>2006-01-30T00:45:35.046-08:00</updated><title type='text'>How to change the Color of a Toolbar?</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;Changing the Color of a Toolbar&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Charles A. Lackman &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;Hello,&lt;br /&gt;&lt;br /&gt;I am using the Toolbar from inside VS.NET and am looking for a way to change&lt;br /&gt;it's background color.  When I look it up on Microsoft's Web Site I see that&lt;br /&gt;it is overridden ,but, I am very unsure how to accomplish this.  Any&lt;br /&gt;suggestions will be greatly appreciaed.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;&lt;br /&gt;Chuck&lt;br /&gt;&lt;br /&gt;P.S.  I am using VB.NET.  Thanks&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;hirf-spam-me-here@gmx.at (Herfried K. Wagner [MVP])&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;br /&gt;Set the control's 'Appearance' property to 'Flat' and change the&lt;br /&gt;backcolor of the container the toolbar is placed in.&lt;br /&gt;&lt;br /&gt;-- &lt;br /&gt;Herfried K. Wagner&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Charles A. Lackman &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Thank You,&lt;br /&gt;&lt;br /&gt;Is there a way of doing this without makeing the Appearance Flat?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113861073504692362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113861073504692362' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861073504692362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861073504692362'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/how-to-change-color-of-toolbar.html' title='How to change the Color of a Toolbar?'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113861067844836752</id><published>2006-01-30T00:44:00.000-08:00</published><updated>2006-01-30T00:44:38.450-08:00</updated><title type='text'>How to pass Objects as type System.Object?</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;Passing Objects as type System.Object&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Stephen Travis &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;I'm trying to ReDim a child object after passing the parent object as System.Object and it throws a System.InvalidCastException:&lt;br /&gt;Cast from type 'Object()' to type 'ChildType()' is not valid. If I pass the parent object as its type, the ReDim succeeds. How can I&lt;br /&gt;ReDim a child object from a parent object passed as System.Object?&lt;br /&gt;&lt;br /&gt;Here's the problem...&lt;br /&gt;&lt;br /&gt;  Private Sub Page_Load&lt;br /&gt;        Dim NewParent As New ParentType&lt;br /&gt;        addTwoChildrenSucceeds(NewParent)&lt;br /&gt;        addTwoChildrenFails(NewParent)&lt;br /&gt;    End Sub&lt;br /&gt;&lt;br /&gt;    Public Sub addTwoChildrenFails(ByVal parentobject As System.Object)&lt;br /&gt;        ReDim parentobject.Child(1)    '    Throws the exception.&lt;br /&gt;        parentobject.Child(0) = New ChildType&lt;br /&gt;        parentobject.Child(0).ChildName = "Brian"&lt;br /&gt;        parentobject.Child(1) = New ChildType&lt;br /&gt;        parentobject.Child(1).ChildName = "Gail"&lt;br /&gt;    End Sub&lt;br /&gt;&lt;br /&gt;    Public Sub addTwoChildrenSucceeds(ByVal parentobject As ParentType)&lt;br /&gt;        ReDim parentobject.Child(1)&lt;br /&gt;        parentobject.Child(0) = New ChildType&lt;br /&gt;        parentobject.Child(0).ChildName = "Brian"&lt;br /&gt;        parentobject.Child(1) = New ChildType&lt;br /&gt;        parentobject.Child(1).ChildName = "Gail"&lt;br /&gt;    End Sub&lt;br /&gt;&lt;br /&gt;    Public Class ParentType&lt;br /&gt;        Public ParentName As System.String&lt;br /&gt;        Public Child() As ChildType&lt;br /&gt;    End Class&lt;br /&gt;&lt;br /&gt;    Public Class ChildType&lt;br /&gt;        Public ChildName As System.String&lt;br /&gt;    End Class&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;The Grim Reaper &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;You're nearly there...&lt;br /&gt;&lt;br /&gt;    Public Sub addTwoChildrenFails(ByVal parentobject As System.Object)&lt;br /&gt;        parentobject = DirectCast(parentobject, ParentType)&lt;br /&gt;        ReDim parentobject.Child(1)    '    Doesn't throw an exception any&lt;br /&gt;more&lt;br /&gt;        parentobject.Child(0) = New ChildType&lt;br /&gt;        parentobject.Child(0).ChildName = "Brian"&lt;br /&gt;        parentobject.Child(1) = New ChildType&lt;br /&gt;        parentobject.Child(1).ChildName = "Gail"&lt;br /&gt;    End Sub&lt;br /&gt;&lt;br /&gt;Untested... I'm sure someone else will contradict me.... tis the way of it&lt;br /&gt;:D&lt;br /&gt;_____________________________&lt;br /&gt;The Grim Reaper&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Tom Spink &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Hi, May I ask why you pass it as an object... will you have different&lt;br /&gt;classes being ReDim'med?&lt;br /&gt;&lt;br /&gt;-- &lt;br /&gt;HTH,&lt;br /&gt;-- Tom Spink</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113861067844836752/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113861067844836752' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861067844836752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861067844836752'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/how-to-pass-objects-as-type.html' title='How to pass Objects as type System.Object?'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113861022810733905</id><published>2006-01-30T00:37:00.000-08:00</published><updated>2006-01-30T00:37:08.106-08:00</updated><title type='text'>How to create a Username/Login Page?</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;Creating a Username/Login Page&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Erik T. Nomad &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;Hey...I'd like to link a login page (e-mail address, password) to an access&lt;br /&gt;database on the server whereby users can save items in a "wish list" and&lt;br /&gt;retrieve them later -- even e-mail the wish list to others.  This threatens&lt;br /&gt;to be a pretty big project, but can anyone point me in the right direction?&lt;br /&gt;Thanks.&lt;br /&gt;&lt;br /&gt;Erik&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Lucas Tam &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;This is quite simple with .NET. Take a look at forms authentication.&lt;br /&gt;&lt;br /&gt;http://www.15seconds.com/issue/020220.htm&lt;br /&gt;-- &lt;br /&gt;Lucas Tam&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Erik T. Nomad &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;br /&gt;Excellent.  Thanks!&lt;br /&gt;&lt;br /&gt;Erik&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113861022810733905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113861022810733905' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861022810733905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861022810733905'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/how-to-create-usernamelogin-page.html' title='How to create a Username/Login Page?'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113861015809164861</id><published>2006-01-30T00:35:00.000-08:00</published><updated>2006-01-30T00:35:58.093-08:00</updated><title type='text'>Suggestions to increase the performance of searching my array?</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;Suggestions to increase the performance of searching my array?&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Anonymous&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;I wonder if anyone has suggestions for reducing the amount of time it would take to search my array using the function that I have written.  I want to find a position in the array of an item that matches on all three variables.  Suggestions?&lt;br /&gt;&lt;br /&gt;    Public Shared Function GetArrayPosition(ByVal ipRemoteEndPoint As String, ByVal intEngine_Type As Integer, ByVal intEngine_ID As Integer)&lt;br /&gt;        For i As Integer = 0 To aryDevice.GetUpperBound(1)&lt;br /&gt;            If aryDevice(0, i) = ipRemoteEndPoint.ToString And aryDevice(1, i) = intEngine_Type And aryDevice(2, i) = intEngine_ID Then&lt;br /&gt;                Return i&lt;br /&gt;            End If&lt;br /&gt;        Next&lt;br /&gt;        Return -1&lt;br /&gt;    End Function&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Anonymous&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;How can you create an array include different datatype (String, Integer).&lt;br /&gt;I suggest you use datatable.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Anonymous&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;I was thinking about that after I posted and can change the format of the items so that they are all integers.  Would this improve my situation or do you still recommend using a datatable?&lt;br /&gt;&lt;br /&gt;Dan&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Cablewizard &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Dan,&lt;br /&gt;&lt;br /&gt;First, you don't want to mix types in an array. I noticed you have String and&lt;br /&gt;Integer types.&lt;br /&gt;If all 3 dimensions of your array reference a single item, then I might use an&lt;br /&gt;array of a Structure with a fixed length string.&lt;br /&gt;&lt;br /&gt;Second, do not perform multiple tests in a single line using the "And" operator.&lt;br /&gt;VB must resolve all the expressions prior to evaluating your comparison test.&lt;br /&gt;In cases where the first test fails, it will still perform the other two tests&lt;br /&gt;along with all the unnecessary overhead.&lt;br /&gt;VB.Net does include the "AndAlso" and "OrElse" operators which will provide a&lt;br /&gt;Meaning the first test to fail will cause the whole expression to fail, and&lt;br /&gt;return False without evaluating the subsequent expressions.&lt;br /&gt;IMHO, I prefer to break them into separate tests for readability.&lt;br /&gt;In addition, it also allows you to perform other operations between tests, as in&lt;br /&gt;the case of indexing.&lt;br /&gt;&lt;br /&gt;Third, along with the second, perform your tests in the order which will most&lt;br /&gt;likely give you a False first.&lt;br /&gt;This will allow you to minimize the number of unnecessary comparisons.&lt;br /&gt;Sometimes that fastest way to get to your desired item is to eliminate as many&lt;br /&gt;of the items as quickly as possible that cannot fulfill your criteria.&lt;br /&gt;&lt;br /&gt;Fourth, if you have a large number of elements in the array and you will be&lt;br /&gt;accessing them a lot, then I recommend pre-sorting the array on an appropriate&lt;br /&gt;key. You could also create Index arrays with pointers into the primary array and&lt;br /&gt;use this to minimize the number of elements to test.&lt;br /&gt;The best implementation of an Index, if even appropriate, would be dependant&lt;br /&gt;upon the contents of the array and intended usage.&lt;br /&gt;&lt;br /&gt;Hope this helps,&lt;br /&gt;Gerald&lt;br /&gt;take to search my array using the function that I have written.  I want to find&lt;br /&gt;a position in the array of an item that matches on all three variables.&lt;br /&gt;Suggestions?&lt;br /&gt;ByVal intEngine_Type As Integer, ByVal intEngine_ID As Integer)&lt;br /&gt;= intEngine_Type And aryDevice(2, i) = intEngine_ID Then&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113861015809164861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113861015809164861' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861015809164861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113861015809164861'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/suggestions-to-increase-performance-of.html' title='Suggestions to increase the performance of searching my array?'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113860999845363253</id><published>2006-01-30T00:33:00.000-08:00</published><updated>2006-01-30T00:33:18.453-08:00</updated><title type='text'>Where did my Dataset Go?</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;Where did my Dataset Go?&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Wayne  Wengert &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;I have a VB App (VSNET 2003) in which, during form load, I create a dataset&lt;br /&gt;(ds1) and then populate a datagrid by binding to the dataset. That works&lt;br /&gt;fine. The form has a button which, when clicked, initiates an export&lt;br /&gt;process. When the button click event opens, the dataset is "Nothing". The&lt;br /&gt;dataset is Dim'ed to be available throughout the form. Other variables&lt;br /&gt;dim'ed at that same point are fine and can be used within the button click&lt;br /&gt;event.&lt;br /&gt;&lt;br /&gt;What is closing my dataset?&lt;br /&gt;&lt;br /&gt;Wayne&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Anonymous&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Web app or windows app?&lt;br /&gt;&lt;br /&gt;could we a code example?&lt;br /&gt;&lt;br /&gt;B&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Wayne  Wengert &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Sorry - It is a Windows app.  Portion of code follows:&lt;br /&gt;&lt;br /&gt;====================================&lt;br /&gt;Public Class Form1&lt;br /&gt;&lt;br /&gt;Inherits System.Windows.Forms.Form&lt;br /&gt;&lt;br /&gt;Dim cn As SqlConnection&lt;br /&gt;&lt;br /&gt;Dim strSelectedRegionalID = "Denver"&lt;br /&gt;&lt;br /&gt;Dim strSQL As String&lt;br /&gt;&lt;br /&gt;Dim ds1 As DataSet&lt;br /&gt;&lt;br /&gt;Dim ShowSets As DataRelation&lt;br /&gt;&lt;br /&gt;#Region " Windows Form Designer generated code "&lt;br /&gt;&lt;br /&gt;Public Sub New()&lt;br /&gt;&lt;br /&gt;MyBase.New()&lt;br /&gt;&lt;br /&gt;'This call is required by the Windows Form Designer.&lt;br /&gt;&lt;br /&gt;InitializeComponent()&lt;br /&gt;&lt;br /&gt;'Add any initialization after the InitializeComponent() call&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;'Form overrides dispose to clean up the component list.&lt;br /&gt;&lt;br /&gt;Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;&lt;br /&gt;If disposing Then&lt;br /&gt;&lt;br /&gt;If Not (components Is Nothing) Then&lt;br /&gt;&lt;br /&gt;components.Dispose()&lt;br /&gt;&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;MyBase.Dispose(disposing)&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;'Required by the Windows Form Designer&lt;br /&gt;&lt;br /&gt;Private components As System.ComponentModel.IContainer&lt;br /&gt;&lt;br /&gt;'NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;&lt;br /&gt;'It can be modified using the Windows Form Designer.&lt;br /&gt;&lt;br /&gt;'Do not modify it using the code editor.&lt;br /&gt;&lt;br /&gt;Friend WithEvents DataGrid1 As System.Windows.Forms.DataGrid&lt;br /&gt;&lt;br /&gt;Friend WithEvents btnXMLExport As System.Windows.Forms.Button&lt;br /&gt;&lt;br /&gt;Friend WithEvents SaveFileDialog1 As System.Windows.Forms.SaveFileDialog&lt;br /&gt;&lt;br /&gt;Friend WithEvents DataGrid2 As System.Windows.Forms.DataGrid&lt;br /&gt;&lt;br /&gt;&amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;&lt;br /&gt;Me.DataGrid1 = New System.Windows.Forms.DataGrid&lt;br /&gt;&lt;br /&gt;Me.btnXMLExport = New System.Windows.Forms.Button&lt;br /&gt;&lt;br /&gt;Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog&lt;br /&gt;&lt;br /&gt;Me.DataGrid2 = New System.Windows.Forms.DataGrid&lt;br /&gt;&lt;br /&gt;CType(Me.DataGrid1, System.ComponentModel.ISupportInitialize).BeginInit()&lt;br /&gt;&lt;br /&gt;CType(Me.DataGrid2, System.ComponentModel.ISupportInitialize).BeginInit()&lt;br /&gt;&lt;br /&gt;Me.SuspendLayout()&lt;br /&gt;&lt;br /&gt;'&lt;br /&gt;&lt;br /&gt;'DataGrid1&lt;br /&gt;&lt;br /&gt;'&lt;br /&gt;&lt;br /&gt;Me.DataGrid1.DataMember = ""&lt;br /&gt;&lt;br /&gt;Me.DataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText&lt;br /&gt;&lt;br /&gt;Me.DataGrid1.Location = New System.Drawing.Point(12, 39)&lt;br /&gt;&lt;br /&gt;Me.DataGrid1.Name = "DataGrid1"&lt;br /&gt;&lt;br /&gt;Me.DataGrid1.Size = New System.Drawing.Size(472, 160)&lt;br /&gt;&lt;br /&gt;Me.DataGrid1.TabIndex = 0&lt;br /&gt;&lt;br /&gt;'&lt;br /&gt;&lt;br /&gt;'btnXMLExport&lt;br /&gt;&lt;br /&gt;'&lt;br /&gt;&lt;br /&gt;Me.btnXMLExport.Location = New System.Drawing.Point(186, 429)&lt;br /&gt;&lt;br /&gt;Me.btnXMLExport.Name = "btnXMLExport"&lt;br /&gt;&lt;br /&gt;Me.btnXMLExport.Size = New System.Drawing.Size(104, 23)&lt;br /&gt;&lt;br /&gt;Me.btnXMLExport.TabIndex = 1&lt;br /&gt;&lt;br /&gt;Me.btnXMLExport.Text = "Export to XML"&lt;br /&gt;&lt;br /&gt;'&lt;br /&gt;&lt;br /&gt;'DataGrid2&lt;br /&gt;&lt;br /&gt;'&lt;br /&gt;&lt;br /&gt;Me.DataGrid2.DataMember = ""&lt;br /&gt;&lt;br /&gt;Me.DataGrid2.HeaderForeColor = System.Drawing.SystemColors.ControlText&lt;br /&gt;&lt;br /&gt;Me.DataGrid2.Location = New System.Drawing.Point(12, 239)&lt;br /&gt;&lt;br /&gt;Me.DataGrid2.Name = "DataGrid2"&lt;br /&gt;&lt;br /&gt;Me.DataGrid2.Size = New System.Drawing.Size(472, 146)&lt;br /&gt;&lt;br /&gt;Me.DataGrid2.TabIndex = 2&lt;br /&gt;&lt;br /&gt;'&lt;br /&gt;&lt;br /&gt;'Form1&lt;br /&gt;&lt;br /&gt;'&lt;br /&gt;&lt;br /&gt;Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)&lt;br /&gt;&lt;br /&gt;Me.ClientSize = New System.Drawing.Size(493, 457)&lt;br /&gt;&lt;br /&gt;Me.Controls.Add(Me.DataGrid2)&lt;br /&gt;&lt;br /&gt;Me.Controls.Add(Me.btnXMLExport)&lt;br /&gt;&lt;br /&gt;Me.Controls.Add(Me.DataGrid1)&lt;br /&gt;&lt;br /&gt;Me.Name = "Form1"&lt;br /&gt;&lt;br /&gt;Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen&lt;br /&gt;&lt;br /&gt;Me.Text = "Form1"&lt;br /&gt;&lt;br /&gt;CType(Me.DataGrid1, System.ComponentModel.ISupportInitialize).EndInit()&lt;br /&gt;&lt;br /&gt;CType(Me.DataGrid2, System.ComponentModel.ISupportInitialize).EndInit()&lt;br /&gt;&lt;br /&gt;Me.ResumeLayout(False)&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;#End Region&lt;br /&gt;&lt;br /&gt;Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As&lt;br /&gt;System.EventArgs) Handles MyBase.Load&lt;br /&gt;&lt;br /&gt;'Load the data&lt;br /&gt;&lt;br /&gt;..........................&lt;br /&gt;&lt;br /&gt;DataGrid1.DataSource = ds1&lt;br /&gt;&lt;br /&gt;DataGrid1.DataMember = "CGShows"   '&amp;lt;= ds1 is fine here&lt;br /&gt;&lt;br /&gt;/'Wait for user to Click Button&lt;br /&gt;&lt;br /&gt;Private Sub btnXMLExport_Click(ByVal sender As System.Object, ByVal e As&lt;br /&gt;System.EventArgs) Handles btnXMLExport.Click&lt;br /&gt;&lt;br /&gt;Dim filename As String = "myXmlDoc.xml".&lt;br /&gt;&lt;br /&gt;Dim myFileStream As New System.IO.FileStream(filename,&lt;br /&gt;System.IO.FileMode.Create)&lt;br /&gt;&lt;br /&gt;ds1.WriteXml(myFileStream, XmlWriteMode.WriteSchema)   ' &amp;lt;= ds1 is "Nothing&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113860999845363253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113860999845363253' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113860999845363253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113860999845363253'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/where-did-my-dataset-go.html' title='Where did my Dataset Go?'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113860995150081165</id><published>2006-01-30T00:32:00.000-08:00</published><updated>2006-01-30T00:32:31.500-08:00</updated><title type='text'>Password Filter DLL</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;Password Filter DLL&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Andreas Hecker &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;Hello,&lt;br /&gt;i want to write a password filter dll for windows 2003 server. I found an &lt;br /&gt;example in msdn &lt;br /&gt;http://support.microsoft.com/default.aspx?scid=kb;en-us;151082 wich is &lt;br /&gt;written in c++. I am not able to understand c++ in a way to port this onto &lt;br /&gt;..net framework. Can anybody help me to find out how to solve this problem &lt;br /&gt;using vb .net or c#?&lt;br /&gt;&lt;br /&gt;Thank you for your help&lt;br /&gt;Andreas &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Klaus H. Probst &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Just by looking at that article there's no way you're going to write one in&lt;br /&gt;C#. That API requires a straight callback into the DLL, which you cannot do&lt;br /&gt;in C#.&lt;br /&gt;-- &lt;br /&gt;Klaus H. Probst&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;hirf-spam-me-here@gmx.at (Herfried K. Wagner [MVP])&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;br /&gt;Please do not multipost!&lt;br /&gt;&lt;br /&gt;I replied in the German VB.NET group ;-).&lt;br /&gt;&lt;br /&gt;-- &lt;br /&gt;Herfried K. Wagner&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113860995150081165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113860995150081165' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113860995150081165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113860995150081165'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/password-filter-dll.html' title='Password Filter DLL'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113860991392845852</id><published>2006-01-30T00:31:00.001-08:00</published><updated>2006-01-30T00:31:53.926-08:00</updated><title type='text'>An application framework for VB.NET</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;An application framework for VB.NET&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;alantolan@users.com (SionnachRoe)&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;All,&lt;br /&gt;&lt;br /&gt;I was wondering if there is anything akin to the MFC App/Doc/View&lt;br /&gt;framework available for VB.NET, either as part of .NET, as a&lt;br /&gt;commercial library or as opensource.&lt;br /&gt;Background&lt;br /&gt;==========&lt;br /&gt;&lt;br /&gt;We are moving from VB6 to VB.NET and are planning to write a number of&lt;br /&gt;applications within VB.NET.&lt;br /&gt;&lt;br /&gt;We have a number of ex C++/MFC people who have suggested that we&lt;br /&gt;create an application architecture/framework that can be re-used&lt;br /&gt;throughout all these applications.&lt;br /&gt;&lt;br /&gt;This strikes me as a good idea.&lt;br /&gt;When completed we can create an 'out-of-the-box' application that&lt;br /&gt;provides an amount of basic functionality just by deriving the classes&lt;br /&gt;for the new application from a set of base classes.  We get a common&lt;br /&gt;look and feel for all the company's apps and it should gets us&lt;br /&gt;focussed on constructing common functionality in a single place, not&lt;br /&gt;having each development group  implementing their own version of&lt;br /&gt;something for logging or dataaccess or whatever.&lt;br /&gt;Wins all round.&lt;br /&gt;Problem&lt;br /&gt;=======&lt;br /&gt;&lt;br /&gt;As well as being a good idea this also strikes me as being a LOT of&lt;br /&gt;work.&lt;br /&gt;&lt;br /&gt;So it ocurred to me to ask whether something like this already exists&lt;br /&gt;either that we can use - MS provided, Open Source, whatever - or that&lt;br /&gt;we could license.&lt;br /&gt;&lt;br /&gt;Thanks in advance for all answers/comments.&lt;br /&gt;&lt;br /&gt;S.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Klaus H. Probst &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;It depends on what you consider "framework". There are bits and pieces out&lt;br /&gt;there. For example, MSDN has an article that details a command routing&lt;br /&gt;system for GUI applications, similar to MFCs. Then there are projects like&lt;br /&gt;Genghis. And some of Microsoft's application blocks can be useful. But&lt;br /&gt;there's no unified framework that approaches MFC's depth.&lt;br /&gt;-- &lt;br /&gt;Klaus H. Probst&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Cindy Winegarden &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;Hi Alan,&lt;br /&gt;&lt;br /&gt;Check out MVP Kevin McNeish's Mere Mortals .NET Framework from&lt;br /&gt;http://www.oakleafsd.com/.&lt;br /&gt;&lt;br /&gt;-- &lt;br /&gt;Cindy Winegarden&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113860991392845852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113860991392845852' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113860991392845852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113860991392845852'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/application-framework-for-vbnet.html' title='An application framework for VB.NET'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113860986456141484</id><published>2006-01-30T00:31:00.000-08:00</published><updated>2006-01-30T00:31:05.973-08:00</updated><title type='text'>'System.Net.WebException' - Strange Error</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;'System.Net.WebException' - Strange Error&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;A User &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;Very strange - this code is copy and paste from the net and works on 2 of &lt;br /&gt;my 3 development machines - but of course not the machine I need to run it &lt;br /&gt;on. &lt;br /&gt;&lt;br /&gt;I've seen similar posts, but no solutions that work for me. Is it a problem &lt;br /&gt;with my proxy settings on this 1 machine? I have all the boxes unchecked &lt;br /&gt;for LAN Settings. Net browsing is fine. Other machines are the same.&lt;br /&gt;&lt;br /&gt;The error is:&lt;br /&gt;An unhandled exception of type 'System.Net.WebException' occurred in &lt;br /&gt;system.dll&lt;br /&gt;&lt;br /&gt;Additional information: The underlying connection was closed: The remote &lt;br /&gt;name could not be resolved.&lt;br /&gt;Code for form load:&lt;br /&gt;&lt;br /&gt;        'Create a new WebRequest object, which can only be done through the &lt;br /&gt;static Create method of the WebRequest class &lt;br /&gt;        Dim wrGETURL As WebRequest&lt;br /&gt;        wrGETURL = WebRequest.Create("http:www.cnn.com")&lt;br /&gt;&lt;br /&gt;        'use whatever settings have been configured in Internet Explorer&lt;br /&gt;        wrGETURL.Proxy = WebProxy.GetDefaultProxy()&lt;br /&gt;&lt;br /&gt;        'use it to obtain a Stream object corresponding to the response to &lt;br /&gt;your request.&lt;br /&gt;        Dim objStream As Stream&lt;br /&gt;        objStream = wrGETURL.GetResponse.GetResponseStream()&lt;br /&gt;&lt;br /&gt;        'After you have the response stream, you can treat it like any &lt;br /&gt;other stream (such as from opening a text file) and read through its &lt;br /&gt;contents line by line or even all at once. The loop below reads the stream &lt;br /&gt;one line at a time until the ReadLine method returns Nothing, outputting &lt;br /&gt;each line to the console.&lt;br /&gt;        Dim objReader As New StreamReader(objStream)&lt;br /&gt;        Dim i As Integer = 0&lt;br /&gt;&lt;br /&gt;        Me.TextBox1.Text = objReader.ReadToEnd&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Greg Burns &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;wrGETURL = WebRequest.Create("http:www.cnn.com")&lt;br /&gt;&lt;br /&gt;is that a typo?&lt;br /&gt;&lt;br /&gt;Greg&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;A User &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Indeed that is a typo - and the url does not matter as I've tried a &lt;br /&gt;whole bunch. The problem is exactly as outlined though. Can anyone help?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113860986456141484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113860986456141484' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113860986456141484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113860986456141484'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/systemnetwebexception-strange-error.html' title='&apos;System.Net.WebException&apos; - Strange Error'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113827456827905181</id><published>2006-01-26T03:22:00.001-08:00</published><updated>2006-01-26T03:22:48.280-08:00</updated><title type='text'>Dataset Tablenames &lt;- SQLHelper</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;Dataset Tablenames &lt;- SQLHelper&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Lucas Tam &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;I'm not sure if this is a problem with Microsoft's Application Data Blocks, &lt;br /&gt;but I am using a query like this:&lt;br /&gt;&lt;br /&gt;USE DATABASENAME;SELECT * FROM SOMETABLE&lt;br /&gt;&lt;br /&gt;The tablename property of my datasets are not being set - this causes a &lt;br /&gt;problem with CrystalReports.&lt;br /&gt;&lt;br /&gt;Is there a way to auto-set the Tablename in a dataset?&lt;br /&gt;&lt;br /&gt;Thanks.&lt;br /&gt;&lt;br /&gt;-- &lt;br /&gt;Lucas Tam&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Josh Golden &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;use FillDataset instead of ExecuteDataset.  here's the signature on one of&lt;br /&gt;them. as you can see, the tableNames() array is for this.&lt;br /&gt;&lt;br /&gt;Public Overloads Shared Sub FillDataset(connectionString As String,&lt;br /&gt;commandType As CommandType, commandText As String, dataSet As DataSet,&lt;br /&gt;tableNames() As String)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Lucas Tam &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;Shoot, I was hoping there was some automatic way to pick up the table names &lt;br /&gt;from the database. I'm using System.Reflection to dynamically instantiate &lt;br /&gt;my functions, so any manual work is a bit hard to do.&lt;br /&gt;&lt;br /&gt;Anyhow, thanks for your help!&lt;br /&gt;&lt;br /&gt;-- &lt;br /&gt;Lucas Tam&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113827456827905181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113827456827905181' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113827456827905181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113827456827905181'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/dataset-tablenames-sqlhelper.html' title='Dataset Tablenames &lt;- SQLHelper'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113827452251303649</id><published>2006-01-26T03:22:00.000-08:00</published><updated>2006-01-26T03:22:02.513-08:00</updated><title type='text'>Add handlers to textboxes in a datagrid</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;add handlers to textboxes in a datagrid&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Josh Golden &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;sorry for so many posts recently&lt;br /&gt;&lt;br /&gt;i am loading a datagrid from a datatable.  the shape of the datatable is not&lt;br /&gt;known at design time.  i want to dynamically add event handlers to the&lt;br /&gt;datagrid textboxes.  it would be really easy if i were using a&lt;br /&gt;DataGridTableStyle at design time but that means i know the columns.&lt;br /&gt;&lt;br /&gt;how do i loop through the textboxes in the datagrid?  i will have to do this&lt;br /&gt;after i've used the setDataBinding method of the datagrid.  that's the only&lt;br /&gt;way how i will know how many columns (DataGridTextBoxColumn) there are.&lt;br /&gt;&lt;br /&gt;for each x as DataGridTextBoxColumn in dgOrders.&amp;lt; ? &amp;gt;&lt;br /&gt;    AddHandler x.TextBox.MouseDown, New MouseEventHandler(AddressOf&lt;br /&gt;someMouseDownEvent)&lt;br /&gt;    AddHandler x.TextBox.DoubleClick, New EventHandler(AddressOf&lt;br /&gt;someDoubleClickEvent)&lt;br /&gt;next&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Cor Ligthert &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Josh,&lt;br /&gt;&lt;br /&gt;not&lt;br /&gt;&lt;br /&gt;When the shape of the datasource is not known at runtime you have no&lt;br /&gt;datagrid at runtime as well, so what do you mean with that sentense?.&lt;br /&gt;&lt;br /&gt;However when you want to do something with an event in a databox from a&lt;br /&gt;datagrid, mayby you can than use this sample that I once made?&lt;br /&gt;&lt;br /&gt;Cor&lt;br /&gt;&lt;br /&gt;\\Private WithEvents dtbCol1 As DataGridTextBox&lt;br /&gt;Private ToolTip1 As New ToolTip&lt;br /&gt;')&lt;br /&gt;Private Sub Form1_Load(ByVal sender As Object, _&lt;br /&gt;    ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;        Datagrid1.ReadOnly = True&lt;br /&gt;        Dim ts As New DataGridTableStyle&lt;br /&gt;        ts.MappingName = ds.Tables(0).TableName&lt;br /&gt;        Dim column As New DataGridTextBoxColumn&lt;br /&gt;        ts.GridColumnStyles.Add(column)&lt;br /&gt;        DataGrid1.TableStyles.Add(ts)&lt;br /&gt;        column = DirectCast(ts.GridColumnStyles(0), DataGridTextBoxColumn)&lt;br /&gt;        dtbCol1 = DirectCast(column.TextBox, DataGridTextBox)&lt;br /&gt;        column.MappingName = ds.Tables(0).Columns(0).ColumnName&lt;br /&gt;        column.HeaderText = "Cor"&lt;br /&gt;        column.Width = 30&lt;br /&gt;        dv = New DataView(ds.Tables(0))&lt;br /&gt;        dv.AllowNew = False&lt;br /&gt;        DataGrid1.DataSource = dv&lt;br /&gt;End Sub&lt;br /&gt;Private Sub dtbCol1_ToolTip(ByVal sender As Object, _&lt;br /&gt;    ByVal e As System.EventArgs) Handles dtbCol1.MouseEnter&lt;br /&gt;        ToolTip1.SetToolTip(DirectCast(sender, DataGridTextBox), _&lt;br /&gt;        "Row: " &amp; DataGrid1.CurrentRowIndex + 1)&lt;br /&gt;End Sub&lt;br /&gt;///&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Anonymous&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;I am not sure how you can load the grid and not know the column count.  Are you loading the grtid with a dataset?  If so see this example.&lt;br /&gt;&lt;br /&gt;http://www.wizkil-webs.net/NET/DotNET_Code_Samples.htm#_Toc76871990&lt;br /&gt;&lt;br /&gt;If not I agree with Cor.&lt;br /&gt;&lt;br /&gt;B&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Cor Ligthert &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Hi Brian,&lt;br /&gt;&lt;br /&gt;A dataset is a collection of datatables, where ever you get them, it has to&lt;br /&gt;be there at runtame to be usable with a datagrid. (And the runtime moment is&lt;br /&gt;the moment it is connected as a datasource to the datagrid).&lt;br /&gt;..&lt;br /&gt;A datagrid has always a datasource whatever it is or it has no rows and no&lt;br /&gt;cells.&lt;br /&gt;&lt;br /&gt;So why do you not agree with me?&lt;br /&gt;&lt;br /&gt;Cor&lt;br /&gt;Are you loading the grtid with a dataset?  If so see this example.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Anonymous&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;I know that.. and I did agree with you&lt;br /&gt;&lt;br /&gt;B&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113827452251303649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113827452251303649' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113827452251303649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113827452251303649'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/add-handlers-to-textboxes-in-datagrid.html' title='Add handlers to textboxes in a datagrid'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113827448684684939</id><published>2006-01-26T03:21:00.001-08:00</published><updated>2006-01-26T03:21:26.846-08:00</updated><title type='text'>Datagrid (windows forms)</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;Datagrid (windows forms)&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Anonymous&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;is there like a BeforeColumnEdit() or BeforeRowEdit() event in the datagrid.&lt;br /&gt;&lt;br /&gt;i want to disable a command button when a row in the grid is dirty. (i.e. a column is being currently edited) and enable it after the Changed() or Validated event fires&lt;br /&gt;&lt;br /&gt;i tried the RowChanging(), ColumnChanging() events. but it didnt work.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Ken Tucker [MVP] &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Hi,&lt;br /&gt;&lt;br /&gt;        I would add a handler to the datagridtextboxcolumns textbox &lt;br /&gt;textchanged and validating events to enable or disable the command buttons.&lt;br /&gt;&lt;br /&gt;Dim colName As New DataGridTextBoxColumn&lt;br /&gt;&lt;br /&gt;With colName&lt;br /&gt;&lt;br /&gt;..MappingName = "LastName"&lt;br /&gt;&lt;br /&gt;..HeaderText = "Name"&lt;br /&gt;&lt;br /&gt;..Width = 100&lt;br /&gt;&lt;br /&gt;End With&lt;br /&gt;&lt;br /&gt;AddHandler colName.TextBox.TextChanged, AddressOf TextBox_TextChanged&lt;br /&gt;&lt;br /&gt;AddHandler colName.TextBox.Validating, AddressOf TextBox_Validating&lt;br /&gt;&lt;br /&gt;Private Sub TextBox_Validating(ByVal sender As Object, ByVal e As &lt;br /&gt;System.ComponentModel.CancelEventArgs)&lt;br /&gt;&lt;br /&gt;Debug.WriteLine("Validating")&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Private Sub TextBox_TextChanged(ByVal sender As Object, ByVal e As &lt;br /&gt;System.EventArgs)&lt;br /&gt;&lt;br /&gt;Debug.WriteLine("Text changed")&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Ken&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113827448684684939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113827448684684939' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113827448684684939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113827448684684939'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/datagrid-windows-forms.html' title='Datagrid (windows forms)'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20437785.post-113827446381507295</id><published>2006-01-26T03:21:00.000-08:00</published><updated>2006-01-26T03:21:03.816-08:00</updated><title type='text'>Inheritance problem with custom control</title><content type='html'>&lt;br /&gt;Found the following interesting discussion in the Newsgroups: &lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;b&gt;Inheritance problem with custom control&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Fred Flintstone &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;This is driving me crazy. I've put together a perfect, easy example of&lt;br /&gt;the problem. What I'm doing is creating a custom control, prepopulated&lt;br /&gt;with 4 items when dropped on a form:&lt;br /&gt;&lt;br /&gt;- Create a new Control Library project.&lt;br /&gt;- Inherit System.Windows.Forms.Combobox&lt;br /&gt;- In New(), add this:&lt;br /&gt;&lt;br /&gt;Me.Items.Add("Test1")&lt;br /&gt;Me.Items.Add("Test2")&lt;br /&gt;Me.Items.Add("Test3")&lt;br /&gt;Me.Items.Add("Test4")&lt;br /&gt;&lt;br /&gt;- Build.&lt;br /&gt;- Start a sample project.&lt;br /&gt;- Drop the new control on the form&lt;br /&gt;- Run.&lt;br /&gt;- Pull down combo:&lt;br /&gt;&lt;br /&gt;The combo containts Test1 - Test4, TWICE.&lt;br /&gt;&lt;br /&gt;The problem is, when the new control is dropped on a form, it adds&lt;br /&gt;this to the "Windows Form Designer Generated Code":&lt;br /&gt;&lt;br /&gt;'&lt;br /&gt;'TestCombo1&lt;br /&gt;'&lt;br /&gt;Me.TestCombo1.Items.AddRange(New Object() {"Test1", "Test2", "Test3",&lt;br /&gt;Me.TestCombo1.Location = New System.Drawing.Point(64, 80)&lt;br /&gt;Me.Morecode...&lt;br /&gt;&lt;br /&gt;I can't write any pre-initialized controls because the initialization&lt;br /&gt;is always copied to the application it's being used in, duplicating&lt;br /&gt;the code as demonstrated here. How do I prevent inheritance of the&lt;br /&gt;iniitialization code? (or any code for that matter)&lt;br /&gt;&lt;br /&gt;Thanks!!!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Reply:&lt;/b&gt;&lt;br /&gt;by:&lt;i&gt;Anonymous&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="20"&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Use following code can avoid your problem:&lt;br /&gt;&lt;br /&gt; Dim myArray As String() = {"Test1", "Test2", "Test3", "Test4"}&lt;br /&gt; Me.DataSource = myArray&lt;br /&gt;&lt;br /&gt;Do not need  Me.Items.Add("Test1")&lt;br /&gt;                   Me.Items.Add("Test2")&lt;br /&gt;                   Me.Items.Add("Test3")&lt;br /&gt;                   Me.Items.Add("Test4")&lt;br /&gt;any more&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/113827446381507295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=20437785&amp;postID=113827446381507295' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113827446381507295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20437785/posts/default/113827446381507295'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/vb-net/2006/01/inheritance-problem-with-custom.html' title='Inheritance problem with custom control'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>