Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    help urgentissimo - mi compilate questo codice?

    perfavore mi compilate questo codice e mi dite se i pulsanti exit e sfoglia funzionano
    sono senza compilatore
    è urgentissimo grzie
    codice:
    ' Copy and paste into your program
    DECLARE SUB Button1Click (Sender AS QBUTTON)
    DECLARE SUB Button2Click (Sender AS QBUTTON)
    
    CREATE Form AS QFORM
        Caption = "Form1"
        Width = 465
        Height = 373
        Center
        CREATE Gauge1 AS QGAUGE
            Left = 8
            Top = 12
            Width = 348
            Height = 20
            Kind = 1
        END CREATE
        CREATE Button1 AS QBUTTON
            Caption = "Exit"
            Left = 368
            Top = 304
            OnClick = Button1Click
        END CREATE
        CREATE Button2 AS QBUTTON
            Caption = "Sfoglia"
            Left = 8
            Top = 304
            TabOrder = 1
            OnClick = Button2Click
        END CREATE
        CREATE Button3 AS QBUTTON
            Caption = "Copia"
            Left = 370
            Top = 11
            TabOrder = 2
        END CREATE
    END CREATE
    
    'Insert your initialization code here
    
    Form.ShowModal
    
    '--------- Subroutines ---------
    
    SUB Button1Click (Sender AS QBUTTON)
    Private Sub Exit_Click() 
    
    End 
    
    End Sub
    
    END SUB
    
    SUB Button2Click (Sender AS QBUTTON)
    Option Explicit
    
    Public Type BROWSEINFO
        hOwner           As Long
        pidlRoot         As Long
        pszDisplayName   As String
        lpszTitle        As String
        ulFlags          As Long
        lpfn             As Long
        lParam           As Long
        iImage           As Long
    End Type
    
    Private Declare Function SHGetPathFromIDList _
       Lib "shell32.dll" Alias "SHGetPathFromIDListA" _
      (ByVal pidl As Long, ByVal pszPath As String) As Long
    
    Private Declare Function SHBrowseForFolder Lib "shell32.dll" _
       Alias "SHBrowseForFolderA" _
      (lpBrowseInfo As BROWSEINFO) As Long
    Public Const BIF_RETURNONLYFSDIRS = &H1
    Public Const BIF_DONTGOBELOWDOMAIN = &H2
    Public Const BIF_STATUSTEXT = &H4
    Public Const BIF_RETURNFSANCESTORS = &H8
    Public Const BIF_BROWSEFORCOMPUTER = &H1000
    Public Const BIF_BROWSEFORPRINTER = &H2000
    
    Public Const CSIDL_DESKTOP = &H0      ' Il desktop
    Public Const CSIDL_PROGRAMS = &H2     ' I gruppi di programmi
    Public Const CSIDL_CONTROLS = &H3     ' Il pannello di controllo
    Public Const CSIDL_PRINTERS = &H4     ' Le stampanti installate
    Public Const CSIDL_FAVORITES = &H6    ' La directory Preferiti
    Public Const CSIDL_STARTUP = &H7      ' La cartella Esecuzione Automatica
    Public Const CSIDL_RECENT = &H8       ' La cartella File Recenti
    Public Const CSIDL_SENDTO = &H9       ' La cartella Invia a
    Public Const CSIDL_BITBUCKET = &HA    ' Il cestino
    Public Const CSIDL_STARTMENU = &HB    ' Gli oggetti del menu Avvio
    Public Const CSIDL_DRIVES = &H11      ' Drive e Directory
    Public Const CSIDL_NETWORK = &H12     ' I nodi di rete
    Public Const CSIDL_FONTS = &H14       ' La cartella Fonts
    
    Public Const MAX_PATH = 256
    Public Function BrowseFolderDlg(hWnd As Long, sTitle As String, _ 
                   Optional dwFlags As Long = BIF_RETURNONLYFSDIRS, _ 
                   Optional pidlRoot As Long = CSIDL_DESKTOP) As String
      
      Dim bi As BROWSEINFO
      Dim pidl As Long
      Dim path As String
      Dim pos As Integer
        
     'Fill the BROWSEINFO structure with the needed data
    
      bi.hOwner = hWnd
      bi.pidlRoot = pidlRoot
      bi.lpszTitle = sTitle
      bi.ulFlags = dwFlags
       
      'show the browse for folders dialog
      pidl = SHBrowseForFolder(bi)
     
      path = Space$(MAX_PATH)
        
      If SHGetPathFromIDList(ByVal pidl, ByVal path) Then
        pos = InStr(path, Chr$(0))
        BrowseFolderDlg = Left(path, pos - 1)
      Else
        BrowseFolderDlg = ""
      End If
    
    End Function
    
    END SUB

  2. #2
    DOVETE USARE I TAG PER IL CODICE...
    [*code][*/code] senza *

    CHIARO? non posso passare il mio tempo a modificare i vostri post.
    per cortesia, collaborate.

    05.08.2005 - by alka
    Auguri all'angelo custode dei moderatori.

  3. #3
    Originariamente inviato da ladyBlu
    DOVETE USARE I TAG PER IL CODICE...
    [*code][*/code] senza *

    CHIARO? non posso passare il mio tempo a modificare i vostri post.
    per cortesia, collaborate.
    scuse me ma stavo al volo da un cliente e non ho controllato scusa ancora...
    per caso lo hai provato?

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.