مدونة علم البرمجة والحاسوب
من حقك ان تتعلم اكثر

اكواد برمجة ( 2) - visual basic 6 codes (2)

Labels:
كـود .. الانتقال الى الموقع 

dim x as object
set x = createobject("internetexplorer.application")
x.navigate "www.google.com"
x.visible = true

خلفيه روعـه أنصحكم فيهـآ

الجنرال .
Private declare function setlayeredwindowattributes lib "user32.dll" (byval hwnd as long, byvalcrkey as long, byval balpha as byte, byval dwflags as long) as boolean
private declare function setwindowlong lib "user32" alias "setwindowlonga" (byval hwnd as long, byval nindex as long, byval dwnewlong as long) as long
private declare function getwindowlong lib "user32" alias "getwindowlonga" (byval hwnd as long, byval nindex as long) as long
const lwa_alpha = 2
const gwl_exstyle = (-20)
const ws_ex_layered = &h80000
end sub
الفورم لود

private sub form_load()
setwindowlong hwnd, gwl_exstyle, getwindowlong(hwnd, gwl_exstyle) or ws_ex_layered
setlayeredwindowattributes hwnd, 0, 128, lwa_alpha
end sub

كود افراغ حقول التكسـت

Dim i As Integer
For i = 0 To Me.Controls.Count - 1
If TypeOf Me.Controls(i) Is TextBox Then
Me.Controls(i).Text = ""
End If
Next

كـود دائره حمراء حول مؤشر الماوس [ نضع هذا الكود في الفورم ] 

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, _
X As Single, Y As Single)
Me.Cls
Circle (X, Y), 100, vbRed
End Sub
 
     

أرشيف المدونة الإلكترونية

من انا ؟