Visualizzazione dei risultati da 1 a 2 su 2

Discussione: [VB6] funzione resize

  1. #1

    [VB6] funzione resize

    Ciao ho creato questa Sub per effettuare il resize degli oggetti nella mia MDI

    ROUTINE
    ************************************************** ********************
    Public Sub Resize_Control(ctl As Object, Height As Integer, Width As Integer, Interval As Integer)
    Dim i As Integer
    DoEvents
    'ctl è il controllo da ripristinare
    'height è la sua altezza
    If (ctl.Height = Height And ctl.Width = Width) Then Exit Sub
    Do Until ctl.Height = Height And ctl.Width = Width
    If (ctl.Height < Height) Then
    ctl.Height = ctl.Height + Interval
    If (ctl.Height > Height) Then ' incase the controls
    ctl.Height = Height ' height goes past
    'the desired..
    End If ' change it to
    End If ' the desired
    If (ctl.Height > Height) Then
    ctl.Height = ctl.Height - Interval
    If (ctl.Height < Height) Then
    ctl.Height = Height
    End If
    End If
    If (ctl.Width < Width) Then
    ctl.Width = ctl.Width + Interval
    If (ctl.Width > Width) Then
    ctl.Width = Width
    End If
    End If
    If (ctl.Width > Width) Then
    ctl.Width = ctl.Width - Interval
    If (ctl.Width < Width) Then
    ctl.Width = Width
    End If
    End If
    Loop
    End Sub

    ************************************************** ********************

    Nel form_load la chiamo in questo modo per fare il resize di una Picture che fa da sfondo

    Private Sub Form_Load()
    Resize_Control picUp, 700, Me.ScaleWidth, 1
    End Sub



    La Form parte in fullscreen ma la picture non ha la larghezza della form, cosa gli posso passare come width per far si che la picture abbia la stessa larghezza del MDI?


    Grazie a Lot:master:

  2. #2
    Utente di HTML.it L'avatar di Gigi84
    Registrato dal
    May 2001
    Messaggi
    569

    se postassi un codice + ordinato...

    codice:
        usando i
            comodi tag
        [ CODE ] [ /CODE ]
    il tutto sarebbe + semplice da guardare, capire e risponderti!


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