Labels

Cari Blog Ini

Sabtu, 30 Januari 2010

Make Form Transparan With VB 6.0


To make visual transparent Form in Visual basic 6.0 opening new project and enhance a modul.modul can be enhanced by click of project add module . typing code  following into module.
Private Declare Function SetLayeredWindowAttributes Lib "user32" _
(ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, _
ByVal dwFlags As Long) As Long

Private Declare Function UpdateLayeredWindow Lib "user32" _
(ByVal hwnd As Long, ByVal hDCDst As Long, pptDst As Any, _
psize As Any, ByVal hDCSrc As Long, pptSrc As Any, crKey As Long, _
ByVal pblend As Long, ByVal dwFlags As Long) As Long

Private Declare Function GetWindowLong Lib "user32" Alias _
"GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long

Private Declare Function SetWindowLong Lib "user32" Alias _
"SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long

Private Const GWL_EXSTYLE = (-20)
Private Const LWA_COLORKEY = &H1
Private Const LWA_ALPHA = &H2
Private Const ULW_COLORKEY = &H1
Private Const ULW_ALPHA = &H2
Private Const ULW_OPAQUE = &H4
Private Const WS_EX_LAYERED = &H80000

Public Function MakeTransparent(ByVal hwnd As Long, Perc As Integer) As Long
Dim Msg As Long
On Error Resume Next
If Perc < 0 Or Perc > 255 Then
MakeTransparent = 1
Else
Msg = GetWindowLong(hwnd, GWL_EXSTYLE)
Msg = Msg Or WS_EX_LAYERED
SetWindowLong hwnd, GWL_EXSTYLE, Msg
SetLayeredWindowAttributes hwnd, 0, Perc, LWA_ALPHA
MakeTransparent = 0
End If
If Err Then
MakeTransparent = 2
End If
End Function

''==========
After code in module have been typed later;then type code of following at form in Event load.
Private sub Form_load()
MakeTransparent Me.hwnd, 150
‘150 è can be altered - alter.
End sub
Running form by pressing F5





Selasa, 05 Januari 2010

Making new control with in visual basic 6.0

Open new project and prepare one command button . last type code of following at form.
Public Function LoadControl(oForm As Object, _
CtlType As String, CtlName As String, nTop As Double, nLeft As Double) As Object
Dim oCtl As Object
On Error Resume Next
If IsObject(oForm.Controls) Then
Set oCtl = oForm.Controls.Add(CtlType, CtlName)
If Not oCtl Is Nothing Then Set LoadControl = oCtl
oCtl.Top = nTop
oCtl.Left = nLeft
oCtl.Visible = True
oCtl.Caption = "Label1"
End If
End Function

Private Sub Command1_Click()
LoadControl Form1, "vb.textbox", "text1", 100, 1000
LoadControl Form1, "VB.CommandButton", "Tombol", 1000, 1000
LoadControl Form1, "vb.Combobox", "cmb1", 2200, 1000
End Sub
Result it the following


Shutdown PC with Script VB 6.0

Private Declare Function InitiateSystemShutdown Lib _
"advapi32.dll" Alias "InitiateSystemShutdownA" (ByVal _
lpMachineName As String, ByVal lpMessage As String, _
ByVal dwTimeout As Long, ByVal bForceAppsClosed As Long, _
ByVal bRebootAfterShutdown As Long) As Long
Private Declare Function AbortSystemShutdown Lib "advapi32.dll" _
Alias "AbortSystemShutdownA" (ByVal lpMachineName As _
String) As Long

Private Sub Command1_Click()
'Proses Shutdown PC
InitiateSystemShutdown "127.0.0.1", "KOMPUTER AKAN MATI", _
30, True, True
End Sub

Private Sub Command2_Click()
'PRoses Pembatalan Shutdown Komputer
AbortSystemShutdown "127.0.0.1"
End Sub

Make Form Transparan With VB 6.0

To make visual transparent Form in Visual basic 6.0 opening new project and enhance a modul.modul can be enhanced by click of project add module . typing code following into module.

Private Declare Function SetLayeredWindowAttributes Lib "user32" _
(ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, _
ByVal dwFlags As Long) As Long

Private Declare Function UpdateLayeredWindow Lib "user32" _
(ByVal hwnd As Long, ByVal hDCDst As Long, pptDst As Any, _
psize As Any, ByVal hDCSrc As Long, pptSrc As Any, crKey As Long, _
ByVal pblend As Long, ByVal dw
Flags As Long) As Long

Private Declare Function GetWindowLong Lib "user32" Alias _
"GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long

Private Declare Function SetWindowLong Lib "user32" Alias _
"SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long

Private Const GWL_EXSTYLE = (-20)
Private Const LWA_COLORKEY = &H1
Private Const LWA_ALPHA = &H2
Private Const ULW_COLORKEY = &H1
Private Const ULW_ALPHA = &H2
Private Const ULW_OPAQUE = &H4
Private Const WS_EX_LA
YERED = &H80000

Public Function MakeTransparent(ByVal hwnd As Long, Perc As Integer) As Long
Dim Msg As Long
On Error Resume Next
If Perc <> 255 Then
MakeTransparent = 1
Else
Msg = GetWindowLong(hwnd, GWL_EXSTYLE)
Msg = Msg Or WS_EX_LAYERED
SetWindowLong hwnd, GWL_EXSTYLE, Msg
SetLayeredWindowAttributes hwnd, 0, Perc, LWA_ALPHA
MakeTransparent = 0
End If
If Err Then
MakeTransparent = 2
End If
End Function


''==========

After code in module have been typed later;then type code of following at form in Event load.

Private sub Form_load()

MakeTransparent Me.hwnd, 150

‘150 è can be altered - alter.

End sub

Running form by pressing F5

Result it like picture following.

Sabtu, 02 Januari 2010

History of Growth Mikroprocessor

1971: 4004 Microprocessor
In the year 1971 emerge first microprocessor of Intel , microprocessor of 4004 this used at machine of calculator Busicom. With this invention is hence opened by a way to include intellegence of made in at dead object.

1972: 8008 Microprocessor
In the year 1972 emerge microprocessor 8008 which is with power of 2 times fold from predecessor that is 4004.

1974: 8080 Microprocessor
Become brain from a so called computer of Altair, at that moment sold by about ten thousand in 1 month.

1978: 8086-8088 Microprocessor
A important sale in division of computer became of the product for the personal computer made in IBM which hence prosesor 8088 a success jack up name intel.

1982: 286 Microprocessor
Intel 286 or which more knowledgeable by the name of 80286 is a first processor of times can recognize and use software used for previous processor.

1985: Intel386™ Microprocessor
Intel 386 is a prosesor owning 275.000 planted transistor of the diprosessor is which in comparison with 4004 owning 100 times fold more amount compared to by 4004.

1989: Intel486™ DX CPU Microprocessor
First Processor multiply to facilitate various application which at first have to type command-command become only a just just click, and have function komplek mathematics so that minimize work load of at processor.

1993: Intel® Pentium® Processor
Processor of new Generation capable to handle various type of data of like voice, sound, handwriting, and photo.

1995: Intel® Pentium® Pro Processor
Processor designed to be used at application server and workstation, what made to process data quickly, this processor have 5,5 million planted transistor.

1997: Intel® Pentium® II Processor
Processor Pentium II represent processor joining Intel MMX designed peculiarly for process of video data, audio, and the graph efficiently. There are 7.5 million integrated transistor in it so that by processor this consumer of PC earn process of various data and use internet eminently.

1998: Intel® Pentium II Xeon® Processor
Processor made for requirement at application server. Intel of that Moment wish to fulfill strategy it which wish to give a unique processor to a certain market.

1999: Intel® Celeron® Processor
Processor Intel Celeron represent processor released by as processor addressed for the consumer which [do] not too require performance of quicker processor for consumer which wish to build a system computer by budget ( price) which do not too big. this Processor Intel Celeron own same and formfactor form by processor is Intel of Type Pentium, but only with slimmer instruction, smaller L2 Cache-it, speed ( clock speed) what is slower, and the cheaper price than processor Intel of type Pentium. With its exit is this processor Celeron hence Intel return to give a processor to a certain marketing.

1999: Intel® Pentium® III Processor
Processor Pentium III represent processor gave by addition 70 new instruction is which dramatically enrich ability of high level image, three dimension, audio streaming, and application of video and also the voice recognition.

1999: Intel® Pentium® III Xeon® Processor
Intel return merambah marketing server and workstation [released break even of Xeon but type Pentium III having 70 comand SIMD. this Excellence Processor it can quicken information processing from system bus to processor , what also jack up performa by signifikan. This Processor is also designed to be allied by processor other dissimilar which of a kind.

2000: Intel® Pentium® 4 Processor
Processor Pentium IV represent product Intel which its process speed able to penetrate speed till 3.06 GHZ. First time go out this processor have is speed to 1.5GHz by formafactor is pin 423, afterwards intel fox formfactor processor Intel Pentium 4 becoming pin 478 started from processor Intel Pentium 4 have speed to 1.3 newest GHZ until which in this time able to penetrate /its speed till 3.4 GHZ.

2001: Intel® Xeon® Processor
Processor Intel Pentium 4 Xeon represent processor Intel Pentium 4 addressed special for personating of computer server. This Processor own amount of pin of more than processor Intel Pentium 4 and also by memory is L2 Cache of larger ones also.

2001: Intel® Itanium® Processor
Itanium is first processor base on 64 beet addressed [by] for usage at server and workstation and also the certain wearer. This Processor have been made with really structure differ from previously which is relied on by desain and technological of Intel’S Explicitly Parallel Instruction Computing ( EPIC ).

2002: Intel® Itanium® 2 Processor
Itanium 2 is generation of second from family Itanium.

2003: Intel® Pentium® M Processor
Chipset 855, and Intel® PRO/WIRELESS 2100 [is] component from Intel® Centrino™. Intel Centrino made to fulfill the existence market requirement will a portable computer everywhere.

2004: Intel Pentium M 735/745/755 processors
provided with chipset 855 by fitur newly 2Mb L2 Cache 400MHz system of bus and compabiliity with socket of processor break evenly is previous Pentium M.

2004: Intel E7520/E7320 Chipsets
7320/7520 applicable to dual processor with configuraton 800MHz FSB, DDR2 400 memory, and PCI Express peripheral interfaces.

2005: Intel Pentium 4 Extreme Edition 3.73GHz
A processor addressed for market of consumer of computer wishing something that more than its computer, this processor use configuraton 3.73GHz frequency, 1.066GHz FSB, EM64T, 2MB L2 cache, and Hyperthreading.

2005: Intel Pentium D 820/830/840
Processor base on 64 beet and referred as dual core of because using 2 nucleus;core fruit, with configuraton 1MB L2 cache at every core, 800MHz FSB, and can operate on frequency 2.8GHz, 3.0GHz, and 3.2GHz. At processor of this type of is also figured in by support Hyperthreading.

2006: Intel Core 2 Quad Q6600
Processor for type desktop and used at one who wish strength more than the computer which he own to own 2 fruit of core with configuraton 2.4GHz by 8MB is L2 Cache ( up to 4MB which can be accessed by every core ), 1.06GHz Front-Side bus, and thermal design power ( TDP )

2006: Intel Quad-core Xeon X3210/X3220
Processor used for type of server and own 2 fruit of core with each owning configuraton 2.13 and 2.4GHz, successively , by 8MB is L2 Cache ( can reach 4MB accessed to every core ), 1.06GHz Front-Side bus, and thermal design power ( TDP)

Growth Mikroprocessor

Every computer which we use in it surely there are microprocessor. Microprocessor, recognized also with the title Central Processing Unit ( CPU) Meaning is processing unit center. CPU is center from made data processing and calculation process from a plate of called “ chip”. Chip is often referred as also by “ Integrated is Circuit ( IC)”, its for minimizing,made the than silicon plate and can be consisted of by 10 million transistor .

First microprocessor is intel 4004 defined by year 1971, but this microprocessor usefulness still very finite, can only be used to operate for reduction and addition. First microprocessor used for the computer at home is intel 8080, representing computer 8 beet in one chip introduced in the year 1974 . Year 1979 introduced by a new microprocessor that is 8088 .

Microprocessor 8088 experiencing of growth become 80286, expanding again become 80486, later;then become Pentium, from Pentium I up to now, Pentium IV. To more wholy, can see picture and tables of hereunder :

Nama Prosesor

Tahun Keluar

Jumlah Transistor

Micron

Clock speed

Data width

MIPS

8080

1974

6000

6

2 MHz

8

0,64

8088

1979

29.000

3

5 MHz

16 bits, 8 bit bus

0,33

80286

1982

134.000

1,5

6 MHz

16 bits

1

80386

1985

275.000

1,5

16 MHz

32 bits

5

80486

1989

1.200.000

1

25 MHz

32 bits

20

Pentium

1993

3.100.000

0,8

60 MHz

32 bits, 64 bit

100

Pentium II

1997

7.500.000

0,35

233 MHz

32 bits, 64 bit bus

400

Pentium III

1999

9.500.000

0,25

450 MHz

32 bits, 64 bit bus

1.000

Source :www.intel.com

Information of Table

  1. Transistor of in form of like very small tube, there are at Chip.
  2. Micron is size measure in Micron ( 10 rank - 6), representing smallest cable in Chip.
  3. Clock Speed = maximal speed a prosesor.
  4. Data Width = wide from Arithmatic Logic Unit ( ALU) / Unit of Organizer aritmatika, to process reduction, division, multiplication etcetera.
  5. MIPS = Millions Of Instructions of Per Second / Millions of comand per second