Minggu, 29 November 2009

Earn US$100 with Paypal Wishlist on Facebook

Do you want to play facebook and get the money? Follow Wishlist Paypal programs.
The program is held by Paypal as one of the online payment service provider in the internet that provided for Facebook users in some areas of asia.

By having an account at Paypal you can make online transactions and accept both transfers of funds via the Internet without being charged a monthly administration fee.

If you follow the program Wishlist Paypal, you will get U.S. $ 1, and if you invite your friends through referrals, then you also will get U.S. $ 1. The more your friends who join through your referrals, the more money you get with a limit of U.S. $ 100.

To join Wishlist Paypal please register here: Paypal Wishlist

Selasa, 24 November 2009

[VBA Excel] Drawing on Cells in MS-Excel 2007 Application

You must know that a bitmap image consists of a collection of dots or pixels. From that concept then I think of how to create images on a worksheet in MS-Excel application from a group of cells.

Of course I had to paint each cell with a specific color to form an image that I want. I can not imagine how I had to paint so many cells. By using macros in MS-Excel application, I tried to make the job easier.

Previously I've tried making it using ms-excel application in 2003, but the depth of color in office in 2003 was low, perhaps 16 colors or 256 colors, but with the presence of ms-excel 2007, the problems with these colors can be improved.

The picture above is an example of colored cells in ms-excel workbook
How The Tools Work?







A picture is placed on the image control and the size can be adjusted with combobox control, such as the size of 32x32, 64x64, 128x128, 256x256 or whatever you want. This image size settings will affect the output image, the greater the size the higher the resolution of the resulting output, consequently was the process of cell staining became longer.
The samples color of image pixel taken in accordance with the coordinates, then the color information and the coordinates are applied to an appropriate cell coordinates (range) and a specific color.
To give a good display output, worksheet properties need to be changed, such as gridlines to be removed, the cell shape made as square and minimized. This is necessary because these cells will act as color pixels making up the picture.

Controls and Properties
Userform
Properties: Back color = white, adjust the size of the need
Image
Properties: Back color = white, dimensions: width = 256 height = 256 (can be adjusted with the control combobox), 3-pictureSizeMode = frmPictureSizeModeZoom, pictureAlignment = 0-FRM pictureAlignmentTopLeft
CommandButton
Command key button is 3: Browse Picture, Start, Close and 1 additional (About) for application information.



Combobox

Filled with value = 32,64,128,256 default value is set 128



A Command Button on the worksheet

Allows you to call the main application (Userform)




Project Components

1. Userform

2. Module




THE CODES

  • CommandButton pada worksheet
Private Sub CommandButton1_Click()
Sheets(2).Select
UserForm1.Show
End Sub


  • UserForm
'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
'!!     xCELL Art                                   !!
'!!     Dibuat oleh SUSANTO aka Xantov              !!
'!!     xantov@gmail.com                            !!
'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Private Sub Pilih_Gambar_Click()
Dim objDialog, boolResult

Set objDialog = CreateObject("UserAccounts.CommonDialog")

objDialog.Filter = "Files Gambar(*.jpg;*.jpeg;*.bmp;*.gif)|*.jpg;*.jpeg;*.bmp;*.gif"

boolResult = objDialog.ShowOpen
If boolResult = True Then
Image1.Picture = LoadPicture(objDialog.Filename)
End If

End Sub

Private Sub Start_Click()
'On Error Resume Next
Dim X, Y, Z As Long
Dim hwnd, hdc As Long
Dim Px, Py As Long

UserForm1.Caption = "xCell-Art | Proses dimulai, Jangan diinterupsi!"

ActiveWindow.DisplayGridlines = False
Cells.Interior.Pattern = xlNone
Cells.ColumnWidth = 0.35
Cells.RowHeight = 3.35

UserForm1.Left = 0
UserForm1.Top = 0

Px = UserForm1.Left + 5
Py = UserForm1.Top + 5

hwnd = WindowFromPoint(Px, Py)
hdc = GetDC(hwnd)
  
For X = 1 To Round(1.4 * Image1.Width, 0)
    For Y = 1 To Round(1.3 * Image1.Height, 0)
    Z = GetPixel(hdc, X, Y)
    If Z = 16777215 Then 'skip warna putih (background), lumayan untuk mempercepat proses :P
    Z = 0
    End If
  
    If Z > 0 Then
        Cells(Y, X).Interior.Color = Z
        Application.StatusBar = "Proses mewarnai sel | Koordinat = " & "x:" & X & " - y:" & -Y
    End If
    Z = 0
    Next Y
 Next X

UserForm1.Caption = "xCell-Art | Selesai"
Application.StatusBar = "xCell-Art 2009"
hwnd = 0
hdc = 0
X = 0
Y = 0
Z = 0
Px = 0
Py = 0
End Sub

Private Sub Tentang_Click()
Dim pesan As String
pesan = "xCell-Art 2009 by XANTOV" & vbCrLf & "email: xantov@gmail.com" & _
 vbCrLf & vbCrLf & "xCell-Art adalah program yang dibuat dengan VBA MS-Excel(TM) untuk membuat gambar dalam sel-sel pada Work Sheet dari sebuah gambar bitmap."
MsgBox pesan, vbInformation, "xCell-Art 2009"
End Sub


Private Sub Tutup_Click()
End

End Sub

Private Sub UserForm_Activate()
Dim n
For n = 5 To 8
ComboBox1.AddItem 2 ^ n
Next
ComboBox1.Text = 128

End Sub

Private Sub ComboBox1_Change()
With Image1
.Width = ComboBox1.Text: .Height = ComboBox1.Text
End With

If ComboBox1.Value > 256 Then
MsgBox "Resolusi maksimum output 256 Cells!", vbCritical, "xCell-Resolusi"
ComboBox1.Text = 256
End If

End Sub


  • Modul
Option Explicit

Public Declare Function GetPixel Lib "gdi32" _
(ByVal hdc As Long, ByVal X As Long, ByVal Y As Long) As Long

Public Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long

Public Declare Function FindWindow32 Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Public Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, _
ByVal yPoint As Long) As Long

Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)



Download 
xCell-Art2009.10.zip
Password: !@#$%^&*()1234567890

Senin, 23 November 2009

Protect your children's PC with K9 Web Protection

The need of website filtering has become urgent because the children at home are often online to find informations or just play online games, where we as parent can not accompany and control children every time.
But do not worry, there is a software that can replace (of course not completely) our duty to accompany the children in online activity. Software K9 Web Protector is almost entirely meet our expectations in terms of protecting children from content web pages that are not appropriate for the needs of children.
You can download it on the it's developer website at http://www1.k9webprotection.com/


Software download
Go to the download link and you will be directed to the form filling for the purposes of downloading and sending of license numbers.


Fill out the form fields on the form name and email address with a complete and correct.


After you press the REQUEST button then you will be given a link to download and license number via email, then check your email inbox. In the email inbox has been opened, click the download link and do the download to complete




Installation
After you finish downloading, run the setup file and follow the steps specified. At the time of the installation process, you will be asked for license numbers that have been sent by email and you will be asked to fill in the password for the administration / software settings.




After the installation is complete, restart your computer.




Tuning software


Next run the program K9 Web Protection Administration from the start menu, and you will be taken to a web page which is the software administration page of K9 Web Protector. On the page select the SETUP menu and enter the requested password.




Category Settings
Web Categories to Block
There are several options with the active option is the default (standard) or choose the category that suits your needs.


Time Restrictions
Is blocking websites based on time, the active option is Unrestricted or choose the category that suits your needs.


Web Site Exceptions
Is setting websites that are excluded, there are two choices: always block and always allow.
If you access a website blocked by default by the program, while you think of the website is required or do not contain harmful content, then you should enter the website address into the section always allow. For example www.facebook.com, press the add to list, add several web longer desired. when you finish do not forget to press the save button.



Blocking Effect
By default option will show the current Admin Option, ie when a web page is a category that is blocked, then the destination web page will be replaced with software administration page. You can choose Bark When Blocked, with these settings the computer will issue a barking dog sound when a web page is a category that is blocked.


URL Keyword
This setting is done block by url address, for example http://www.xyz.com/test.php, so if we want to block the web address that contains the word xyz or test, the word xyz or test can be incorporated into the software settings.
This setup is very useful to block harmful content of local websites as to the words of local language by default not included in the software K9 Web Protection.
To do this, insert the desired keyword and add a wildcard character (*), for example: sample *. Enter as much as possible the words in your mind which are categorized as blocked content :D, do not forget to press the save button when finished.



Other settings
Not discussed because it can be studied alone.





Other
As the result of using Keyword URL settings, then the websites that use the permalink URL (permanent link) will be blocked if the link contains the words that are blocked.


eg http://www.xyz/2009/10/i-dont- know-why.html


if the word "know" is a word that is blocked, then the web address is blocked.
I do not know whether this lack of WP K9 software or weakness of the permalink.