'isikan kode dibawah ini pada Modul Private Const WS_CAPTION = 55000000 Public MeuForm As Long Public ESTILO As Long Public Const ESTILO_ATUAL As Long = (-16) Public Const HTCAPTION = 2 Public Const WM_NCLBUTTONDOWN = &HA1 Public Sub HideTitleBar(ObjForm As Object) MeuForm = FindWindowA(vbNullString, ObjForm.Caption) ESTILO = ESTILO Or WS_CAPTION MoveJanela MeuForm, ESTILO_ATUAL, (ESTILO) End Sub 'Lalu Panggil dari Userform : Private Sub UserForm_Initialize() Call HideTitleBar(Me) End Sub Semoga berhasil
Option Explicit Option Private Module Public Const GWL_STYLE = -16 Public Const WS_CAPTION = &HC00000 #If VBA7 Then Public Declare PtrSafe Function GetWindowLong _ Lib "user32" Alias "GetWindowLongA" ( _ ByVal hWnd As LongPtr, _ ByVal nIndex As Long) As Long Public Declare PtrSafe Function SetWindowLong _ Lib "user32" Alias "SetWindowLongA" ( _ ByVal hWnd As LongPtr, _ ByVal nIndex As Long, _ ByVal dwNewLong As Long) As Long Public Declare PtrSafe Function DrawMenuBar _ Lib "user32" ( _ ByVal hWnd As LongPtr) As Long Public Declare PtrSafe Function FindWindowA _ Lib "user32" (ByVal lpClassName As String, _ ByVal lpWindowName As String) As LongPtr #Else Public Declare PtrSafe Function GetWindowLong _ Lib "user32" Alias "GetWindowLongA" ( _ ByVal hWnd As Long, _ ByVal nIndex As Long) As Long Public Declare PtrSafe Function SetWindowLong _ Lib "user32" Alias "SetWindowLongA" ( _ ByVal hWnd As Long, _ ByVal nIndex As Long, _ ByVal dwNewLong As Long) As Long Public Declare PtrSafe Function DrawMenuBar _ Lib "user32" ( _ ByVal hWnd As Long) As Long Public Declare PtrSafe Function FindWindowA _ Lib "user32" (ByVal lpClassName As String, _ ByVal lpWindowName As String) As Long #End If Sub HideTitleBar(frm As Object) #If VBA7 Then Dim lFrmHdl As LongPtr #Else Dim lFrmHdl As Long #End If Dim lngWindow As Long lFrmHdl = FindWindowA(vbNullString, frm.Caption) lngWindow = GetWindowLong(lFrmHdl, GWL_STYLE) lngWindow = lngWindow And (Not WS_CAPTION) Call SetWindowLong(lFrmHdl, GWL_STYLE, lngWindow) Call DrawMenuBar(lFrmHdl) End Sub Sub ShowTitleBar(frm As Object) #If VBA7 Then Dim lFrmHdl As LongPtr #Else Dim lFrmHdl As Long #End If Dim lngWindow As Long lFrmHdl = FindWindowA(vbNullString, frm.Caption) lngWindow = GetWindowLong(lFrmHdl, GWL_STYLE) lngWindow = lngWindow + (WS_CAPTION) Call SetWindowLong(lFrmHdl, GWL_STYLE, lngWindow) Call DrawMenuBar(lFrmHdl) End Sub
@@edwaragus634 Option Explicit Option Private Module Public Const GWL_STYLE = -16 Public Const WS_CAPTION = &HC00000 #If VBA7 Then Public Declare PtrSafe Function GetWindowLong _ Lib "user32" Alias "GetWindowLongA" ( _ ByVal hWnd As LongPtr, _ ByVal nIndex As Long) As Long Public Declare PtrSafe Function SetWindowLong _ Lib "user32" Alias "SetWindowLongA" ( _ ByVal hWnd As LongPtr, _ ByVal nIndex As Long, _ ByVal dwNewLong As Long) As Long Public Declare PtrSafe Function DrawMenuBar _ Lib "user32" ( _ ByVal hWnd As LongPtr) As Long Public Declare PtrSafe Function FindWindowA _ Lib "user32" (ByVal lpClassName As String, _ ByVal lpWindowName As String) As LongPtr #Else Public Declare PtrSafe Function GetWindowLong _ Lib "user32" Alias "GetWindowLongA" ( _ ByVal hWnd As Long, _ ByVal nIndex As Long) As Long Public Declare PtrSafe Function SetWindowLong _ Lib "user32" Alias "SetWindowLongA" ( _ ByVal hWnd As Long, _ ByVal nIndex As Long, _ ByVal dwNewLong As Long) As Long Public Declare PtrSafe Function DrawMenuBar _ Lib "user32" ( _ ByVal hWnd As Long) As Long Public Declare PtrSafe Function FindWindowA _ Lib "user32" (ByVal lpClassName As String, _ ByVal lpWindowName As String) As Long #End If Sub HideTitleBar(frm As Object) #If VBA7 Then Dim lFrmHdl As LongPtr #Else Dim lFrmHdl As Long #End If Dim lngWindow As Long lFrmHdl = FindWindowA(vbNullString, frm.Caption) lngWindow = GetWindowLong(lFrmHdl, GWL_STYLE) lngWindow = lngWindow And (Not WS_CAPTION) Call SetWindowLong(lFrmHdl, GWL_STYLE, lngWindow) Call DrawMenuBar(lFrmHdl) End Sub Sub ShowTitleBar(frm As Object) #If VBA7 Then Dim lFrmHdl As LongPtr #Else Dim lFrmHdl As Long #End If Dim lngWindow As Long lFrmHdl = FindWindowA(vbNullString, frm.Caption) lngWindow = GetWindowLong(lFrmHdl, GWL_STYLE) lngWindow = lngWindow + (WS_CAPTION) Call SetWindowLong(lFrmHdl, GWL_STYLE, lngWindow) Call DrawMenuBar(lFrmHdl) End Sub
Option Explicit Option Private Module Public Const GWL_STYLE = -16 Public Const WS_CAPTION = &HC00000 #If VBA7 Then Public Declare PtrSafe Function GetWindowLong _ Lib "user32" Alias "GetWindowLongA" ( _ ByVal hWnd As LongPtr, _ ByVal nIndex As Long) As Long Public Declare PtrSafe Function SetWindowLong _ Lib "user32" Alias "SetWindowLongA" ( _ ByVal hWnd As LongPtr, _ ByVal nIndex As Long, _ ByVal dwNewLong As Long) As Long Public Declare PtrSafe Function DrawMenuBar _ Lib "user32" ( _ ByVal hWnd As LongPtr) As Long Public Declare PtrSafe Function FindWindowA _ Lib "user32" (ByVal lpClassName As String, _ ByVal lpWindowName As String) As LongPtr #Else Public Declare PtrSafe Function GetWindowLong _ Lib "user32" Alias "GetWindowLongA" ( _ ByVal hWnd As Long, _ ByVal nIndex As Long) As Long Public Declare PtrSafe Function SetWindowLong _ Lib "user32" Alias "SetWindowLongA" ( _ ByVal hWnd As Long, _ ByVal nIndex As Long, _ ByVal dwNewLong As Long) As Long Public Declare PtrSafe Function DrawMenuBar _ Lib "user32" ( _ ByVal hWnd As Long) As Long Public Declare PtrSafe Function FindWindowA _ Lib "user32" (ByVal lpClassName As String, _ ByVal lpWindowName As String) As Long #End If Sub HideTitleBar(frm As Object) #If VBA7 Then Dim lFrmHdl As LongPtr #Else Dim lFrmHdl As Long #End If Dim lngWindow As Long lFrmHdl = FindWindowA(vbNullString, frm.Caption) lngWindow = GetWindowLong(lFrmHdl, GWL_STYLE) lngWindow = lngWindow And (Not WS_CAPTION) Call SetWindowLong(lFrmHdl, GWL_STYLE, lngWindow) Call DrawMenuBar(lFrmHdl) End Sub Sub ShowTitleBar(frm As Object) #If VBA7 Then Dim lFrmHdl As LongPtr #Else Dim lFrmHdl As Long #End If Dim lngWindow As Long lFrmHdl = FindWindowA(vbNullString, frm.Caption) lngWindow = GetWindowLong(lFrmHdl, GWL_STYLE) lngWindow = lngWindow + (WS_CAPTION) Call SetWindowLong(lFrmHdl, GWL_STYLE, lngWindow) Call DrawMenuBar(lFrmHdl) End Sub
izin download kak. Terimaksih
terima kasih ilmu nya.
Terima kasih kembali
haturnuhun ilmunya, ijin download ya kak
Semoga Suskes Sehat dan Lancar rezekinya kak...izin download ya...
Mantul kakang semangat 1745 ya...
Tetap semangat
Bravo 👍_________[]✓[]
Assalamualaikum.. jika ber kenan tlong buat scrip untuk kartu stok via vba mas. No API 😂
Btw semoga ilmu nya bakal jadi amal jariyah. Amin 😊
kenapa pas dirun di form_Login erorr ya kakk dan mengarah ke script yang bagian modul_HilangkanTollbar ? erorr nya yang dibagian VBA7 ituu?
'isikan kode dibawah ini pada Modul
Private Const WS_CAPTION = 55000000
Public MeuForm As Long
Public ESTILO As Long
Public Const ESTILO_ATUAL As Long = (-16)
Public Const HTCAPTION = 2
Public Const WM_NCLBUTTONDOWN = &HA1
Public Sub HideTitleBar(ObjForm As Object)
MeuForm = FindWindowA(vbNullString, ObjForm.Caption)
ESTILO = ESTILO Or WS_CAPTION
MoveJanela MeuForm, ESTILO_ATUAL, (ESTILO)
End Sub
'Lalu Panggil dari Userform :
Private Sub UserForm_Initialize()
Call HideTitleBar(Me)
End Sub
Semoga berhasil
Maaf gan mau tanya LBText itu apa ya? Di menit 2.44.35.
Terima kasih
Biasanya itu saya pake utk text berjalan saya pake label so saya kasih lbltext
Boleh minta buat yang codingannya module kak
Maksutnya Module yang buat apa kak..?
Apakah bisa di gunakan buat selama nya
Sangat Bisa bang.
Bang ada apk template nya yg udah jadi gak
Waduh sdh ke reset filenya bang cobak di buat dulu sesuai video itu bang jika nanti ada kendala saya bantu teamviewer dari sini
ka boleh minta modul formDaftar modulnya aja ka
Saya cari dulu ya filenya sdh lama so banyak yg saya hapus kalo ndak salah
module untuk hidetoolbar bang mna
Option Explicit
Option Private Module
Public Const GWL_STYLE = -16
Public Const WS_CAPTION = &HC00000
#If VBA7 Then
Public Declare PtrSafe Function GetWindowLong _
Lib "user32" Alias "GetWindowLongA" ( _
ByVal hWnd As LongPtr, _
ByVal nIndex As Long) As Long
Public Declare PtrSafe Function SetWindowLong _
Lib "user32" Alias "SetWindowLongA" ( _
ByVal hWnd As LongPtr, _
ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
Public Declare PtrSafe Function DrawMenuBar _
Lib "user32" ( _
ByVal hWnd As LongPtr) As Long
Public Declare PtrSafe Function FindWindowA _
Lib "user32" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As LongPtr
#Else
Public Declare PtrSafe Function GetWindowLong _
Lib "user32" Alias "GetWindowLongA" ( _
ByVal hWnd As Long, _
ByVal nIndex As Long) As Long
Public Declare PtrSafe Function SetWindowLong _
Lib "user32" Alias "SetWindowLongA" ( _
ByVal hWnd As Long, _
ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
Public Declare PtrSafe Function DrawMenuBar _
Lib "user32" ( _
ByVal hWnd As Long) As Long
Public Declare PtrSafe Function FindWindowA _
Lib "user32" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
#End If
Sub HideTitleBar(frm As Object)
#If VBA7 Then
Dim lFrmHdl As LongPtr
#Else
Dim lFrmHdl As Long
#End If
Dim lngWindow As Long
lFrmHdl = FindWindowA(vbNullString, frm.Caption)
lngWindow = GetWindowLong(lFrmHdl, GWL_STYLE)
lngWindow = lngWindow And (Not WS_CAPTION)
Call SetWindowLong(lFrmHdl, GWL_STYLE, lngWindow)
Call DrawMenuBar(lFrmHdl)
End Sub
Sub ShowTitleBar(frm As Object)
#If VBA7 Then
Dim lFrmHdl As LongPtr
#Else
Dim lFrmHdl As Long
#End If
Dim lngWindow As Long
lFrmHdl = FindWindowA(vbNullString, frm.Caption)
lngWindow = GetWindowLong(lFrmHdl, GWL_STYLE)
lngWindow = lngWindow + (WS_CAPTION)
Call SetWindowLong(lFrmHdl, GWL_STYLE, lngWindow)
Call DrawMenuBar(lFrmHdl)
End Sub
Ka maaf minta coding modul hilng
Maksutnya modul hilang yg gimana ya kak
Yg di menit 45.13
@@edwaragus634 Option Explicit
Option Private Module
Public Const GWL_STYLE = -16
Public Const WS_CAPTION = &HC00000
#If VBA7 Then
Public Declare PtrSafe Function GetWindowLong _
Lib "user32" Alias "GetWindowLongA" ( _
ByVal hWnd As LongPtr, _
ByVal nIndex As Long) As Long
Public Declare PtrSafe Function SetWindowLong _
Lib "user32" Alias "SetWindowLongA" ( _
ByVal hWnd As LongPtr, _
ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
Public Declare PtrSafe Function DrawMenuBar _
Lib "user32" ( _
ByVal hWnd As LongPtr) As Long
Public Declare PtrSafe Function FindWindowA _
Lib "user32" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As LongPtr
#Else
Public Declare PtrSafe Function GetWindowLong _
Lib "user32" Alias "GetWindowLongA" ( _
ByVal hWnd As Long, _
ByVal nIndex As Long) As Long
Public Declare PtrSafe Function SetWindowLong _
Lib "user32" Alias "SetWindowLongA" ( _
ByVal hWnd As Long, _
ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
Public Declare PtrSafe Function DrawMenuBar _
Lib "user32" ( _
ByVal hWnd As Long) As Long
Public Declare PtrSafe Function FindWindowA _
Lib "user32" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
#End If
Sub HideTitleBar(frm As Object)
#If VBA7 Then
Dim lFrmHdl As LongPtr
#Else
Dim lFrmHdl As Long
#End If
Dim lngWindow As Long
lFrmHdl = FindWindowA(vbNullString, frm.Caption)
lngWindow = GetWindowLong(lFrmHdl, GWL_STYLE)
lngWindow = lngWindow And (Not WS_CAPTION)
Call SetWindowLong(lFrmHdl, GWL_STYLE, lngWindow)
Call DrawMenuBar(lFrmHdl)
End Sub
Sub ShowTitleBar(frm As Object)
#If VBA7 Then
Dim lFrmHdl As LongPtr
#Else
Dim lFrmHdl As Long
#End If
Dim lngWindow As Long
lFrmHdl = FindWindowA(vbNullString, frm.Caption)
lngWindow = GetWindowLong(lFrmHdl, GWL_STYLE)
lngWindow = lngWindow + (WS_CAPTION)
Call SetWindowLong(lFrmHdl, GWL_STYLE, lngWindow)
Call DrawMenuBar(lFrmHdl)
End Sub
Option Explicit
Option Private Module
Public Const GWL_STYLE = -16
Public Const WS_CAPTION = &HC00000
#If VBA7 Then
Public Declare PtrSafe Function GetWindowLong _
Lib "user32" Alias "GetWindowLongA" ( _
ByVal hWnd As LongPtr, _
ByVal nIndex As Long) As Long
Public Declare PtrSafe Function SetWindowLong _
Lib "user32" Alias "SetWindowLongA" ( _
ByVal hWnd As LongPtr, _
ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
Public Declare PtrSafe Function DrawMenuBar _
Lib "user32" ( _
ByVal hWnd As LongPtr) As Long
Public Declare PtrSafe Function FindWindowA _
Lib "user32" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As LongPtr
#Else
Public Declare PtrSafe Function GetWindowLong _
Lib "user32" Alias "GetWindowLongA" ( _
ByVal hWnd As Long, _
ByVal nIndex As Long) As Long
Public Declare PtrSafe Function SetWindowLong _
Lib "user32" Alias "SetWindowLongA" ( _
ByVal hWnd As Long, _
ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
Public Declare PtrSafe Function DrawMenuBar _
Lib "user32" ( _
ByVal hWnd As Long) As Long
Public Declare PtrSafe Function FindWindowA _
Lib "user32" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
#End If
Sub HideTitleBar(frm As Object)
#If VBA7 Then
Dim lFrmHdl As LongPtr
#Else
Dim lFrmHdl As Long
#End If
Dim lngWindow As Long
lFrmHdl = FindWindowA(vbNullString, frm.Caption)
lngWindow = GetWindowLong(lFrmHdl, GWL_STYLE)
lngWindow = lngWindow And (Not WS_CAPTION)
Call SetWindowLong(lFrmHdl, GWL_STYLE, lngWindow)
Call DrawMenuBar(lFrmHdl)
End Sub
Sub ShowTitleBar(frm As Object)
#If VBA7 Then
Dim lFrmHdl As LongPtr
#Else
Dim lFrmHdl As Long
#End If
Dim lngWindow As Long
lFrmHdl = FindWindowA(vbNullString, frm.Caption)
lngWindow = GetWindowLong(lFrmHdl, GWL_STYLE)
lngWindow = lngWindow + (WS_CAPTION)
Call SetWindowLong(lFrmHdl, GWL_STYLE, lngWindow)
Call DrawMenuBar(lFrmHdl)
End Sub