[ zslavko @ 22.03.2008. 20:14 ] @
Kako da dobijem zaobljene dugmiće na formi.Čitao sam nekoliko ranijih tema ali neumem to da podesim.Ako neko može da to detaljnije pojasni.Koristim Access 2003. Unapred hvala. |
[ zslavko @ 22.03.2008. 20:14 ] @
[ domaci_a_nas @ 22.03.2008. 20:43 ] @
Možda možeš da koristiš imagebox umesto dugmeta. Ja sam našao način da u VB6 zaoblim dugme, ali accessovi dugmići nemaju svojstvo hwnd. Pomoću ovog koda moguće je i dalje menjati oblik forme.
Code: ' MODUL Option Compare Database Option Explicit Public Declare Function SetWindowRgn Lib "user32" (ByVal hwnd As Long, ByVal _ hRgn As Long, ByVal bRedraw As Boolean) As Long Public Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long Public Declare Function CreateRectRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 _ As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long Public Declare Function CreateEllipticRgn Lib "gdi32" (ByVal X1 As Long, ByVal _ Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long Public Declare Function CreateRoundRectRgn Lib "gdi32" (ByVal X1 As Long, ByVal _ Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal X3 As Long, ByVal Y3 As Long) As Long Public Sub Zaobli(ZaoKv As Object, Nacin As Integer) Dim Zaobljeno As Long, ZaoX As Integer, ZaoY As Integer With ZaoKv ZaoX = Int(.Width / 150) If Nacin = 3 Then ZaoX = 0 ZaoY = ZaoX If Nacin = 1 Then Zaobljeno = CreateEllipticRgn(0, 0, .InsideWidth / 15, .InsideHeight / 15) Else Zaobljeno = CreateRoundRectRgn(0, 0, .InsideWidth / 15, .InsideHeight / 15, ZaoX, _ ZaoY) End If SetWindowRgn .hwnd, Zaobljeno, True End With DeleteObject Zaobljeno End Sub Code: 'FORMA Private Sub Form_Load() Zaobli Me, 1 ' ili 2 ili 3 End Sub Copyright (C) 2001-2025 by www.elitesecurity.org. All rights reserved.
|