Posts

Showing posts with the label Programming

Create Visual Basic Form Interesting and Unique

Image
Are you boring of your Visual Basic Form appearance ? I have tried to change skin of Visual Basic Form. I use Active Skin software to change Visual Basic Form like above. 1. First you download Active Skin and get patch of this software and install it. 2. Open Microsoft Visual Basic 6 and create a form with a command button. 3. Add Active Skin component by press "Ctrl + T". On the Components window you click browse and find actskin4.ocx file in "C:\Windows\system32" and then open it. Click Apply on Components window and close that window. Active Skin component will be added onto Toolbox. Click skin and apply it on your form. 4. Click View Code on Project Explorer type code below or you can download this project . '------------------------- Option Explicit Private Declare Function GetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (pOpenfilename As OpenFilename) As Long Private Type OpenFilename lStructSize As Long hwndOwner As Lo...

Create Loading Process by Visual Basic 6

Image
Do you know progressbar ?. Progressbar is a component of Visual Basic that use for loading process. To create this project we need 4 components: a progressbar, a timer and two command buttons. In default condition, progressbar is not show on the toolbox. To show progressbar on the toolbox you must open component menu by click Project menu -> Components or you can also use shortcut key "Ctrl + T". Components windows appears on the screen. Now, you create a progressbar, a timer and two command buttons on the form. 1. Click Command1 and look on the Properties windows. Change command1 caption. Command1.Caption = "Process" 2. Command2.Caption = "Clear". Look at first step! 3. Click timer1 and look configuration of Properties - Timer1. Change interval to 10. Increase the value of interval will make loading process slower. Decrease the value of interval will make loading process faster. In the last, you type code below on the Code Windows by click the "V...

Run file from Visual Basic 6

Image
You can run all type of file from Visual Basic . 1. Create new project 2. Create a text box and a command button. 3. Double click the Command1 button and type code below. '====================================================== If Right(Text1, 3) = "exe" Or Right(Text1, 3) = "com" Then Shell (Text1) Else Dim x As String x = Text1.Text Set execute = CreateObject("Wscript.shell") execute.run x End If '======================================================= 4. Click Run file button so file can be run from this program Note: - You just type shell command for run *.exe file and *.com file - Error will occured if you run the file that contains "space character"

Type of data on Visual Basic 6

Integer = -32768 until 32767 Long = -2147483.648 until 2147483.647 Single = Positive: 1.401298E-45 until 3.402823E38 Negative: -3.402823E38 until -1.401298E-45 Double = Positive: 4.94065645841247E-324 until 1.79769313486232E308 Negative: -1.79769313486232E308 until -4.94065645841247E-324 Currency = -922337203685477.5808 until 922337203685477.5807 String = 0 until 2 billion characters (95/97 & NT) and 0 until 65535 characters (ver 3.1) Byte = 0 until 255 Boolean = True or False, 1 or 0 Date = January 01, 100 until December 31, 9999 Variant = Null, error, and other type of data like boolean, numeric, string.