Accueil > > > 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
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
Sources de la même categorie
Commentaires et avis
|
Derniers Blogs
ASYNC/AWAIT: COMPRENDRE COMMENT CA MARCHEASYNC/AWAIT: COMPRENDRE COMMENT CA MARCHE par fathi
Tout le monde est unanime pour dire que la programmation multi-thread et asynchrone est en train de devenir un sujet incontournable. Beaucoup de choses sont arrivées avec le framework 4 pour le code parallèle (TPL, PLinq,.) et bientôt, on va avoir l...
Cliquez pour lire la suite de l'article par fathi PAS D'INTELLITRACE SUR MON SITE WEB DANS IIS !PAS D'INTELLITRACE SUR MON SITE WEB DANS IIS ! par Etienne Margraff
J'ai récemment eu un problème pour obtenir l'intelliTrace sur un site web dans IIS. Il n'y avait pas de message d'erreur, rien dans le journal d'évènement Windows, et après 3 appels à une voyante, 2 visites chez un marabou, j'ai failli me résign...
Cliquez pour lire la suite de l'article par Etienne Margraff OFFICE 365 - SHAREPOINT ONLINE, QUELQUES LIMITATIONSOFFICE 365 - SHAREPOINT ONLINE, QUELQUES LIMITATIONS par junarnoalg
De nombreuses entreprises font le choix de SharePoint Online, service fourni au travers de l'offre de Microsoft Office 365. S'il est vrai que ce choix apporte un grand nombre d'avantages; rapidité de mise en œuvre, disponibilité, large couvertu...
Cliquez pour lire la suite de l'article par junarnoalg PRéSENTATION DES API REST DE WINDOWS AZURE : LISTER LES COMPTES DE STORAGEPRéSENTATION DES API REST DE WINDOWS AZURE : LISTER LES COMPTES DE STORAGE par richardc
http://www.c2idotnet.com/articles/presentation-des-api-rest-de-windows-azure-lister-les-comptes-de-storage
Désolé pour "toto", mais c2i existait avant blogs.developpeur.org et c'est mon site "officiel" ;-) ...
Cliquez pour lire la suite de l'article par richardc
Logiciels
DocTranslate (V3.1.0.0)DOCTRANSLATE (V3.1.0.0)DocTranslate est un traducteur de document Microsoft Word, PowerPoint et Excel. Il permet d'autom... Cliquez pour télécharger DocTranslate Tribler (2012)TRIBLER (2012)Tribler est un client pair à pair (P2P/Peer-to-Peer) open source avec la capacité de regarder des... Cliquez pour télécharger Tribler OneSwarm (2012)ONESWARM (2012)Le peer-to-peer qui protège votre vie privée, c'est OneSwarm.
Ce logiciel de peer-to-peer crypté... Cliquez pour télécharger OneSwarm PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V8.4)PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V8.4)PONAMEDIA TV DEVIENS HELLLOOO FLASH
LA TV SUR VOTRE ORDINATEUR.
Toute une plateforme Multi... Cliquez pour télécharger PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO Academy System (17.2.1.0)ACADEMY SYSTEM (17.2.1.0)Logiciel de gestion des établissements.
- élèves/étudiants (inscription, dossier, absence...)
-... Cliquez pour télécharger Academy System
|