Microsoft Office Excel ® Kod Kılavuzu

Microsoft Office Excel® Code Guide

20 Temmuz 2008 Pazar

UserForm WindowState Nothing


'UserForm1
'Add Tools on UserForm1: CommandButton1
Option Explicit
Private Declare Function GetWindowLongA Lib "user32" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLongA Lib "user32" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function FindWindowA Lib "user32" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Dim Pencere As Long

Private Sub UserForm_Initialize()
On Error Resume Next
'UserForm.WindowState; xlMinimized= Nothing
'UserForm.WindowState; xlNormal= Nothing
'UserForm.WindowState; xlMaximized= Nothing
'UserForm.WindowState; xlClosed= Nothing

Me.Caption = "[PBİD®] UserForm xlClose Menu Nothing..."
Pencere = FindWindowA("Thunder" & IIf(Application.Version Like "8*", "X", "D") & "Frame", Me.Caption)
SetWindowLongA Pencere, -16, GetWindowLongA(Pencere, -16) And &HFFF7FFFF
End Sub
Private Sub CommandButton1_Click()
On Error Resume Next
Unload Me
End Sub

10 Temmuz 2008 Perşembe

UserForm OnTime Animation




'Module1

Option Explicit
Dim x As Boolean
Public GösteriZamanı As Double

Sub GösteryiBaşlat()
On Error Resume Next
GösteriZamanı = Now + TimeSerial(0, 0, 1)
Application.OnTime EarliestTime:=GösteriZamanı, Procedure:="Gösteri", Schedule:=True
End Sub
Sub GösteryiBitir()
On Error Resume Next
Application.OnTime EarliestTime:=GösteriZamanı, Procedure:="Gösteri", Schedule:=False
End Sub
Sub Gösteri()
x = UserForm1.Label1.Visible
UserForm1.Label1.Visible = Not x
GösteryiBaşlat
End Sub

 'UserForm1

Option Explicit
Private Sub UserForm_Initialize()
On Error Resume Next
Me.Caption = "[PBİD®] UserForm OnTime Animation..."
End Sub
Private Sub UserForm_Activate()
On Error Resume Next
Call GösteryiBaşlat
Do
Label2.Caption = Now
DoEvents
Loop
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
On Error Resume Next
Call GösteryiBitir
End Sub

1 Temmuz 2008 Salı

UserForm Time Kontrol


'UserForm1

Option Explicit
Private Sub UserForm_Initialize()

On Error Resume Next
Me.Caption = "[PBİD®] UserForm Time Controls..."

End Sub
Private Sub UserForm_Activate()

On Error Resume Next
Do

Label1.Caption = VBA.Format(Now, "hh:mm:ss")
DoEvents

Loop

End Sub

Blog Arşivi

Bu gadget'ta bir hata oluştu

Bu Blogda Ara

Contributor

Contributor
Mustafa ULUSARAÇ İstanbul, TÜRKİYE
free counters
T. C. Central Bank Indicative Exchange Rates
Currency Exchange Rate Widget,Currency Converter Widget
Borsa İstanbul