Visualizzazione dei risultati da 1 a 5 su 5
  1. #1
    Utente di HTML.it
    Registrato dal
    Jan 2005
    Messaggi
    197

    [vb 6.0] form trasparenti o opachi

    buongiorno scusate se posto in tutta velocità
    ho un problema devo realizzare un form trasparente per poter inserire diverse skin arrotondate deve essere nn quadrato ma rotondo è possibile eseguire tale operazione con un ambiente di visual basic 6 io ci sto sbattendo da giorni ma niente nn mi viene nessuna idea

  2. #2
    Utente di HTML.it L'avatar di oregon
    Registrato dal
    Jul 2005
    residenza
    Roma
    Messaggi
    36,481
    Questo progetto puo' esserti utile?

  3. #3
    Utente di HTML.it
    Registrato dal
    Jan 2005
    Messaggi
    197
    waaa muco complicato è difficilissima la procedura
    niente di più semplice?'

  4. #4
    usa questo programma per creare il form della forma che desideri, e' molto semplice

  5. #5

    Per creare un form trasparente invece:

    Option Explicit

    Private Const GWL_EXSTYLE As Long = (-20)
    Private Const WS_EX_RIGHT As Long = &H1000
    Private Const WS_EX_LEFTSCROLLBAR As Long = &H4000
    Private Const WS_EX_LAYERED As Long = &H80000
    Private Const WS_EX_TRANSPARENT = &H20&
    Private Const LWA_COLORKEY As Long = &H1
    Private Const LWA_ALPHA As Long = &H2

    Private Declare Function GetWindowLong Lib "User32" _
    Alias "GetWindowLongA" _
    (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 SetLayeredWindowAttributes Lib "User32" _
    (ByVal hwnd As Long, _
    ByVal crKey As Long, _
    ByVal bAlpha As Long, _
    ByVal dwFlags As Long) As Long
    Private Sub Form_Load()

    Call formtrasparente

    End Sub

    Private Function formtrasparente()

    Dim style As Long
    Dim alpha As Integer

    alpha = 120 ' setta trasparenza form (0 - 255)

    style = GetWindowLong(Me.hwnd, GWL_EXSTYLE)

    If Not (style And WS_EX_LAYERED = WS_EX_LAYERED) Then

    style = style Or WS_EX_LAYERED
    SetWindowLong Me.hwnd, GWL_EXSTYLE, style
    SetLayeredWindowAttributes Me.hwnd, 0&, alpha, LWA_ALPHA
    End If

    End Function

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.