begin process at 2012 02 17 01:08:55
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Fichier / Disque

 > AFFICHER LA BOITE DE DIALOGUE PROPRIÉTÉS D'UN FICHIER

AFFICHER LA BOITE DE DIALOGUE PROPRIÉTÉS D'UN FICHIER


 Information sur la source

Note :
2 / 10 - par 1 personne
2,00 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10
Catégorie :Fichier / Disque Niveau :Débutant Date de création :18/02/2002 Date de mise à jour :18/02/2002 10:31:14 Vu :5 221

Auteur : vbbreizh

Ecrire un message privé
Site perso
Commentaire sur cette source (0)
Ajouter un commentaire et/ou une note

 Description

Afficher la boite de dialogue PROPRIÉTÉS d'un fichier,
Ce à partir de votre application VB, c'est possible...
(Code récupéré sur VBCODE.COM et créé par un anonyme que je remercie.)

Source

  • 'Launch the File Properties dialog box for a given file
  • '----------------------------------------------------------
  • 'Author : Anonymous
  • 'Date Submitted : 1/12/1999
  • 'Category : File Manipulations
  • 'Compatibility : VB 6,VB 5,VB 4/32
  • 'Origin : VBCODE.COM
  • '----------------------------------------
  • 'Declarations (Module)
  • '---------------------------------------
  • Type SHELLEXECUTEINFO
  • cbSize As Long
  • fMask As Long
  • hwnd As Long
  • lpVerb As String
  • lpFile As String
  • lpParameters As String
  • lpDirectory As String
  • nShow As Long
  • hInstApp As Long
  • lpIDList As Long
  • lpClass As String
  • hkeyClass As Long
  • dwHotKey As Long
  • hIcon As Long
  • hProcess As Long
  • End Type
  • '
  • Public Const SEE_MASK_INVOKEIDLIST = &HC
  • Public Const SEE_MASK_NOCLOSEPROCESS = &H40
  • Public Const SEE_MASK_FLAG_NO_UI = &H400
  • '
  • Public Declare Function ShellExecuteEX Lib "shell32.dll" Alias "ShellExecuteEx" (SEI As SHELLEXECUTEINFO) As Long
  • -------------------------------------------------
  • 'Code (Form1 + 1 bouton de commande)
  • ------------------------------------------------
  • Private Sub Command1_Click()
  • 'call file properties dialog box
  • On Error Resume Next
  • Call File_Properties_DialogBox("c:\windows\system\sysedit.exe", Me.hwnd)
  • End Sub
  • Public Sub File_Properties_DialogBox(FileName As String, OwnerhWnd As Long)
  • Dim SEI As SHELLEXECUTEINFO
  • Screen.MousePointer = 11
  • With SEI
  • .cbSize = Len(SEI)
  • .fMask = SEE_MASK_NOCLOSEPROCESS Or SEE_MASK_INVOKEIDLIST _
  • Or SEE_MASK_FLAG_NO_UI
  • .hwnd = OwnerhWnd
  • .lpVerb = "properties"
  • .lpFile = FileName
  • .lpParameters = vbNullChar
  • .lpDirectory = vbNullChar
  • .nShow = 0
  • .hInstApp = 0
  • .lpIDList = 0
  • End With
  • Call ShellExecuteEX(SEI)
  • Screen.MousePointer = 0
  • End Sub
  • ---------------------------------------------------------------------------------------------------
'Launch the File Properties dialog box for a given file
'----------------------------------------------------------
'Author :  Anonymous
'Date Submitted :  1/12/1999
'Category :  File Manipulations
'Compatibility :  VB 6,VB 5,VB 4/32
'Origin : VBCODE.COM
'----------------------------------------
'Declarations (Module)
'---------------------------------------
Type SHELLEXECUTEINFO
    cbSize As Long
    fMask As Long
    hwnd As Long
    lpVerb As String
    lpFile As String
    lpParameters As String
    lpDirectory As String
    nShow As Long
    hInstApp As Long
    lpIDList As Long
    lpClass As String
    hkeyClass As Long
    dwHotKey As Long
    hIcon As Long
    hProcess As Long
End Type
'
Public Const SEE_MASK_INVOKEIDLIST = &HC
Public Const SEE_MASK_NOCLOSEPROCESS = &H40
Public Const SEE_MASK_FLAG_NO_UI = &H400
'
Public Declare Function ShellExecuteEX Lib "shell32.dll" Alias "ShellExecuteEx" (SEI As SHELLEXECUTEINFO) As Long
-------------------------------------------------
'Code (Form1 + 1 bouton de commande)
------------------------------------------------
Private Sub Command1_Click()
'call file properties dialog box
On Error Resume Next
Call File_Properties_DialogBox("c:\windows\system\sysedit.exe", Me.hwnd)
End Sub
Public Sub File_Properties_DialogBox(FileName As String, OwnerhWnd As Long)
Dim SEI As SHELLEXECUTEINFO
Screen.MousePointer = 11
With SEI
        .cbSize = Len(SEI)
        .fMask = SEE_MASK_NOCLOSEPROCESS Or SEE_MASK_INVOKEIDLIST _
         Or SEE_MASK_FLAG_NO_UI
        .hwnd = OwnerhWnd
        .lpVerb = "properties"
        .lpFile = FileName
        .lpParameters = vbNullChar
        .lpDirectory = vbNullChar
        .nShow = 0
        .hInstApp = 0
        .lpIDList = 0
    End With
Call ShellExecuteEX(SEI)
Screen.MousePointer = 0
End Sub
--------------------------------------------------------------------------------------------------- 



 Sources du même auteur

APPEL DES BOÎTES DE PROPRIÉTÉS (DESKTOP, INTERNET...)
Source avec Zip CADRAN DE CHRONO
Source avec Zip TRANSPIC
Source avec Zip JPG2ANIM
Source avec Zip VBEXT

 Sources de la même categorie

Source avec Zip Source .NET (Dotnet) MODIFIER LES EXTENSION DES FICHIERS par okosa
ROUTINE DIR RÉCURSIVE POUR OBTENIR LA LISTE DE TOUS LES FICH... par kerisolde
Source avec Zip Source avec une capture FILE,SECURITY,FICHIER par okosa
Source avec Zip Source avec une capture Source .NET (Dotnet) PATCHEUR DE FICHIER par tototh
Source avec Zip Source avec une capture LECTURE DES INFORMATIONS DES DISQUES COMPOSANT UN ENSEMBLE R... par jack

Commentaires et avis

Aucun commentaire pour le moment.

 Ajouter un commentaire




Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Février 2012
LMMJVSD
  12345
6789101112
13141516171819
20212223242526
272829    

Consulter la suite du CalendriCode

Photothèque

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,655 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales