Sunday, November 8, 2015

Visual Basic 6 on Windows 8

In case you need to support and maintain Visual Basic 6 application on Windows 7, Windows 8, ...:
  1. Open command windows as administrator 
  2. Create a zero byte file called MSJAVA.DLL in C:\Windows. (Note: This trick does not work with Windows 10. Need to copy a real copy MSJAVA.DLL to C:\Windows\SysWOW64). Read more: http://www.fortypoundhead.com/showcontent.asp?artid=23993 
  3. "robocopy \WindowsXP\System32 \Windows\System32 java* " (These files from Windows XP system)
  4. "robocopy \WindowsXP\System32 \Windows\System32 msjava*"  
  5. Run setup as administrator from the VB6 or Visual Studio 6 installation media 
  6. On compatibility, select "Run program without help" 
  7. Enter product key and hit next until option list. Choose CUSTOM. 
  8. Do NOT select Data Access (Otherwise you cannot install Visual Studio 6 SP 6 later).
  9. The install will go straight through and will request a restart of windows 
  10. After a restart, start your Visual Basic and confirm all works well, advised to set the program to run in administrative mode so it can write to areas of the registry 
  11. Close it down and install the Visual Studio 6 Service Pack 6 components by right click on SetupSP6.exe to run as administrator) 
  12. Once installed, restart VB6 and check the help about box to confirm you see SP6 installed 

Source: 
http://www.fortypoundhead.com/showcontent.asp?artid=23993 http://blogs.msdn.com/b/pareshj/archive/2013/07/16/visual-basic-6-on-windows-8.aspx

Other readings:
VB6: David Platt’s Inside Pitch 
http://blogs.msdn.com/b/msdnmagazine/archive/2014/06/05/10531518.aspx 

Bring back Classic Visual Basic, an improved version of VB6 
http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3440221-bring-back-classic-visual-basic-an-improved-versi 

Support Statement for Visual Basic 6.0 on Windows Vista, Windows Server 2008, Windows 7, Windows 8 and Windows 8.1
Update: November 2012
http://msdn.microsoft.com/en-us/vstudio/ms788708 

The Silent Majority: Why Visual Basic 6 Still Thrives 
http://msdn.microsoft.com/en-us/magazine/jj133828.aspx 

Installing Visual Basic/Studio 6 on Windows 10
http://blog.danbrust.net/2015/09/14/installing-visual-basic-studio-6-on-windows-10/

Sunday, October 25, 2015

Month of the Holy Rosary

October is the month of the Holy Rosary. I learn how to say a Rosary from my Grandmother when I lived with her. We used to say a Rosary in our family every night or before the Mass at the Church. When I was young, I thought it was a long time to say a Rosary. But it's actually took only 15 minutes. There was a time I did not say a Rosary. I thought saying a Rosary was out of fashion. Reading Bible is a good way.

Later, in my life, everytime I felt desperate, or worry, or sad, or helpless, or anxious I said a Rosary. The first benefit I received immediately is a peace. Both of reading Bible and saying Rosary helped me calm and gave me a hope.

The Rosary has accompanied me in moments of joy and in moments of difficulty. To it I have entrusted any number of concerns; in it I have always found comfort.” (St. John Paul II, Rosarium Virginis Mariae, http://w2.vatican.va/content/john-paul-ii/en/apost_letters/2002/documents/hf_jp-ii_apl_20021016_rosarium-virginis-mariae.html

Saturday, September 19, 2015

Sirach - Sách Huấn Ca

Sirach (Sách Huấn Ca) or The Wisdom of Ben Sira had many good things about the life that I think every young person, actually everyone, should read. It is one of seven books which are generally not found in any Protestant translation (NASB, NAS, NIV, RSV, etc.)

Here are some verses with difference translations:
Sirach 2:6 (Ecclesiasticus 2:6)
Sirach 3:17 (Ecclesiasticus 3:19)
Sirach 25:3 (Ecclesiasticus 25:5)
Sirach 26:1 (Ecclesiasticus 26:1)
Sirach 30:14 (Ecclesiasticus 30:14)


Sunday, August 2, 2015

Benjamin Franklin's Thirteen Virtues (Mười ba đức tính của Benjamin Franklin)

1. Temperance (Điều độ). Eat not to dullness; drink not to elevation.
2. Silence (Thinh lặng) . Speak not but what may benefit others or yourself; avoid trifling conversation.
3. Order (Ngăn nắp). Let all your things have their places; let each part of your business have its time.
4. Resolution (Quyết tâm). Resolve to perform what you ought; perform without fail what you resolve.
5. Frugality (Tiết kiệm). Make no expense but to do good to others or yourself; i.e., waste nothing.
6. Industry (Chuyên cần). Lose no time; be always employ'd in something useful; cut off all unnecessary actions.
7. Sincerity (Thành thật). Use no hurtful deceit; think innocently and justly, and, if you speak, speak accordingly.
8. Justice (Công bằng). Wrong none by doing injuries, or omitting the benefits that are your duty.
9. Moderation (Ôn hoà). Avoid extremes; forbear resenting injuries so much as you think they deserve.
10. Cleanliness (Sạch sẽ). Tolerate no uncleanliness in body, cloaths, or habitation.
11. Tranquility (Bình tỉnh). Be not disturbed at trifles, or at accidents common or unavoidable.
12. Chastity (Khiết tịnh). Rarely use venery but for health or offspring, never to dullness, weakness, or the injury of your own or another's peace or reputation.
13. Humility (Khiêm tốn). Imitate Jesus and Socrates.

Source: 'The Autobiography of Benjamin Franklin' by Benjamin Franklin

Sunday, July 19, 2015

Report Data Pane is not Visible in Visual Studio

If the Report Data pane is not visible, and not in the View menu:

View -> Report Data
or Ctrl + Alt + D

Sunday, June 28, 2015

Using WHERE with LIKE and ESCAPE syntax

Note to myself. From https://msdn.microsoft.com/en-us/library/ms173545.aspx
USE AdventureWorks2012 ;
GO
SELECT *
FROM Production.ProductPhoto
WHERE LargePhotoFileName LIKE '%greena_%' ESCAPE 'a' ;

Monday, May 25, 2015

Attach Sample DB AdventureWorksLT2012_Data


On this post Error 5120 When Attached Database, the attached database has two files the MDF and the LDF. But if you have only one MDF file, how do you attach?
  1. Download from http://msftdbprodsamples.codeplex.com/releases/view/55330 
  2. Open MSSQL Management Studion as local administrator
  3. Attach the file AdventureWorksLT2012_Data.mdf 
  4. High light the LDF files row to delete and click Ok button at the end