suceava forum
Doriti să reactionati la acest mesaj? Creati un cont în câteva clickuri sau conectati-vă pentru a continua.

[VB]As/Af STB,Taskbar,Clock

In jos

[VB]As/Af STB,Taskbar,Clock Empty [VB]As/Af STB,Taskbar,Clock

Mesaj Scris de Max Dum Sept 07, 2008 7:18 pm

Adaugam 3 butoane pe form , la Caption lasam GOL iar la nume schimbam:

la primul buton --> cmdTaskbar
la al doilea Buton --> cmdStartButton
la al treilea buton --> cmdSystemClock

la cmdTaskbar scriem cod:

HideTaskBar


la cmdStartButton scriem cod:

HideStartButton


la cmdSystemClock scriem cod:

HideSystemClock


Acum dam dublu click pe form si acolo scriem cod:

cmdTaskbar.Caption = "Ascunde Bara de Instrumente"
cmdStartButton.Caption = "Ascunde Butonul Start"
cmdSystemClock.Caption = "Ascunde Ceas"


Dupa aceea dam in dreapta sus (unde scrie load) si alegem unload. La UNLOAD scriem cod:

SetToDefault


Acum trebuie sa mai adaugam un Modul ... dam in dreapta sus .. click dreapta in casutza unde scrie form1 .. si dam add--> module --> open ..
Sub Form1 iti va aparea Module1 dam dublu click pe el si scriem cod:

Public Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function GetDlgItem Lib "user32" (ByVal hDlg As Long, ByVal nIDDlgItem As Long) As Long
Public TaskBarStyle As Boolean, StartButtonStyle As Boolean, SystemClockStyle As Boolean
Public Const StartButtonID = &H130
Public Const SystemClockID = &H12F
Public Const SW_HIDE = 0
Public Const SW_SHOW = 5

Public Sub HideTaskBar()
Dim wClassName As String
Dim hwndTaskbar As Long
wClassName = "Shell_TrayWnd"
hwndTaskbar = FindWindow(wClassName, vbNullString)
If TaskBarStyle = False Then
Form1.cmdTaskbar.Caption = "Arata Bara de Instrumente"
ShowWindow hwndTaskbar, SW_HIDE
TaskBarStyle = True
Else
Form1.cmdTaskbar.Caption = "Ascunde Bara de Intrumente"
ShowWindow hwndTaskbar, SW_SHOW
TaskBarStyle = False
End If
End Sub


Public Sub HideStartButton()
Dim wClassName As String
Dim hwndTaskbar As Long, hwndStartbutton As Long
wClassName = "Shell_TrayWnd"
hwndTaskbar = FindWindow(wClassName, vbNullString)
hwndStartbutton = GetDlgItem(hwndTaskbar, StartButtonID)
If StartButtonStyle = False Then
Form1.cmdStartButton.Caption = "Arata Butonul Start"
ShowWindow hwndStartbutton, SW_HIDE
StartButtonStyle = True
Else
Form1.cmdStartButton.Caption = "Ascunde Butonul Start"
ShowWindow hwndStartbutton, SW_SHOW
StartButtonStyle = False
End If
End Sub

Public Sub HideSystemClock()
Dim wClassName As String
Dim hwndTaskbar As Long, hwndSystemClock As Long
wClassName = "Shell_TrayWnd"
hwndTaskbar = FindWindow(wClassName, vbNullString)
hwndSystemClock = GetDlgItem(GetDlgItem(hwndTaskbar, SystemClockID), SystemClockID)
If SystemClockStyle = False Then
Form1.cmdSystemClock.Caption = "Arata Ceasul"
ShowWindow hwndSystemClock, SW_HIDE
SystemClockStyle = True
Else
Form1.cmdSystemClock.Caption = "Ascunde Ceasul"
ShowWindow hwndSystemClock, 5
SystemClockStyle = False
End If
End Sub

Public Sub SetToDefault()
TaskBarStyle = True
StartButtonStyle = True
SystemClockStyle = True
HideTaskBar
HideStartButton
HideSystemClock
End Sub

Max
Moderator
Moderator

Numarul mesajelor : 53
Varsta : 37
Localitate : Confidential
Stare de spirit : Rakiu
Data de inscriere : 23/08/2008

Sus In jos

Sus


 
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum