Visualizzazione dei risultati da 1 a 4 su 4

Discussione: Finestre vb

  1. #1

    Finestre vb

    Non so se quello che vi voglio chiedere sia semplice o complicata oppure se si possa fare.



    Praticamente i bordi delle finestre come per esempio in una cartella in win98 sono quadrate e in winxp su un pò arrotondate.
    Adesso quello che voglio sapere e come fare in vb che questa finestra non sia come il tema predefinitodi windows ma in un modo che voglio io per esempio una forma triangolare opuure una forma in un punto arrotondata e in un punto dritto.


    Grazie bonaprogram

  2. #2
    Utente bannato
    Registrato dal
    Apr 2002
    Messaggi
    546
    Inizia a farle rotonde:

    crea un nuovo progetto vuoto:

    setta le proprietà del form1 così:
    controlbox=false
    borderstyle=none

    immetti un controllo image1


    copia e incolla il codice

    '---------da quì------------------
    Option Explicit
    Private 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
    Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Long) As Long
    Dim MouseMove As Boolean
    Dim Oldx As Double
    Dim oldy As Double

    Private Sub Form_Load()
    Dim Region&, Region2&
    Region& = CreateRoundRectRgn(0, 0, 100, 100, 100, 100)
    'Cambiando i parametri sopra si possono ottenere finestre ellittiche e rettangolari con gli angoli smussati
    Region2& = SetWindowRgn(Me.hWnd, Region, True)

    End Sub

    Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    MouseMove = True
    Oldx = X
    oldy = Y
    End Sub

    Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If MouseMove = True Then
    frmRound.Left = frmRound.Left + (X - Oldx)
    frmRound.Top = frmRound.Top + (Y - oldy)
    DoEvents
    End If
    End Sub

    Private Sub Image1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    MouseMove = False
    End Sub
    '------fino a quì-----------------




    link
    homepage
    http://%77%77%77%2e%74%77%6f%72%6b%2e%69%74/
    software
    http://%77%77%77%2e%74%77%6f%72%6b%2...programmi.html
    forum
    http://%77%77%77%2e%74%77%6f%72%6b%2...um/default.asp

  3. #3
    Grazie steno12
    Ma oltre a questo vorrei sapere un'altra cosa, a questo punto funziona tutto bene ma come faccio adesso a far comparire dei pusanti dentro a questo cerchio????

  4. #4
    Utente di HTML.it L'avatar di pixer
    Registrato dal
    Oct 2000
    Messaggi
    614
    ....e comunque c'è il forum VB
    MySQL Worker - The OpenSource Multiplatform MySQL database Administrator (C++ powered)
    .:[ It resumes the development !! ]:.


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 © 2024 vBulletin Solutions, Inc. All rights reserved.