Microsoft Office Excel ® Kod Kılavuzu

Microsoft Office Excel® Code Guide

10 Eylül 2005 Cumartesi

Useful Class1

'Class1

Option Explicit
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowA Lib "user32" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function GetWindowLongA Lib "user32" (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 Declare Function SetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As Long) As Long
Private Const WS_BORDER = &H800000
Private Const GWL_STYLE = (-16)
Dim hWndForm As Long
Dim hwnd As Long, FormStyle As Long
Dim StartTime As String
Dim frmStyle As Long
Dim i As Integer

Public Property Set Form1(objForm As Object)
hWndForm = FindWindow(vbNullString, objForm.Caption)
frmStyle = GetWindowLong(hWndForm, (-16)) Or &H80000 Or &H20000 Or &H10000
SetWindowLong hWndForm, (-16), frmStyle
ShowWindow hWndForm, 3
DrawMenuBar hWndForm
End Property
Public Property Set Form2(objForm As Object)
hwnd = FindWindowA(vbNullString, objForm.Caption)
frmStyle = GetWindowLong(hwnd, (-16)) Or &H80000 Or &H20000 Or &H10000
SetWindowLong hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) And Not WS_BORDER
ShowWindow hwnd, 5
DrawMenuBar hwnd
End Property
Public Property Set Form3(objForm As Object)
Dim hwnd As Long
hwnd = FindWindowA("Thunder" & IIf(Application.Version Like "8*", "X", "D") & "Frame", İlerleme_Formu.Caption)
SetWindowLongA hwnd, -16, GetWindowLongA(hwnd, -16) And &HFFF7FFFF
End Property
Public Property Set Form4(objForm As Object) 'Kapat yok
hWndForm = FindWindow(vbNullString, objForm.Caption)
frmStyle = GetWindowLong(hWndForm, (-16)) And &HFFF7FFFF
SetWindowLong hWndForm, (-16), frmStyle
ShowWindow hWndForm, 5
DrawMenuBar hWndForm
End Property
Public Property Set Form5(objForm As Object) 'Kapat işlevsiz
hWndForm = FindWindow(vbNullString, objForm.Caption)
frmStyle = GetWindowLong(hWndForm, (-16)) And &HFFF7FFFF
SetWindowLong hWndForm, (-16), frmStyle
End Property

Hiç yorum yok:

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