<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3070784159948148239</id><updated>2012-02-09T21:57:16.630-08:00</updated><category term='dbadmin'/><category term='story'/><category term='emailclient'/><category term='_excel'/><category term='path'/><category term='picture'/><category term='_addons'/><category term='_t-sql'/><category term='browser'/><category term='_vb6'/><category term='messanger'/><category term='random'/><category term='index'/><category term='link'/><category term='performance'/><category term='_vbscript'/><category term='_windows'/><category term='data'/><category term='_system'/><category term='null'/><category term='backup'/><title type='text'>Programmer Collection</title><subtitle type='html'>Programming Tips and Tricks</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default?start-index=101&amp;max-results=100'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>121</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-6418592321743450963</id><published>2011-09-19T21:52:00.000-07:00</published><updated>2011-09-19T21:52:57.922-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[mssql] How to get length of Text, NText and Image columns in SQL Server</title><summary type='text'>Problem
There is sometimes a need to figure out the  maximum space that is being used by a particular column in your  database.  You would initially think that the LEN()  function would allow you to do this, but this function does not work on  Text, NText or Image data types, so how do you figure out the length of  a value in a column that has one of these data types?

SolutionIn addition to the </summary><link rel='related' href='http://www.mssqltips.com/sqlservertip/1188/how-to-get-length-of-text-ntext-and-image-columns-in-sql-server/' title='[mssql] How to get length of Text, NText and Image columns in SQL Server'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/6418592321743450963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2011/09/mssql-how-to-get-length-of-text-ntext.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/6418592321743450963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/6418592321743450963'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2011/09/mssql-how-to-get-length-of-text-ntext.html' title='[mssql] How to get length of Text, NText and Image columns in SQL Server'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-1822241900141949374</id><published>2011-08-19T00:19:00.000-07:00</published><updated>2011-08-19T00:20:29.475-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[mssql] ^ (Cap) is not the same with SQUARE()</title><summary type='text'>Never use the ^ (cap sign) to replace the SQUARE() function.

SELECT 1024 ^ 2result: 1026

SELECT SQUARE(1024)result: 1048576

You see the difference!</summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/1822241900141949374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2011/08/mssql-cap-is-not-same-with-square.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/1822241900141949374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/1822241900141949374'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2011/08/mssql-cap-is-not-same-with-square.html' title='[mssql] ^ (Cap) is not the same with SQUARE()'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-2767355804534611497</id><published>2011-07-05T02:02:00.000-07:00</published><updated>2011-07-05T02:02:50.352-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_excel'/><title type='text'>[EXCEL] Week Number</title><summary type='text'>Introduction Many applications and organizations use the week number of a date for some sort of identification, classification, or formatting purpose. However, what constitutes a week number, specifically when does Week 1 begin, is not always the same from one organization or application to another. This page describes worksheet formulas and VBA procedures that you can use to calculate a week </summary><link rel='related' href='http://www.cpearson.com/excel/WeekNumbers.aspx' title='[EXCEL] Week Number'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/2767355804534611497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2011/07/excel-week-number.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/2767355804534611497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/2767355804534611497'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2011/07/excel-week-number.html' title='[EXCEL] Week Number'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-6929023605204411619</id><published>2011-05-08T22:05:00.000-07:00</published><updated>2011-05-08T22:06:26.538-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vbscript'/><title type='text'>[vb] Terbilang (also for Visual Basic Editor in EXCEL)</title><summary type='text'>Syntax: Terbilang(12345)
Result: Dua Belas Ribu Tiga Ratus Empat Puluh Lima Rupiah
 Option Explicit

Function Terbilang(InputAngka As Double) As String
  Dim I%, strMaxDigit$, arrLevel, arrAngka, TempRp$
  
  arrAngka = Array("", "Se", "Dua", "Tiga", "Empat", "Lima", "Enam", "Tujuh", "Delapan", _"Sembilan", "Sepuluh")
  arrLevel = Array("Triliun ", "Miliar ", "Juta ", "Ribu ", "")
  strMaxDigit =</summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/6929023605204411619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2011/05/vb-terbilang-also-for-visual-basic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/6929023605204411619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/6929023605204411619'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2011/05/vb-terbilang-also-for-visual-basic.html' title='[vb] Terbilang (also for Visual Basic Editor in EXCEL)'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-994823919877938146</id><published>2010-12-07T17:21:00.000-08:00</published><updated>2010-12-08T00:07:12.365-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[mssql] How to handle a Delimited String similar to handle an Array() of Values</title><summary type='text'>Often there is the desire to pass data to T-SQL as an array() of values, yet T-SQL does not provide an array() datatype.

The  following presents one method to simulate handling an array() using  T-SQL. The client application creates a single-variate array(), and then  passes that array() as a VARCHAR() parameter to a SQL Stored Procedure.  The Stored Procedure, in turn, passes that VARCHAR(), or</summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/994823919877938146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2010/12/mssql-how-to-handle-delimited-string.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/994823919877938146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/994823919877938146'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2010/12/mssql-how-to-handle-delimited-string.html' title='[mssql] How to handle a Delimited String similar to handle an Array() of Values'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-9157788168649853948</id><published>2010-11-25T00:17:00.000-08:00</published><updated>2010-12-07T17:24:02.559-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[mysql] Selecting Random Selection Of Rows From A Database Table</title><summary type='text'>The begining of this story is a PHPNuke module. The module has a block  that picks a random item from a database table and displays it. The  content of the table never changes. Here is how the programmer of the  block does it:

He knows that there are 6899 rows because the last id in the table has a  value of 6899. So with the "rand" PHP function, he picks a random  number from 1 to 6899 and then</summary><link rel='related' href='http://www.mustap.com/databasezone_post_141_mysql-rand-function' title='[mysql] Selecting Random Selection Of Rows From A Database Table'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/9157788168649853948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2010/11/mysql-rand-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/9157788168649853948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/9157788168649853948'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2010/11/mysql-rand-function.html' title='[mysql] Selecting Random Selection Of Rows From A Database Table'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-3171432963047419064</id><published>2010-11-24T23:31:00.000-08:00</published><updated>2010-11-24T23:33:34.160-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[mssql] Selecting Random Selection Of Rows From A Database Table</title><summary type='text'>I found a nice tip  for selecting random rows from within a SQL Server 2000 database. Well  actually, pseudorandom. Since my undergraduate thesis was on the topic  of pseudorandom number generation, I might as well be precise. For some  reason, my non-geek friends find it awfully funny when I mention  pseudorandom numbers.

I digress. In order to select 10 records from some table at random, try </summary><link rel='related' href='http://haacked.com/archive/2004/06/21/658.aspx' title='[mssql] Selecting Random Selection Of Rows From A Database Table'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/3171432963047419064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2010/11/t-sql-selecting-random-selection-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/3171432963047419064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/3171432963047419064'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2010/11/t-sql-selecting-random-selection-of.html' title='[mssql] Selecting Random Selection Of Rows From A Database Table'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-5192048563718296000</id><published>2010-11-02T18:51:00.000-07:00</published><updated>2010-11-24T23:50:00.852-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[mssql] Compare the records of two tables in SQL Server</title><summary type='text'>When you have two tables (or resultsets from SELECT statements) that  you wish to compare, and you want to see any changes in ANY columns, as  well as to see which rows exist in 1 table but not the other (in either  direction) I have found that the UNION operator works quite well.

UNION allows you to compare all columns very quickly, and also  handles comparing NULL values to other NULLs </summary><link rel='related' href='http://weblogs.sqlteam.com/jeffs/archive/2004/11/10/2737.aspx' title='[mssql] Compare the records of two tables in SQL Server'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/5192048563718296000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2010/11/compare-records-of-two-tables-in-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5192048563718296000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5192048563718296000'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2010/11/compare-records-of-two-tables-in-sql.html' title='[mssql] Compare the records of two tables in SQL Server'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-2253955827879507791</id><published>2010-09-07T17:38:00.000-07:00</published><updated>2010-11-24T23:34:03.821-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[mssql] Database in Recovery Status</title><summary type='text'>Q: I have a database currently showing to be in recovery.  I have not been  able to find a GUI method to monitor the progress (to determine when it  might complete) so is there a command line T-SQL method to monitor the  recovery process?

A: If this is 2005, this might be what you need:

&lt;!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
 {mso-style-parent:"";
 margin:0in;
 </summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/2253955827879507791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2010/09/database-in-recovery-status.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/2253955827879507791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/2253955827879507791'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2010/09/database-in-recovery-status.html' title='[mssql] Database in Recovery Status'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-4011437390578026741</id><published>2010-06-15T20:56:00.000-07:00</published><updated>2010-06-15T20:58:24.224-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[mssql] How do I format money/decimal with commas?</title><summary type='text'>Sometimes you want to have your  money fields properly formatted with commas like this: 13,243,543.57
You  can use the CONVERT function and give a value between 0 and 2 to the  style and the format will be displayed based on that 

Below is an  example:

&lt;!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
 {mso-style-parent:"";
 margin:0in;
 margin-bottom:.0001pt;
 </summary><link rel='related' href='http://www.tek-tips.com/faqs.cfm?fid=6157' title='[mssql] How do I format money/decimal with commas?'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/4011437390578026741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2010/06/mssql-how-do-i-format-moneydecimal-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4011437390578026741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4011437390578026741'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2010/06/mssql-how-do-i-format-moneydecimal-with.html' title='[mssql] How do I format money/decimal with commas?'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-2628529247397312873</id><published>2010-06-15T19:36:00.000-07:00</published><updated>2010-06-15T20:29:50.579-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[mssql] How To Get Output Into SQL Server Table</title><summary type='text'>Have you  every needed to get the information returned from a stored procedure (SP) into a SQL Server  table? Or have you wondered how you might get the contents of an operating system (OS) file into a SQL Server table?  How about placing the output of some Windows executable into a  SQL Server table so you can  manipulate it with T-SQL in some way?   So, what methods can you use to accomplish </summary><link rel='related' href='http://www.databasejournal.com/features/mssql/article.php/3386661/How-To-Get-Output-Into-SQL-Server-Table.htm' title='[mssql] How To Get Output Into SQL Server Table'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/2628529247397312873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2010/06/mssql-how-to-get-output-into-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/2628529247397312873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/2628529247397312873'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2010/06/mssql-how-to-get-output-into-sql-server.html' title='[mssql] How To Get Output Into SQL Server Table'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-8392000406557416586</id><published>2009-11-16T16:39:00.000-08:00</published><updated>2009-11-16T16:40:38.858-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[mssql] REPLACE Multiple Spaces with One</title><summary type='text'>IntroductionReplacing multiple spaces with a single space is an old problem. If you Google the problem, you find that most folks still resort to While Loops in functions or maybe even a Tally table or (ugh!) XML in a function to solve this seemingly complex problem. The truth is that you don't need the RBAR of a User Defined Function at all.

This article explains the "puzzle solving" behind a </summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/8392000406557416586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2009/11/t-sql-replace-multiple-spaces-with-one.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/8392000406557416586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/8392000406557416586'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2009/11/t-sql-replace-multiple-spaces-with-one.html' title='[mssql] REPLACE Multiple Spaces with One'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-7655246923532699883</id><published>2009-10-21T16:55:00.000-07:00</published><updated>2009-10-21T16:55:04.202-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='story'/><category scheme='http://www.blogger.com/atom/ns#' term='picture'/><title type='text'>[picture] Ctrl+Alt+Del</title><summary type='text'>
Have you ever thought of the person who invented "CTRL + ALT + DEL " key combination.

"David Bradley"

He is the One who spent 1 minute and 23 seconds in writing the source code that rescues

The world's PC users for decades This extraordinary IBM employee is retiring on Friday, 25th March 2005 after a prolong service of 29 years.

His formula forces obstinate computers to restart when they no </summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/7655246923532699883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2009/10/picture-ctrlaltdel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7655246923532699883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7655246923532699883'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2009/10/picture-ctrlaltdel.html' title='[picture] Ctrl+Alt+Del'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_9o73ijZeGKM/St-fFexMM8I/AAAAAAAAAyA/MZFS0--u9sU/s72-c/CtrlAltDel.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-8135964668594850597</id><published>2009-10-08T23:39:00.001-07:00</published><updated>2009-10-08T23:39:36.678-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='picture'/><title type='text'>[picture] Mouse Inside Cat</title><summary type='text'>


</summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/8135964668594850597/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2009/10/picture-mouse-inside-cat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/8135964668594850597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/8135964668594850597'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2009/10/picture-mouse-inside-cat.html' title='[picture] Mouse Inside Cat'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_9o73ijZeGKM/Ss7amp4QBSI/AAAAAAAAAx4/ME2Ul9fuF8w/s72-c/MouseCat.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-4193580179951795803</id><published>2009-10-08T23:37:00.000-07:00</published><updated>2009-10-08T23:37:03.454-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='picture'/><title type='text'>[picture] Honesty On The Internet</title><summary type='text'>


</summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/4193580179951795803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2009/10/picture-honesty-on-internet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4193580179951795803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4193580179951795803'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2009/10/picture-honesty-on-internet.html' title='[picture] Honesty On The Internet'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_9o73ijZeGKM/Ss7Z-dYfTCI/AAAAAAAAAxw/zFMc7ZEX_l0/s72-c/Honesty_On_The_Internet.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-6993380923716963372</id><published>2009-09-29T00:04:00.000-07:00</published><updated>2009-09-29T00:05:10.066-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='picture'/><title type='text'>[picture] What Happens to IT Professionals after Death</title><summary type='text'>


</summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/6993380923716963372/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2009/09/picture-what-happens-to-it.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/6993380923716963372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/6993380923716963372'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2009/09/picture-what-happens-to-it.html' title='[picture] What Happens to IT Professionals after Death'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_9o73ijZeGKM/SsGxLTB819I/AAAAAAAAAuA/ZoSFfaTtZuo/s72-c/What+Happens+to+IT+Professionals+after+Death001.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-7249178363397090869</id><published>2009-09-02T17:45:00.000-07:00</published><updated>2009-09-02T17:45:05.180-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[mssql] How To Get Table Row Counts Quickly And Painlessly</title><summary type='text'>At some point in time we've all had to find out how many rows are in a table. The first answer you'll usually get when you ask someone how to do it is select count(*) from [table], however there are two problems with this approach: First, a table scan is required to figure out the answer; do a count(*) against a million row table and you're looking at hundreds of thousands of reads (and likely </summary><link rel='related' href='http://www.sqlservercentral.com/articles/T-SQL/67624/' title='[mssql] How To Get Table Row Counts Quickly And Painlessly'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/7249178363397090869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2009/09/mssql-how-to-get-table-row-counts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7249178363397090869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7249178363397090869'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2009/09/mssql-how-to-get-table-row-counts.html' title='[mssql] How To Get Table Row Counts Quickly And Painlessly'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-4153531720344964545</id><published>2009-08-12T17:33:00.000-07:00</published><updated>2009-08-12T17:49:32.749-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Open Any Type Of File With Its Associated Window's Program</title><summary type='text'>You simply want to be able to press a command button, which will trigger a file (e.g. "c:\media\mysong.mp3"), to be opened with by its associated application (e.g. "Media Player") just as what would happen if I went to the file in windows explorer, and double clicked it.1. Create module modTools as following:Attribute VB_Name = "modTools"'**********************************************************</summary><link rel='related' href='http://www.vbforums.com/showthread.php?t=67892' title='[vb6] Open Any Type Of File With Its Associated Window&apos;s Program'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/4153531720344964545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2009/08/vb6-open-any-type-of-file-with-its.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4153531720344964545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4153531720344964545'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2009/08/vb6-open-any-type-of-file-with-its.html' title='[vb6] Open Any Type Of File With Its Associated Window&apos;s Program'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-5077023068534684063</id><published>2009-08-09T22:12:00.000-07:00</published><updated>2010-11-25T00:12:43.221-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[t-sql] Twenty tips to write a good stored procedure</title><summary type='text'>By Arup Chakraborty, 2009/08/10
The writing of stored procedures is a very common task in todays database world. Not only by database developers, but also application developers are writing the procedures. DBA's also need to write procedures. In fact, I have faced a very common question in my interviews: " How many stored procedures have you written?"

Since the world is going for fat servers (a </summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/5077023068534684063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2009/08/t-sql-twenty-tips-to-write-good-stored.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5077023068534684063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5077023068534684063'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2009/08/t-sql-twenty-tips-to-write-good-stored.html' title='[t-sql] Twenty tips to write a good stored procedure'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-6617305047862575358</id><published>2009-07-15T19:54:00.000-07:00</published><updated>2009-07-16T00:15:14.866-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] How to create list of same items?</title><summary type='text'>Suppose you want this result:    abc,abc,abc,abc,abcBut you don't want to create it in the Do or For loop. So you can use the following syntax:    Mid(Replace(5, "~"), "~", ",abc"), 2)</summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/6617305047862575358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2009/07/vb6-how-to-create-list-of-same-items.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/6617305047862575358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/6617305047862575358'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2009/07/vb6-how-to-create-list-of-same-items.html' title='[vb6] How to create list of same items?'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-7565518095747590576</id><published>2009-06-28T20:01:00.000-07:00</published><updated>2009-06-28T20:25:08.328-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] How to hide the grid from Report Designers?</title><summary type='text'>Open the source code (file with .Dsr extension) using the Notepad, then update the value of _Setting property under the Designers module become 28.</summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/7565518095747590576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2009/06/vb6-how-to-hide-grid-from-report.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7565518095747590576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7565518095747590576'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2009/06/vb6-how-to-hide-grid-from-report.html' title='[vb6] How to hide the grid from Report Designers?'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_9o73ijZeGKM/Skgz_5_C7FI/AAAAAAAAAqg/xQpVAhMHlTg/s72-c/Report.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-6504202280874343246</id><published>2009-05-21T17:31:00.000-07:00</published><updated>2009-05-21T17:33:03.261-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='link'/><title type='text'>[link] Cek UserName di Banyak Situs Utama</title><summary type='text'>Buat koleksi aja:1. http://namechk.com/2. http://checkusernames.com/</summary><link rel='related' href='http://tech19.wordpress.com/2009/04/15/situs-nemu-cek-username-di-banyak-situs-utama/' title='[link] Cek UserName di Banyak Situs Utama'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/6504202280874343246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2009/05/link-cek-username-di-banyak-situs-utama.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/6504202280874343246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/6504202280874343246'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2009/05/link-cek-username-di-banyak-situs-utama.html' title='[link] Cek UserName di Banyak Situs Utama'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-6225216196964041726</id><published>2009-05-21T17:17:00.000-07:00</published><updated>2009-05-21T17:25:28.667-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='story'/><title type='text'>[story] Cerita-cerita Kecil Seputar Google Yang Jarang Diketahui</title><summary type='text'>1. Larry Page dan Sergey Brin awalnya bermusuhan.Sebagai orang yang sama-sama cerdas, LP dan SB adalah dua orang yang sering berdebat satu sama lain meskipun untuk urusan kecil seperti siapa yang harus menutup pintu atau siapa yang lebih dulu membaca koran. Pertengkaran kecil seperti ini sering menggangu teman-teman seasrama mereka. Ternyata mereka bertengkar bukan karena membenci satu sama lain </summary><link rel='related' href='http://tech19.wordpress.com/2008/10/27/cerita-cerita-kecil-seputar-google-yang-jarang-diketahui/' title='[story] Cerita-cerita Kecil Seputar Google Yang Jarang Diketahui'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/6225216196964041726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2009/05/story-cerita-cerita-kecil-seputar.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/6225216196964041726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/6225216196964041726'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2009/05/story-cerita-cerita-kecil-seputar.html' title='[story] Cerita-cerita Kecil Seputar Google Yang Jarang Diketahui'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-4393973401062625808</id><published>2009-04-07T16:57:00.000-07:00</published><updated>2009-04-07T17:56:16.056-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[t-sql] What is the difference between SET and SELECT when assigning values to variables?</title><summary type='text'>Traditionally, SQL Server database developers are accustomed to using SELECT for assigning values to variables. This was fine and a perfectly valid practice right until SQL Server 6.5. Microsoft released SQL Server 7.0 in 1999. SQL Server 7.0 introduced the new SET statement for initializing and assigning values to variables. SQL Server 7.0 Books Online also stated: "It is recommended that SET @</summary><link rel='related' href='http://vyaskn.tripod.com/differences_between_set_and_select.htm' title='[t-sql] What is the difference between SET and SELECT when assigning values to variables?'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/4393973401062625808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2009/04/what-is-difference-between-set-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4393973401062625808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4393973401062625808'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2009/04/what-is-difference-between-set-and.html' title='[t-sql] What is the difference between SET and SELECT when assigning values to variables?'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-7584857210568821500</id><published>2009-03-24T22:38:00.000-07:00</published><updated>2009-03-25T02:48:02.057-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[t-sql] Catch return SELECT value of Store Procedure</title><summary type='text'>I have a store procedure which use the SELECT statement to return the recordset to caller.How do I catch the data into variable or temp-table? The value will be used for next process.Answer: Use OpenQuery() to Local Link Server (you must create the link server first)Sample store procedure which return the recordset:    CREATE PROCEDURE usp_test    (  @pInp varchar(10)    )    AS    BEGIN      SET</summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/7584857210568821500/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2009/03/t-sql-catch-return-select-value-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7584857210568821500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7584857210568821500'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2009/03/t-sql-catch-return-select-value-of.html' title='[t-sql] Catch return SELECT value of Store Procedure'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-4306358840799180096</id><published>2009-02-16T20:51:00.000-08:00</published><updated>2009-02-16T21:30:24.193-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[t-sql] Can I create an index on a BIT column?</title><summary type='text'>Try this. In Enterprise Manager, right-click the Tables view, and select New Table. Create a BIT column named "MyBitColumn", and then click on the "Manage Indexes / Keys..." button to create a new index:When you do this, you are offered a "New" button. Click it, and under "Column name" try to select the "MyBitColumn" column. It's not there! Why? Because in this interface, Enterprise Manager does </summary><link rel='related' href='http://sqlserver2000.databases.aspfaq.com/can-i-create-an-index-on-a-bit-column.html' title='[t-sql] Can I create an index on a BIT column?'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/4306358840799180096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2009/02/t-sql-can-i-create-index-on-bit-column.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4306358840799180096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4306358840799180096'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2009/02/t-sql-can-i-create-index-on-bit-column.html' title='[t-sql] Can I create an index on a BIT column?'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_9o73ijZeGKM/SZpCxUT69XI/AAAAAAAAAjQ/4gpVqpFv4bk/s72-c/2530_a.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-2909674015117320737</id><published>2009-02-06T00:11:00.000-08:00</published><updated>2009-02-06T00:28:30.185-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Get object reference by its name in a form</title><summary type='text'>In some cases you might want to activate an object in a form by given its name. To get it, you can use the controls collection of the form object:  Private Sub Form_Load()    MsgBox GetCtlByName(Me, "Label1").Caption  End Sub  Private Function GetCtlByName( _          ByVal pForm As Form, _          ByVal pName$, _          Optional ByVal pIndex% = -1) As Control    On Error GoTo PROC_ERR    If </summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/2909674015117320737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2009/02/vb6-get-object-reference-by-its-name-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/2909674015117320737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/2909674015117320737'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2009/02/vb6-get-object-reference-by-its-name-in.html' title='[vb6] Get object reference by its name in a form'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-934314200498449099</id><published>2009-02-03T16:42:00.000-08:00</published><updated>2009-02-03T18:07:14.641-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[mssql] A Deadlock Occurence and Resolution</title><summary type='text'>IntroductionAn upgrade was performed at my company recently to the application code on the SQL Server, which involved basically the addition of columns to few tables. After the upgrade, the customer started facing severe deadlocks. Around 8 out of 10 transactions were getting deadlocked and were failing.Steps Taken in resolving the deadlocks:I will walk through the steps we took to determine what</summary><link rel='related' href='http://www.sqlservercentral.com/articles/deadlock/64315/' title='[mssql] A Deadlock Occurence and Resolution'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/934314200498449099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2009/02/mssql-deadlock-occurence-and-resolution.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/934314200498449099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/934314200498449099'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2009/02/mssql-deadlock-occurence-and-resolution.html' title='[mssql] A Deadlock Occurence and Resolution'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-3492643112879426085</id><published>2009-01-28T18:21:00.000-08:00</published><updated>2009-01-28T18:34:59.460-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Shuting down/Unload form in Form_Load event</title><summary type='text'>You are doing some validation code in the Form_Load event. If that validationcode fails, then you do not want to show the form. If you call "Unload ME", you will get an error in the form that called ".Show" of the form loading, saying that the form is already unloaded.  Private mbCancelForm As Boolean  Private Sub Form_Activate()    If mbCancelForm = True Then Unload Me  End Sub  Private Sub </summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/3492643112879426085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2009/01/vb6-shuting-down-form-in-formload-event.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/3492643112879426085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/3492643112879426085'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2009/01/vb6-shuting-down-form-in-formload-event.html' title='[vb6] Shuting down/Unload form in Form_Load event'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-3568183774757815732</id><published>2009-01-22T19:37:00.000-08:00</published><updated>2009-01-22T21:54:01.945-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[mssql] Server Side Paging</title><summary type='text'>The script below can be used to fetch the record according to certain page number and size. The syntax is:  SELECT {field_list} FROM    (SELECT TOP {page_size} {field_list} FROM      (SELECT TOP {page_size * page_number} {field_list}        FROM {table} (NOLOCK)        WHERE {where_criteria}        ORDER BY {field_to_order} {order_type}      ) AS SortedData      ORDER BY {field_to_order} {</summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/3568183774757815732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2009/01/mssql-server-side-paging.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/3568183774757815732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/3568183774757815732'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2009/01/mssql-server-side-paging.html' title='[mssql] Server Side Paging'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-1651840117827808598</id><published>2009-01-21T21:00:00.000-08:00</published><updated>2009-01-21T21:08:28.644-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Convert formatted string into numeric</title><summary type='text'>The function below is used to convert formatted string that produced by Format() function into numeric value (Double datatype). This function will remove all non-numeric string except minus and decimal delimiter.Create new module and paste the source below inside your module file (.bas).  '****************************************************************************  ' Name        : StrToNumeric  </summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/1651840117827808598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2009/01/vb6-convert-formatted-string-into.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/1651840117827808598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/1651840117827808598'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2009/01/vb6-convert-formatted-string-into.html' title='[vb6] Convert formatted string into numeric'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-3487355707794484528</id><published>2009-01-21T20:01:00.000-08:00</published><updated>2009-01-21T20:48:18.531-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Numeric input mask for Textbox</title><summary type='text'>Place the 2 Textbox objects in your form with name Textbox1 and Textbox2.And then paste the code below into your .frm file.  Private Sub Text1_KeyPress(KeyAscii As Integer)    Call KeyPressNumeric(KeyAscii)  End Sub  Private Sub Text2_KeyPress(KeyAscii As Integer)    Call KeyPressNumeric(KeyAscii, True, Text2.Text, True, Text2.SelStart)  End Sub  Private Sub Text1_GotFocus()    Text1.Text = </summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/3487355707794484528/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2009/01/vb6-numeric-input-mask-for-textbox.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/3487355707794484528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/3487355707794484528'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2009/01/vb6-numeric-input-mask-for-textbox.html' title='[vb6] Numeric input mask for Textbox'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-5258209129904595014</id><published>2009-01-06T17:20:00.000-08:00</published><updated>2009-01-06T17:33:42.410-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[mssql] How to count records with distinct option?</title><summary type='text'>SELECT  (SELECT count(*) FROM    (SELECT DISTINCT City, Gender      FROM Database1..Person (NOLOCK)      WHERE Age &gt; 18     UNION     SELECT DISTINCT City, Gender      FROM Database2..Person (NOLOCK)      WHERE Age &gt; 18) x)</summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/5258209129904595014/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2009/01/mssql-how-to-count-records-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5258209129904595014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5258209129904595014'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2009/01/mssql-how-to-count-records-with.html' title='[mssql] How to count records with distinct option?'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-4129629185196702397</id><published>2008-12-17T21:54:00.000-08:00</published><updated>2008-12-17T22:00:38.033-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Adjust height of combobox dropdown to fit the number of items</title><summary type='text'>When you drop down the dropdown list of a combobox, VB will set its height to display a maximum of 8 items. If the listcount property is larger than 8, vb adds a vertical scrollbar to the list. You might want to override this behaviour and set the height of the dropdown so that it fits exactly the number of items, within reasonable limits, of course. The SetDropdownHeight procedure does exactly </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips3.htm' title='[vb6] Adjust height of combobox dropdown to fit the number of items'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/4129629185196702397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-adjust-height-of-combobox-dropdown.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4129629185196702397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4129629185196702397'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-adjust-height-of-combobox-dropdown.html' title='[vb6] Adjust height of combobox dropdown to fit the number of items'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-3390969433077313174</id><published>2008-12-17T21:52:00.000-08:00</published><updated>2008-12-17T21:54:33.372-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Register COM components</title><summary type='text'>COM components (COM dlls, including ActiveX control libraries) are normally registered by setup programs or manually by using the RegSvr32 utility. If, for some reason you want to register a component in pure code you can do like this instead: First, declare the exported function DllRegisterServer that all COM dlls and ocx's export. To tailor it to your own dlls change the filename and the alias </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips3.htm' title='[vb6] Register COM components'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/3390969433077313174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-register-com-components.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/3390969433077313174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/3390969433077313174'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-register-com-components.html' title='[vb6] Register COM components'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-6294431745682642498</id><published>2008-12-17T21:48:00.000-08:00</published><updated>2008-12-17T21:51:55.877-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Prompt for a folder</title><summary type='text'>You can use the shell library to prompt the user for a folder name, like you see in setup programs. The shell function SHBrowseForFolder pops up a modal dialog box that prompts the user to select a folder. (You will probably need only a subset of the constants. See the Platform SDK for an explanation of when to use the differenct flags).     Private Const BIF_RETURNONLYFSDIRS = &amp;H1&amp;    Private </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips3.htm' title='[vb6] Prompt for a folder'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/6294431745682642498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-prompt-for-folder.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/6294431745682642498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/6294431745682642498'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-prompt-for-folder.html' title='[vb6] Prompt for a folder'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-4267302126958090716</id><published>2008-12-17T21:47:00.000-08:00</published><updated>2008-12-17T21:48:26.514-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Get rid of blinking on scrollbar</title><summary type='text'>Have you ever used hours trying to figure out how to get rid of that unsightly blinking on the scrollbar controls ? (well, I have !). The solution is simple (once you know it): Set the Tabstop property to false....</summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips3.htm' title='[vb6] Get rid of blinking on scrollbar'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/4267302126958090716/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-get-rid-of-blinking-on-scrollbar.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4267302126958090716'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4267302126958090716'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-get-rid-of-blinking-on-scrollbar.html' title='[vb6] Get rid of blinking on scrollbar'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-7932323239669803432</id><published>2008-12-17T21:44:00.000-08:00</published><updated>2008-12-17T21:46:51.108-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] When to do Refresh in response to Resize</title><summary type='text'>When a form or picture box is resized, it is automatically invalidated. This means that the Paint event handler is called immediately after the Resize event handler. However, this is only true if either the width or height (or both) were increased by the resize operation. This may be fine, if that is what you want, but in many situations you need to repaint the form / picturebox also when it is </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips3.htm' title='[vb6] When to do Refresh in response to Resize'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/7932323239669803432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-when-to-do-refresh-in-response-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7932323239669803432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7932323239669803432'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-when-to-do-refresh-in-response-to.html' title='[vb6] When to do Refresh in response to Resize'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-5719616093149125210</id><published>2008-12-17T21:25:00.000-08:00</published><updated>2008-12-17T21:42:08.949-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] How change the font color on a commandbutton ?</title><summary type='text'>The easy answers are "Don't" or "Buy a 3rd party commandbutton control that will let you change the text color". Otherwise, you can use the hack below to change the color. The button is presupposed to reside on a form with scalemode=3. Commandbutton.Name = "Command1", .Caption = "", .Tag = the caption you want. In addition, place a timer on the form; call it Timer1, set its Enabled property to </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips3.htm' title='[vb6] How change the font color on a commandbutton ?'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/5719616093149125210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-how-change-font-color-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5719616093149125210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5719616093149125210'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-how-change-font-color-on.html' title='[vb6] How change the font color on a commandbutton ?'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-7334885865732895552</id><published>2008-12-17T21:24:00.000-08:00</published><updated>2008-12-17T21:25:00.969-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] How change the backcolor on a commandbutton ?</title><summary type='text'>The intrinsic commandbutton control offers a backcolor property, but if you attempt to set it to anything but the default, you'll notice that your changes are disregarded. To activate the backcolor setting, set the Style property of the button to 1 - graphical.</summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips3.htm' title='[vb6] How change the backcolor on a commandbutton ?'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/7334885865732895552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-how-change-backcolor-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7334885865732895552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7334885865732895552'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-how-change-backcolor-on.html' title='[vb6] How change the backcolor on a commandbutton ?'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-2719207032030801666</id><published>2008-12-17T21:22:00.000-08:00</published><updated>2008-12-17T21:23:57.226-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Get rid of the title bar</title><summary type='text'>Problem: I don't want my program to have a titlebar but I do want it listed in the Windows Taskbar. I figured out that I could get rid of the title bar by turning off the controlbox setting and setting the caption to "" but this gives me a blank bar in the taskbar too. Annoyingly, the "ShowInTaskbar" setting is only available at design time so I can't turn it off when the window is visible and </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips3.htm' title='[vb6] Get rid of the title bar'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/2719207032030801666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-get-rid-of-title-bar.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/2719207032030801666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/2719207032030801666'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-get-rid-of-title-bar.html' title='[vb6] Get rid of the title bar'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-2155432929937257434</id><published>2008-12-17T21:14:00.000-08:00</published><updated>2008-12-17T21:15:30.439-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Retrieve pixel color with GetPixel</title><summary type='text'>The color of a pixel on a form or picturebox can be read with the GetPixel API. The function expects X and Y in pixels, so it is necessary to convert from whatever scalemode is in effect to pixels. The code below reads the pixel values from a picturebox when a mouse button is pressed and uses the ScaleX and ScaleY methods of the picturebox control to make the call to GetPixel independent of the </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips3.htm' title='[vb6] Retrieve pixel color with GetPixel'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/2155432929937257434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-retrieve-pixel-color-with-getpixel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/2155432929937257434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/2155432929937257434'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-retrieve-pixel-color-with-getpixel.html' title='[vb6] Retrieve pixel color with GetPixel'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-5638235830577469020</id><published>2008-12-17T21:07:00.000-08:00</published><updated>2008-12-17T21:13:23.959-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Scrolling multiline textboxes in code</title><summary type='text'>The user can scroll a multiline textbox by using the vertical scroll bar (provided you've assigned a scrollbar to the control), but the developer cannot, unless resorting to sending messages to the control.     Private Const EM_SCROLL&amp; = &amp;HB5    Private Const SB_LINEDOWN&amp; = 1    Private Const SB_LINEUP&amp; = 0    Private Const EM_LINESCROLL&amp; = &amp;HB6    Private Const EM_SCROLLCARET&amp; = &amp;HB7    Private </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips3.htm' title='[vb6] Scrolling multiline textboxes in code'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/5638235830577469020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-scrolling-multiline-textboxes-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5638235830577469020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5638235830577469020'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-scrolling-multiline-textboxes-in.html' title='[vb6] Scrolling multiline textboxes in code'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-734938328335203926</id><published>2008-12-17T21:06:00.000-08:00</published><updated>2008-12-17T21:07:28.807-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Drawing transparent rectangles</title><summary type='text'>You can draw rectangles fast using the Rectangle API. If you want the interior of the rectangles to be transparent, you must first select the special brush NULL_BRUSH into the device context.     Private Const NULL_BRUSH&amp; = 5    Private Declare Function Rectangle&amp; Lib "gdi32" (ByVal hdc As Long, _        ByVal X1 As Long, ByVal Y1 As Long, _        ByVal X2 As Long, ByVal Y2 As Long)</summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips3.htm' title='[vb6] Drawing transparent rectangles'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/734938328335203926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-drawing-transparent-rectangles.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/734938328335203926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/734938328335203926'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-drawing-transparent-rectangles.html' title='[vb6] Drawing transparent rectangles'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-4684644160461276664</id><published>2008-12-17T21:05:00.000-08:00</published><updated>2008-12-17T21:06:11.728-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Rubber banding the easy way</title><summary type='text'>Most vector graphics programs let you draw a straight line by pressing a mouse button and then, holding the button down, moving the mouse to the where the line should end and then releasing the mouse button. In other words, a new temporary line is drawn whenever the mouse is moved with the button down (so-called rubber banding). If you try to implement this, you run into the problem of how to </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips3.htm' title='[vb6] Rubber banding the easy way'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/4684644160461276664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-rubber-banding-easy-way.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4684644160461276664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4684644160461276664'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-rubber-banding-easy-way.html' title='[vb6] Rubber banding the easy way'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-7042226893165061226</id><published>2008-12-17T02:02:00.000-08:00</published><updated>2008-12-17T02:03:25.896-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Get descriptions of API errors</title><summary type='text'>API functions don't exactly adhere to the VB error handling scheme. Instead, they either return numeric error codes or set an error code in an internal register. To retrieve the error code of the last API error in that internal register, use the LastDllError property of the VB Err object. One thing is numeric codes, however, another thing is to get some useful description of what actually went </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips2.htm' title='[vb6] Get descriptions of API errors'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/7042226893165061226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-get-descriptions-of-api-errors.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7042226893165061226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7042226893165061226'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-get-descriptions-of-api-errors.html' title='[vb6] Get descriptions of API errors'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-5918433005041176002</id><published>2008-12-17T02:00:00.001-08:00</published><updated>2008-12-17T02:02:01.427-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Invoke any program from VB code</title><summary type='text'>Use the ShellExecute function to start another program, to print a document file or start explorer in a specified directory. The hwnd parameter is the window handle of your main form, lpOperation specifies the operation you want and can be "open", "print" or "explore" (pass vbNullString to get the default which is "open"). lpFile is the full name of the file. Use lpParameters to specify any </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips2.htm' title='[vb6] Invoke any program from VB code'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/5918433005041176002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-invoke-any-program-from-vb-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5918433005041176002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5918433005041176002'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-invoke-any-program-from-vb-code.html' title='[vb6] Invoke any program from VB code'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-5593507816568430427</id><published>2008-12-17T01:56:00.000-08:00</published><updated>2008-12-17T02:00:22.553-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Wrap your collections</title><summary type='text'>You can wrap the VBA collection type in a class of your own, and thereby tailor it for any specific use. Paste the code below into a new class module; set the Item property to be the default. Give the NewEnum method a procedure ID of -4 and click the "Hide member" checkbox in the Procedure Attributes dialog. Note that this example is for collecting class objects; that's why the 'Set' keyword is </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips2.htm' title='[vb6] Wrap your collections'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/5593507816568430427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-wrap-your-collections.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5593507816568430427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5593507816568430427'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-wrap-your-collections.html' title='[vb6] Wrap your collections'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-7060018276610167684</id><published>2008-12-17T01:55:00.000-08:00</published><updated>2008-12-17T01:56:23.152-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Autoselect text in textboxes</title><summary type='text'>In some applications, you see textboxes where the entire text is automatically selected when the box obtains focus (The Address box in MS Internet Explorer, for example). You can get the same functionality with a VB textbox by using this code:    Private Sub Text1_GotFocus()      Text1.SelStart = 0      Text1.SelLength = Len(Text1)    End Sub</summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips2.htm' title='[vb6] Autoselect text in textboxes'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/7060018276610167684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-autoselect-text-in-textboxes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7060018276610167684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7060018276610167684'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-autoselect-text-in-textboxes.html' title='[vb6] Autoselect text in textboxes'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-6814542152502744606</id><published>2008-12-17T01:53:00.002-08:00</published><updated>2008-12-17T01:54:55.943-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Get hold of string pointers</title><summary type='text'>Some API functions return pointers to strings (char*) allocated by that function. This is all very kind, except that you cannot do anything with that pointer with plain Basic. Use the lstrcpyn and lstrlen API functions to copy a string and to learn the string length, respectively. The pCharToString function shown below wraps the two string functions. For example, suppose an API function has </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips2.htm' title='[vb6] Get hold of string pointers'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/6814542152502744606/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-get-hold-of-string-pointers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/6814542152502744606'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/6814542152502744606'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-get-hold-of-string-pointers.html' title='[vb6] Get hold of string pointers'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-2270765838854276656</id><published>2008-12-17T01:50:00.000-08:00</published><updated>2008-12-17T01:53:23.035-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] CopyMemory and array copying</title><summary type='text'>The CopyMemory API function is extremely handy in many situations, especially when calling API functions or subclassing. The reason is that, unlike some other languages, in VB you cannot access a variable via its memory address. A workaround is to do a physical copy of the data between variables. The declare for the function is very flexible - you can pass any data type for its source and </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips2.htm' title='[vb6] CopyMemory and array copying'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/2270765838854276656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-copymemory-and-array-copying.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/2270765838854276656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/2270765838854276656'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-copymemory-and-array-copying.html' title='[vb6] CopyMemory and array copying'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-542909081144809162</id><published>2008-12-17T01:49:00.000-08:00</published><updated>2008-12-17T01:50:16.843-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] A cheap CheckFrame control</title><summary type='text'>Some commercial control libraries include a frame control where the caption is replaced by a checkbox control. You don't have to pay for this ! Place a standard frame control on a form and give it the caption "       ". Then place a checkbox control on top of that caption.</summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips2.htm' title='[vb6] A cheap CheckFrame control'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/542909081144809162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-cheap-checkframe-control.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/542909081144809162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/542909081144809162'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-cheap-checkframe-control.html' title='[vb6] A cheap CheckFrame control'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-5374865234219626565</id><published>2008-12-17T01:42:00.000-08:00</published><updated>2008-12-17T01:49:20.699-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Rounding numbers</title><summary type='text'>If you are displaying real numbers, you might like to display them in rounded format, and possibly with a fixed number of digits after the decimal separator. The format function rounds numbers if you specify a an expression for its format parameter where zeros indicate that the digit is valid and "\0" indicate that the function should append a trailing zero. For example:     Dim n As Single    n </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips2.htm' title='[vb6] Rounding numbers'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/5374865234219626565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-rounding-numbers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5374865234219626565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5374865234219626565'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-rounding-numbers.html' title='[vb6] Rounding numbers'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-2368926946180964089</id><published>2008-12-17T01:37:00.000-08:00</published><updated>2008-12-17T01:41:50.560-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Subclass forms and controls</title><summary type='text'>Windows continually sends messages to windows, including the forms and controls in a VB application. Visual Basic takes care of responding to all these messages for you. Some messages are passed on to you in the form of control or form events, after VB has done anything it needs to do. Sometimes, this is not good enough. Maybe parameters passed to your events are missing (as in the WM_PAINT) </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips2.htm' title='[vb6] Subclass forms and controls'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/2368926946180964089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-subclass-forms-and-controls.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/2368926946180964089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/2368926946180964089'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-subclass-forms-and-controls.html' title='[vb6] Subclass forms and controls'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-8333972988303874995</id><published>2008-12-17T01:32:00.001-08:00</published><updated>2008-12-17T01:36:57.861-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Make ANY form fixed size</title><summary type='text'>Visual Basic forms can be made non-sizable by setting the borderstyle property to 0, 1, 3 or 4. However, that also means that the user cannot minimize the form to the taskbar. Worse, the MDI form cannot be made non-sizable at all. That is, unless you implement the code below. This trick requires that you subclass the form and intercept the WM_GETMINMAXINFO message, not passing the message on to </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips2.htm' title='[vb6] Make ANY form fixed size'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/8333972988303874995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-make-any-form-fixed-size.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/8333972988303874995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/8333972988303874995'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-make-any-form-fixed-size.html' title='[vb6] Make ANY form fixed size'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-5970330894727193969</id><published>2008-12-17T01:30:00.000-08:00</published><updated>2008-12-17T01:32:03.733-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Go to web page or send an e-mail</title><summary type='text'>It is very simple to enable links to web pages in your application or have the user send you an e-mail by clicking on your e-mail address, displayed in a label, for example. Just call the DoWebLink sub below, passing the startup form of your app and a link. The link may be a web-link, like http://www.santa-claus.gl/ or a mail address, like "mailto:SantaClaus@Santaorg.gl". You can make the link </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips2.htm' title='[vb6] Go to web page or send an e-mail'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/5970330894727193969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-go-to-web-page-or-send-e-mail.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5970330894727193969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5970330894727193969'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-go-to-web-page-or-send-e-mail.html' title='[vb6] Go to web page or send an e-mail'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-7966209248157663269</id><published>2008-12-17T01:27:00.000-08:00</published><updated>2008-12-17T01:30:00.274-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Disable default popups</title><summary type='text'>Some controls, such as the intrinsic textbox control, display their own popupmenus, thereby effectively excluding you from displaying your own popup (it looks awkward if the default menu displays, followed by your custom menu). You can disable the default menu by disabling the control, as in the code below. The only disadvantage is that the control displays its disabled state while the custom </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips2.htm' title='[vb6] Disable default popups'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/7966209248157663269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-disable-default-popups.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7966209248157663269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7966209248157663269'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-disable-default-popups.html' title='[vb6] Disable default popups'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-1269754360426257948</id><published>2008-12-17T01:25:00.000-08:00</published><updated>2008-12-17T01:27:07.648-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Get the decimal separator and digit grouping symbol</title><summary type='text'>To obtain the current user's settings for the decimal separator and digit grouping symbol, use the GetLocaleInfo function. You can use the same method to retrieve a slurry of other useful information, such as the names of months and days, language, currency format etc.    Private Const LOCALE_USER_DEFAULT&amp; = &amp;H400    Private Const LOCALE_SDECIMAL&amp; = &amp;HE    Private Const LOCALE_STHOUSAND&amp; = &amp;HF</summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips2.htm' title='[vb6] Get the decimal separator and digit grouping symbol'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/1269754360426257948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-get-decimal-separator-and-digit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/1269754360426257948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/1269754360426257948'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-get-decimal-separator-and-digit.html' title='[vb6] Get the decimal separator and digit grouping symbol'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-1712656442435138763</id><published>2008-12-17T01:23:00.000-08:00</published><updated>2008-12-17T01:25:17.142-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Generic control handling procedure</title><summary type='text'>Sometimes it is useful to perform a certain action or set a certain property for all the controls of a certain type on a form. Say you needed to disable all controls of a certain type:     Private Sub DisableControls(Frm As Form, CtrlTypeName As String)      Dim nCount As Integer      For nCount = 0 To Frm.Controls.Count - 1        If TypeName(Frm.Controls(nCount)) = CtrlTypeName Then          </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips2.htm' title='[vb6] Generic control handling procedure'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/1712656442435138763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-generic-control-handling-procedure.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/1712656442435138763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/1712656442435138763'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-generic-control-handling-procedure.html' title='[vb6] Generic control handling procedure'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-3699380070793145010</id><published>2008-12-16T22:54:00.000-08:00</published><updated>2008-12-16T22:56:41.358-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Use the RtlMoveMemory API function to copy data</title><summary type='text'>Certain API functions return pointers to memory, that are of little use in VB where there is no intrinsic way of handling direct memory copy or accessing the variable pointed to directly. You can use the following function to copy bytes to a VB variable:     Private|Public Declare Sub CopyBytes Lib "kernel32" _        Alias "RtlMoveMemory" (Destination As Any, _        Source As Any, ByVal </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips1.htm' title='[vb6] Use the RtlMoveMemory API function to copy data'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/3699380070793145010/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-use-rtlmovememory-api-function-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/3699380070793145010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/3699380070793145010'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-use-rtlmovememory-api-function-to.html' title='[vb6] Use the RtlMoveMemory API function to copy data'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-7496199709881179113</id><published>2008-12-16T22:52:00.000-08:00</published><updated>2008-12-16T22:54:05.619-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] VarType function determines what is contained in a variant</title><summary type='text'>The VB VarType function is the way for determining what type of data is contained in a variant variable, if it is an array and of which type. For example:     Dim Barray(20) As Byte    Dim MyVariant as Variant    MyVariant = Barray    Return = VarType(MyVariant)"Return" turns out to be equal to vbArray Or vbByte.</summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips1.htm' title='[vb6] VarType function determines what is contained in a variant'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/7496199709881179113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-vartype-function-determines-what-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7496199709881179113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7496199709881179113'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-vartype-function-determines-what-is.html' title='[vb6] VarType function determines what is contained in a variant'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-3596847641341124104</id><published>2008-12-16T22:49:00.000-08:00</published><updated>2008-12-16T22:52:06.454-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Use variants for passing arrays to and from classes</title><summary type='text'>An array can be packed in a single variable of type variant. This goes for arrays of any datatype except user-defined types and fixed-length strings. The variant can then be passed to and from functions and subs, e.g.In a calling procedure:     Dim B(20) as Byte    Dim V as Variant    V = B    'Call the sub "MySub"    MySub (V)    '-----------------    'In MySub:    Dim Bb() as Byte    Dim Vb as </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips1.htm' title='[vb6] Use variants for passing arrays to and from classes'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/3596847641341124104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-use-variants-for-passing-arrays-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/3596847641341124104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/3596847641341124104'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-use-variants-for-passing-arrays-to.html' title='[vb6] Use variants for passing arrays to and from classes'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-1161038373243818318</id><published>2008-12-16T22:47:00.001-08:00</published><updated>2008-12-16T22:57:00.418-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Use the IS operator to compare objects</title><summary type='text'>With ordinary variables you would use the = operator to compare different variables. This does not work with object variables. Instead you have to use the IS operator, e.g.:    Dim MyObject as MyClass    Dim MyOtherObject as MyClass      Set MyObject = New MyClass    Set MyOtherObject = MyObject      'Now, the two object variables reference the same object.       If MyOtherObject Is MyObject Then</summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips1.htm' title='[vb6] Use the IS operator to compare objects'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/1161038373243818318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-use-is-operator-to-compare-objects.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/1161038373243818318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/1161038373243818318'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-use-is-operator-to-compare-objects.html' title='[vb6] Use the IS operator to compare objects'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-4935933983781446899</id><published>2008-12-16T22:46:00.000-08:00</published><updated>2008-12-16T22:47:08.168-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Correct use of the Dir function</title><summary type='text'>The Visual Basic Dir function is used to test if a certain file exists in a given directory. The Help topic in VB for the function states the function declaration: Dir[(pathname[, attributes])] The help topic incorrectly states that if the "attributes" parameter is omitted, all files are returned that match "pathname". In fact, if a file is flagged as Hidden, it will not be found by the Dir </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips1.htm' title='[vb6] Correct use of the Dir function'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/4935933983781446899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-correct-use-of-dir-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4935933983781446899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4935933983781446899'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-correct-use-of-dir-function.html' title='[vb6] Correct use of the Dir function'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-7576213494134026409</id><published>2008-12-16T22:44:00.000-08:00</published><updated>2008-12-16T22:46:26.127-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Disabling user input in combobox</title><summary type='text'>If you don't want the user to be able to modify or delete text in the textbox part of a combobox control, you can set its style to 2 - dropdown list. However, in doing so, you also disable your own ability to do the same, because the text property is read-only at runtime. This means that if the style is set to 2 you cannot set the text property in code and you cannot link the combo box to a </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips1.htm' title='[vb6] Disabling user input in combobox'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/7576213494134026409/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-disabling-user-input-in-combobox.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7576213494134026409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7576213494134026409'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-disabling-user-input-in-combobox.html' title='[vb6] Disabling user input in combobox'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-62228475120686158</id><published>2008-12-16T22:43:00.000-08:00</published><updated>2008-12-16T22:44:45.915-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Read the computer name and current user name</title><summary type='text'>These functions may be used to retrieve the computer name and the name of the current user (or at least the names as they are known to the operating system).     Private Declare Function GetComputerName&amp; Lib "kernel32" Alias _        "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long)    Private Declare Function GetUserName&amp; Lib "advapi32.dll" Alias _        "GetUserNameA" (ByVal </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips1.htm' title='[vb6] Read the computer name and current user name'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/62228475120686158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-read-computer-name-and-current-user.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/62228475120686158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/62228475120686158'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-read-computer-name-and-current-user.html' title='[vb6] Read the computer name and current user name'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-1407715920452898406</id><published>2008-12-16T22:41:00.000-08:00</published><updated>2008-12-16T22:42:46.403-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Get the current color depth</title><summary type='text'>If you are displaying graphics, you might like to learn the current color depth - true-color bitmaps generally don't look good on 256-color screens. The ColorDepth function returns the color depth as a bits per pixel number, for example on a true-color display the function will return 24. The function obtains a screen dc because the GetDeviceCaps function needs a dc for input.     Private Const </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips1.htm' title='[vb6] Get the current color depth'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/1407715920452898406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-get-current-color-depth.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/1407715920452898406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/1407715920452898406'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-get-current-color-depth.html' title='[vb6] Get the current color depth'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-6621582139526338862</id><published>2008-12-16T22:38:00.000-08:00</published><updated>2008-12-16T22:41:03.188-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Convert global variables to global properties</title><summary type='text'>You should consider removing all your global variables and implement them as private variables in a BAS module instead. Then, you can declare global property procedures in the BAS module to manipulate the private variables. This way, you can do parameter validation in the property let procedure.</summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips1.htm' title='[vb6] Convert global variables to global properties'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/6621582139526338862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-convert-global-variables-to-global.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/6621582139526338862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/6621582139526338862'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-convert-global-variables-to-global.html' title='[vb6] Convert global variables to global properties'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-7602395299548906188</id><published>2008-12-16T22:36:00.000-08:00</published><updated>2008-12-16T22:38:29.473-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Make form stay on top</title><summary type='text'>Sometimes you need a form to stay on top, even when another form has focus, so that its immediately available to the user. This code toggles the OnTop state for a form when passed the hwnd property of a form:     Private Const GW_HWNDFIRST&amp; = 0    Private Const HWND_NOTOPMOST&amp; = -2    Private Const HWND_TOPMOST&amp; = -1    Private Const SWP_NOMOVE&amp; = &amp;H2    Private Const SWP_NOSIZE&amp; = &amp;H1    Private</summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips1.htm' title='[vb6] Make form stay on top'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/7602395299548906188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-make-form-stay-on-top.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7602395299548906188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7602395299548906188'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-make-form-stay-on-top.html' title='[vb6] Make form stay on top'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-5454700111152288822</id><published>2008-12-16T22:34:00.000-08:00</published><updated>2008-12-16T22:36:24.595-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Enable Form move anywhere</title><summary type='text'>If a form has a title bar, the user can move it by pressing the left mouse button on the title bar and then move the window. However, if the form doesn't have a title bar, it cannot be moved. The sub listed below enables movement of a form, irrespective of its style. Typically, you would call this sub when the user presses the left mouse button on the form and possibly also when he presses the </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips1.htm' title='[vb6] Enable Form move anywhere'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/5454700111152288822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-enable-form-move-anywhere.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5454700111152288822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5454700111152288822'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-enable-form-move-anywhere.html' title='[vb6] Enable Form move anywhere'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-1988143737976645748</id><published>2008-12-16T22:32:00.002-08:00</published><updated>2008-12-16T22:34:51.200-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Convert system colors</title><summary type='text'>Color values are specified in Visual Basic using the OLE_COLOR type. The colors come in two flavors; either true RGB values or the system colors with values above &amp;H80000000. When using Visual Basic functions that take color parameters, VB will convert the system colors to their real value for you. However, Windows API functions don't understand the system values, so you will have to convert them</summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips1.htm' title='[vb6] Convert system colors'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/1988143737976645748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/convert-system-colors.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/1988143737976645748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/1988143737976645748'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/convert-system-colors.html' title='[vb6] Convert system colors'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-8831481005397934062</id><published>2008-12-16T22:31:00.000-08:00</published><updated>2008-12-16T22:32:24.299-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Get the reference count on a VB Class object</title><summary type='text'>The reference count on COM objects, including VB Class objects, are managed by Visual Basic and there is normally no reason to know about it. However, when debugging code involving class objects, it is often useful to read the reference count on an object. The function below returns the reference count, and uses the CopyMemory API and the hidden VB function ObjPtr to retrieve the address of the </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips1.htm' title='[vb6] Get the reference count on a VB Class object'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/8831481005397934062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-get-reference-count-on-vb-class.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/8831481005397934062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/8831481005397934062'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-get-reference-count-on-vb-class.html' title='[vb6] Get the reference count on a VB Class object'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-8734080360420955546</id><published>2008-12-16T22:29:00.000-08:00</published><updated>2008-12-16T22:30:36.636-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Undo the last user action on a Textbox control</title><summary type='text'>Visual Basic lets the user undo his last editing on a textbox control via the Undo item on the Textbox popupmenu, but does not give the developer access to the same functionality. The procedure below does:     Private Declare Function SendMessageBynum&amp; Lib "user32" Alias "SendMessageA" _        (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _        ByVal lparam As Long)    </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips1.htm' title='[vb6] Undo the last user action on a Textbox control'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/8734080360420955546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-undo-last-user-action-on-textbox.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/8734080360420955546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/8734080360420955546'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-undo-last-user-action-on-textbox.html' title='[vb6] Undo the last user action on a Textbox control'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-5912203724935639721</id><published>2008-12-16T22:26:00.000-08:00</published><updated>2008-12-16T22:28:50.688-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Set the margins of a Textbox control</title><summary type='text'>The VB Textbox control superclasses the Windows Edit window class, but doesn't implement its margin property. This procedure sets the left and right margins of a textbox control at run-time, with the margins measured in pixels.     Private Declare Function SendMessageBynum&amp; Lib "user32" Alias "SendMessageA" _        (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _         ByVal </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips1.htm' title='[vb6] Set the margins of a Textbox control'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/5912203724935639721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-set-margins-of-textbox-control.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5912203724935639721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5912203724935639721'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-set-margins-of-textbox-control.html' title='[vb6] Set the margins of a Textbox control'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-2582021262619748507</id><published>2008-12-16T22:23:00.000-08:00</published><updated>2008-12-16T22:26:28.837-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Make the toolbar buttons flat</title><summary type='text'>If you have Visual Basic 6, you have the option of creating a toolbar with flat-style buttons. If you have earlier versions of VB, you'll have to do it yourself, like this:     Public Declare Function FindWindowEx&amp; Lib "user32" Alias "FindWindowExA" _        (ByVal hWndParent As Long, ByVal hWndChildAfter As Long, _         ByVal lpClassName As String, ByVal lpWindowName As String)    Public </summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips1.htm' title='[vb6] Make the toolbar buttons flat'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/2582021262619748507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-make-toolbar-buttons-flat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/2582021262619748507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/2582021262619748507'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-make-toolbar-buttons-flat.html' title='[vb6] Make the toolbar buttons flat'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-4577501251984569679</id><published>2008-12-16T22:18:00.000-08:00</published><updated>2008-12-16T22:23:35.640-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Modify the styles for a window</title><summary type='text'>Some style and extended style bits have no counterpart in VB properties for forms and control windows and hence cannot be set in Visual Basic, but it may be possible to change the style at run-time after the window has been created. Use the ModifyStyle and ModifyStyleEx functions to remove and / or add style bits to the window style or window extended style, respectively. Note that changing these</summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips1.htm' title='[vb6] Modify the styles for a window'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/4577501251984569679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-modify-styles-for-window.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4577501251984569679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4577501251984569679'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-modify-styles-for-window.html' title='[vb6] Modify the styles for a window'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-7438822798731960901</id><published>2008-12-16T22:16:00.000-08:00</published><updated>2008-12-16T22:17:50.513-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Get value of a hexadecimal string expression</title><summary type='text'>You can convert a numeric value to a hexadecimal string expression using the Hex$ function, but how do you do it the other way round ? Believe it or not, this simple function will do the trick:     Public Function HxVal(s As String) As Long      HxVal = CLng("&amp;H" &amp; s)    End Function</summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips1.htm' title='[vb6] Get value of a hexadecimal string expression'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/7438822798731960901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-get-value-of-hexadecimal-string.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7438822798731960901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/7438822798731960901'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-get-value-of-hexadecimal-string.html' title='[vb6] Get value of a hexadecimal string expression'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-9032151044435169858</id><published>2008-12-16T22:14:00.000-08:00</published><updated>2008-12-16T22:16:20.981-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Extract red, green or blue component from color value</title><summary type='text'>The individual color components of an RGB value held in a long can be extracted with some bit manipulation to give values in the range 0 to 255:    Private Function Red&amp;(ByVal Color&amp;)      Red = Color And (Not &amp;HFFFFFF00)    End Function    Private Function Green&amp;(ByVal Color&amp;)      Green = (Color And (Not &amp;HFFFF00FF)) \ &amp;H100&amp;    End Function    Private Function Blue&amp;(ByVal Color&amp;)      Blue = (</summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips1.htm' title='[vb6] Extract red, green or blue component from color value'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/9032151044435169858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-extract-red-green-or-blue-component.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/9032151044435169858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/9032151044435169858'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/vb6-extract-red-green-or-blue-component.html' title='[vb6] Extract red, green or blue component from color value'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-1272701408453700414</id><published>2008-12-16T22:08:00.000-08:00</published><updated>2008-12-16T22:14:19.806-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Extract WORD from DWORD</title><summary type='text'>When working with API functions, there is frequently a need to extract the low WORD (i.e. bits 0 to 15) or the high WORD (i.e. bits 16 to 31) from a DWORD (usually held in a VB Long variable). The sub below extracts both values and return them as Longs. If you need only one of these values, you can make a LoWord or HiWord function from the sub.    Public Sub SplitDword(ByVal Dword As Long, HiWord</summary><link rel='related' href='http://hjem.get2net.dk/GeWare/VBTips1.htm' title='[vb6] Extract WORD from DWORD'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/1272701408453700414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/extract-word-from-dword.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/1272701408453700414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/1272701408453700414'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/12/extract-word-from-dword.html' title='[vb6] Extract WORD from DWORD'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-8360545221559521869</id><published>2008-11-26T16:46:00.000-08:00</published><updated>2008-12-16T22:13:20.728-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[mssql] Performing a case-sensitive search and replace in SQL 2000/2005</title><summary type='text'>   If you need to perform a case sensitive search and/or replace in an SQL 2000 or SQL 2005 database you need to use the correct collation method. In the situation I had today I needed to change some copy throughout a website, all of which is in a string resource table, but I had to be careful to maintian case used, i.e: ‘Shipping’ had to change to ‘Delivery’, but ’shipping’ had to change to ‘</summary><link rel='related' href='http://andrewmyhre.wordpress.com/2008/07/22/performing-a-case-sensitive-search-and-replace-in-sql-20002005/' title='[mssql] Performing a case-sensitive search and replace in SQL 2000/2005'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/8360545221559521869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/11/performing-case-sensitive-search-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/8360545221559521869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/8360545221559521869'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/11/performing-case-sensitive-search-and.html' title='[mssql] Performing a case-sensitive search and replace in SQL 2000/2005'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-5814542525387805523</id><published>2008-09-10T01:17:00.000-07:00</published><updated>2008-09-10T01:29:20.159-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Why ADO's Find method is the devil</title><summary type='text'>Takeaway: How do you use ADO's Find method with multiple criteria? Easy. You don't. But don't fret, you should be using Filter anyway. Take a look at this superior alternative.Q: How can I get ADO's Find method to find records based on the values in two different columns?—Ali SiasifarA: Well, the short answer is that you can't. ADO's Recordset.Find method works on one column, and one column only.</summary><link rel='related' href='http://articles.techrepublic.com.com/5100-10878_11-1045830.html' title='[vb6] Why ADO&apos;s Find method is the devil'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/5814542525387805523/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/09/vb6-why-ados-find-method-is-devil.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5814542525387805523'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5814542525387805523'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/09/vb6-why-ados-find-method-is-devil.html' title='[vb6] Why ADO&apos;s Find method is the devil'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-676962908373161107</id><published>2008-08-31T23:36:00.000-07:00</published><updated>2008-08-31T23:41:21.890-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='messanger'/><category scheme='http://www.blogger.com/atom/ns#' term='_addons'/><title type='text'>[messanger] Ten Must-Have Plug-ins to Power Up Pidgin</title><summary type='text'>Cross-platform, multi-protocol instant messaging application Pidgin is very functional, but by default it's not what most people would call sexy. But like many great software projects, from Firefox to foobar2000, the looks and extra functionality are there—you just have to know where to find them. Today we're taking a look at 10 of the best Pidgin plug-ins for taking Pidgin from drab to fab.</summary><link rel='related' href='http://lifehacker.com/356291/ten-must+have-plug+ins-to-power-up-pidgin' title='[messanger] Ten Must-Have Plug-ins to Power Up Pidgin'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/676962908373161107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/08/messanger-ten-must-have-plug-ins-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/676962908373161107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/676962908373161107'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/08/messanger-ten-must-have-plug-ins-to.html' title='[messanger] Ten Must-Have Plug-ins to Power Up Pidgin'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-5738021843600960882</id><published>2008-08-26T22:11:00.000-07:00</published><updated>2008-08-26T22:16:53.790-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='picture'/><title type='text'>Stone Age Cartoon</title><summary type='text'>      </summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/5738021843600960882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/08/stone-age-cartoon.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5738021843600960882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5738021843600960882'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/08/stone-age-cartoon.html' title='Stone Age Cartoon'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_9o73ijZeGKM/SLTivd8doeI/AAAAAAAAAZI/fUn-fcMQf2I/s72-c/ATT00061.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-1150265976450945554</id><published>2008-08-26T21:42:00.000-07:00</published><updated>2008-08-26T22:11:23.720-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_vb6'/><title type='text'>[vb6] Pause() function for Wait/Sleep</title><summary type='text'>The best way to pause code execution is to provide a mechanism that gives the parent application such as Excel or Word opportunities to handle events as well as other operating system tasks. The routine below provides both and allows a pause of as little as a hundredth of a second.Note that the declaration of the Sleep API function has to be placed above all other routines in the module.[Begin </summary><link rel='related' href='http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_22652329.html' title='[vb6] Pause() function for Wait/Sleep'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/1150265976450945554/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/08/vb6-pause-function-for-waitsleep.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/1150265976450945554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/1150265976450945554'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/08/vb6-pause-function-for-waitsleep.html' title='[vb6] Pause() function for Wait/Sleep'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-783292935814882567</id><published>2008-08-26T02:45:00.001-07:00</published><updated>2008-08-26T03:49:17.781-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='picture'/><title type='text'>Bad Software Developement Cycle Illustration</title><summary type='text'>                </summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/783292935814882567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/08/bad-software-developement-cycle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/783292935814882567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/783292935814882567'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/08/bad-software-developement-cycle.html' title='Bad Software Developement Cycle Illustration'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_9o73ijZeGKM/SLPdoieDAwI/AAAAAAAAAXY/uZkOaxlkkhg/s72-c/SoftwareDevelopment_01.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-6380374113888853936</id><published>2008-07-28T02:10:00.000-07:00</published><updated>2008-07-28T02:11:14.030-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dbadmin'/><title type='text'>Oracle connection strings</title><summary type='text'>Oracle ODBC connection strings          Open connection to Oracle database using ODBC   "Driver=  {Microsoft ODBCforOracle};Server=Your_Oracle_Server.world;Uid=Your_Username;Pwd=Your_Password;"     Oracle OLE DB &amp; OleDbConnection (.NET framework) connection strings          Open connection to Oracle database with standard security:   1. "Provider=MSDAORA;Data Source= Your_Oracle_Database;UserId=</summary><link rel='related' href='http://www.sqlstrings.com/Oracle-connection-strings.htm' title='Oracle connection strings'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/6380374113888853936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/07/oracle-connection-strings.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/6380374113888853936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/6380374113888853936'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/07/oracle-connection-strings.html' title='Oracle connection strings'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-8356247154808762711</id><published>2008-07-28T02:08:00.000-07:00</published><updated>2008-07-28T02:12:11.206-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dbadmin'/><title type='text'>MySQL connection strings</title><summary type='text'>MySQL ODBC connection strings          Open connection to local MySQL database using MySQL ODBC 3.51 Driver   "Provider=MSDASQL; DRIVER={MySQL ODBC     3.51Driver}; SERVER=   localhost; DATABASE=Your_MySQL_Database; UID=   Your_Username; PASSWORD=Your_Password; OPTION=3"     MySQL OLE DB &amp; OleDbConnection (.NET framework) connection strings          Open connection to MySQL database:   "Provider=</summary><link rel='related' href='http://www.sqlstrings.com/MySQL-connection-strings.htm' title='MySQL connection strings'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/8356247154808762711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/07/mysql-connection-strings.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/8356247154808762711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/8356247154808762711'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/07/mysql-connection-strings.html' title='MySQL connection strings'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-9100413536182814790</id><published>2008-07-28T02:06:00.000-07:00</published><updated>2008-07-28T02:12:11.206-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dbadmin'/><title type='text'>SQL Server connection strings</title><summary type='text'>SQL ODBC connection strings    Standard Security:&lt;&gt;     "Driver={SQLServer};Server=Your_Server_Name;Database=Your_Database_Name;Uid=Your_Username;Pwd=Your_Password;"        Trusted connection:&lt;&gt; "Driver={SQLServer};Server=Your_Server_Name;Database=Your_Database_Name;Trusted_Connection=yes;"         SQL OLE DB connection strings    Standard Security:"Provider=SQLOLEDB;Data Source=Your_Server_Name;</summary><link rel='related' href='http://www.sqlstrings.com/SQL-Server-connection-strings.htm' title='SQL Server connection strings'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/9100413536182814790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/07/sql-server-connection-strings.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/9100413536182814790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/9100413536182814790'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/07/sql-server-connection-strings.html' title='SQL Server connection strings'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-1445295015101114277</id><published>2008-07-28T00:22:00.000-07:00</published><updated>2008-07-28T02:05:25.482-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dbadmin'/><title type='text'>MS Access connection strings</title><summary type='text'>MS Access ODBC connection strings    Standard Security:"Driver=       {MicrosoftAccessDriver(*.mdb)};DBQ=C:\App1\Your_Database_Name.mdb;Uid=Your_Username;Pwd=Your_Password;"Workgroup:"Driver={Microsoft Access Driver (*.mdb)}; Dbq=C:\App1\Your_Database_Name.mdb;     SystemDB=C:\App1\Your_Database_Name.mdw;"Exclusive "Driver={Microsoft Access Driver (*.mdb)};     DBQ=C:\App1\Your_Database_Name.mdb;</summary><link rel='related' href='http://www.sqlstrings.com/MS-Access-connection-strings.htm' title='MS Access connection strings'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/1445295015101114277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/07/ms-access-connection-strings.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/1445295015101114277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/1445295015101114277'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/07/ms-access-connection-strings.html' title='MS Access connection strings'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-795990169448987395</id><published>2008-07-10T19:03:00.000-07:00</published><updated>2008-07-10T19:05:50.287-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><category scheme='http://www.blogger.com/atom/ns#' term='dbadmin'/><title type='text'>[mssql] Performance Tuning SQL Server Joins</title><summary type='text'>One of the best ways to boost JOIN performance is to limit how many rows need to be JOINed. This is especially beneficial for the outer table in a JOIN. Only return absolutely only those rows needed to be JOINed, and no more. ***** If you perform regular joins between two or more tables in your queries, performance will be optimized if each of the joined columns have their own indexes. This </summary><link rel='related' href='http://www.sql-server-performance.com/tips/tuning_joins_p1.aspx' title='[mssql] Performance Tuning SQL Server Joins'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/795990169448987395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/07/mssql-performance-tuning-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/795990169448987395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/795990169448987395'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/07/mssql-performance-tuning-sql-server.html' title='[mssql] Performance Tuning SQL Server Joins'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-4475697628624640811</id><published>2008-07-10T18:57:00.000-07:00</published><updated>2008-07-10T19:00:35.493-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><category scheme='http://www.blogger.com/atom/ns#' term='dbadmin'/><title type='text'>[mssql] Data Type Performance Tuning Tips</title><summary type='text'>Always specify the narrowest columns you can. The narrower the column, the less amount of data SQL Server has to store, and the faster SQL Server is able to read and write data. In addition, if any sorts need to be performed on the column, the narrower the column, the faster the sort will be. ***** If you need to store large strings of data, and they are less than 8,000 characters, use a VARCHAR </summary><link rel='related' href='http://www.sql-server-performance.com/tips/datatypes_p1.aspx' title='[mssql] Data Type Performance Tuning Tips'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/4475697628624640811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/07/mssql-data-type-performance-tuning-tips.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4475697628624640811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4475697628624640811'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/07/mssql-data-type-performance-tuning-tips.html' title='[mssql] Data Type Performance Tuning Tips'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-8479378444920073160</id><published>2008-07-10T17:28:00.000-07:00</published><updated>2008-07-10T18:57:24.046-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><category scheme='http://www.blogger.com/atom/ns#' term='dbadmin'/><title type='text'>[mssql] About Data Type</title><summary type='text'>Exact Numbers  bigint   Range: -2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807)Space: 8 Bytes int  Range: -2^31 (-2,147,483,648) to 2^31-1 (2,147,483,647)Space: 4 Bytes  smallint   Range: -2^15 (-32,768) to 2^15-1 (32,767)Space: 2 Bytes  tinyint   Range: 0 to 255Space: 1 Byte  bit  Range: 0 (FALSE) or 1 (TRUE)Space: 8 bit columns in a table, will be collectively stored as:</summary><link rel='related' href='http://www.tsqltutorials.com/datatypes.php' title='[mssql] About Data Type'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/8479378444920073160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/07/t-sql-about-data-type.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/8479378444920073160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/8479378444920073160'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/07/t-sql-about-data-type.html' title='[mssql] About Data Type'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-2570842091604510003</id><published>2008-07-10T17:19:00.000-07:00</published><updated>2008-07-10T18:57:24.046-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><category scheme='http://www.blogger.com/atom/ns#' term='dbadmin'/><title type='text'>[mssql] Datetime Data Type</title><summary type='text'>SQL Server's datetime data type generates a lot of questions and confusion in the SQL Server community. Unlike some other major database platforms, SQL Server doesn't provide discrete date and time data types. Instead, SQL Server's datetime data type does the work of both. Here are answers to six commonly asked questions about how to use SQL Server's datetime data type.  6. How does SQL Server </summary><link rel='related' href='http://www.sqlmag.com/Article/ArticleID/43488/sql_server_43488.html' title='[mssql] Datetime Data Type'/><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/2570842091604510003/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/07/t-sql-datetime-data-type.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/2570842091604510003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/2570842091604510003'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/07/t-sql-datetime-data-type.html' title='[mssql] Datetime Data Type'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-4833672864821693825</id><published>2008-03-26T17:15:00.000-07:00</published><updated>2008-07-10T18:56:58.876-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><category scheme='http://www.blogger.com/atom/ns#' term='dbadmin'/><title type='text'>[mssql] How to add a default value (constraint) to an existing column in SQL using transact SQL</title><summary type='text'>I had an issue recently where rows were not being inserted into one of our SQL tables and I figured out that it was because one of the columns does not allow null values [for good reason]. When originally designed we did not expect the particular field to be submitted without a value, but now we have encountered just such a scenario.  Instead of allowing null values in the column we decided it </summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/4833672864821693825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/03/sql-how-to-add-default-value-constraint.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4833672864821693825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4833672864821693825'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/03/sql-how-to-add-default-value-constraint.html' title='[mssql] How to add a default value (constraint) to an existing column in SQL using transact SQL'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-4342551955722389198</id><published>2008-02-20T17:49:00.001-08:00</published><updated>2008-02-20T17:51:18.371-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_system'/><title type='text'>[system] Improving Your Windows Performance</title><summary type='text'>1. DISABLE INDEXING SERVICESIndexing Services is a small little program that uses large amounts of RAM and can often make a computer endlessly loud and noisy. This system process indexes and updates lists of all the files that are on your computer. It does this so that when you do a search for something on your computer, it will search faster by scanning the index lists. If you don’t search your </summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/4342551955722389198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/02/system-improving-your-windows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4342551955722389198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4342551955722389198'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/02/system-improving-your-windows.html' title='[system] Improving Your Windows Performance'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-5873782651967319128</id><published>2008-01-02T19:04:00.000-08:00</published><updated>2008-03-26T17:22:16.550-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[mssql] Get First Date of Previous Month</title><summary type='text'>CREATE FUNCTION dbo.udf_FirstDayofPreviousMonth (@pDate datetime)RETURNS datetimeASBEGIN DECLARE @dFirstDayPrefMonth AS datetime SET @dFirstDayPrefMonth =       convert(datetime,                  left(convert(varchar(8),                  dateadd(MM,-1, @pDate), 112), 6) + '01', 112) RETURN @dFirstDayPrefMonthENDGO</summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/5873782651967319128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2008/01/mssql-get-first-date-of-previous-month.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5873782651967319128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/5873782651967319128'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2008/01/mssql-get-first-date-of-previous-month.html' title='[mssql] Get First Date of Previous Month'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-1049275281367199161</id><published>2007-12-16T17:47:00.000-08:00</published><updated>2008-03-26T17:22:16.551-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[mssql] Choosing SQL Server 2000 Data Types</title><summary type='text'>Introduction Choosing an appropriate data type is very important, because the errors made in a table design can result in large performance degradation. These problems often surface later, when a large amount of data is inserted. In this article, I want to tell you about built-in and  user-defined data types, how SQL Server 2000 stores data on a data page, and show some general tips to choose an </summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/1049275281367199161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2007/12/mssql-choosing-sql-server-2000-data.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/1049275281367199161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/1049275281367199161'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2007/12/mssql-choosing-sql-server-2000-data.html' title='[mssql] Choosing SQL Server 2000 Data Types'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-3643850829230301327</id><published>2007-11-26T15:50:00.000-08:00</published><updated>2012-02-09T21:57:16.841-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[mssql] Cannot resolve the collation conflict between "Latin1_General_CI_AI" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.</title><summary type='text'>I'm trying to get a match between the sysobjects.name and the objname returned by ::fn_listextendedproperty from the extended properties table (or view or wherever they hide that stuff in SQL 2005): 
SELECT o.[id] AS tbl_id, o.[name] AS tbl_nm,
       x.value AS col_desc
  FROM sysobjects o (NOLOCK)
  INNER JOIN ::fn_listextendedproperty(
               N'MS_Description',
               N'user', </summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/3643850829230301327/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2007/11/mssql-cannot-resolve-collation-conflict.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/3643850829230301327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/3643850829230301327'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2007/11/mssql-cannot-resolve-collation-conflict.html' title='[mssql] Cannot resolve the collation conflict between &quot;Latin1_General_CI_AI&quot; and &quot;SQL_Latin1_General_CP1_CI_AS&quot; in the equal to operation.'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-4800051007080178776</id><published>2007-11-25T15:54:00.000-08:00</published><updated>2008-03-26T17:22:16.552-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[mssql] Use ADO, getrows, or a Stored Procedure?</title><summary type='text'>IntroductionPresenting a large set of data in readable pages is a standard task for Web-application developers. Applications that need to produce search results in a digestible manner need to apply paging algorithms. This article will compare the three ways in which paging can be achieved for an ASP/SQL Server 7 application. The first uses ActiveX Data Object (ADO) paging; the second uses getrows</summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/4800051007080178776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2007/11/mssql-use-ado-getrows-or-stored.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4800051007080178776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/4800051007080178776'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2007/11/mssql-use-ado-getrows-or-stored.html' title='[mssql] Use ADO, getrows, or a Stored Procedure?'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3070784159948148239.post-6925453560923060919</id><published>2007-11-21T22:29:00.000-08:00</published><updated>2008-03-26T17:22:16.553-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='_t-sql'/><title type='text'>[mssql] Count Number of Certain Character in A String</title><summary type='text'>Some times we need to know number of certain character in a field, for example to know:How deep the directory path by calculating the number of backslash in a path.How many item in a list of string by calculating number of comma in the string.Following the statements for that purpose:DECLARE @cPath varchar(100)SET @cPath = 'D:\TEMP\test.txt'SELECT len(@cPath) - len(replace(@cPath, '\', ''))</summary><link rel='replies' type='application/atom+xml' href='http://programmer-collection.blogspot.com/feeds/6925453560923060919/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://programmer-collection.blogspot.com/2007/11/mssql-count-number-of-certain-character.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/6925453560923060919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3070784159948148239/posts/default/6925453560923060919'/><link rel='alternate' type='text/html' href='http://programmer-collection.blogspot.com/2007/11/mssql-count-number-of-certain-character.html' title='[mssql] Count Number of Certain Character in A String'/><author><name>Chandra Gunawan</name><uri>http://www.blogger.com/profile/17870643983813363501</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
