Guidance
指路人
g.yi.org
software / rapidq / Examples / Registry & INI / QFileAssociation / SetFileAssociation_Demo.Bas

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
'
' =============================================================================
' FileAssociation.Inc            April 2004                 by Jacques PHILIPPE
'
'             Association of an Executable to a File Extension
' Demo                                                       Version 0.0.1 beta
' =============================================================================
'        *****  WITH NO WARRANTY. USE AT YOUR OWN RISK. I USE IT  *****
' =============================================================================
'
'  Console Application : File Association
'
     $ESCAPECHARS ON
     $TYPECHECK ON
'
     $INCLUDE "SetFileAssociation.Inc"
'
     IF MESSAGEDLG("ARE YOU SURE YOU WANT TO ASSOCIATE\n\nYOUR \".BAS\" FILES WITH THE NOTEPAD.EXE" _
      , 0, 4 OR 8, 0) = 2 THEN
      PRINT "\n   *** NOTHING DONE ***"
      GOTO QUIT
     END IF
'
' Example : will link basfile to Notepad.Exe
' ------------------------------------------
     IF SetFileAssociation (".Bas", "C:\\Windows\\NotePad.Exe %1") <> 0 THEN
      PRINT ("\n   *** File Association Made Successfully ***")
     ELSE
      PRINT ("\n   *** File Association Failed (File Extension passed Empty or too Long)***")
     END IF
'
' -------------------------------------------------------------
' EXIT CONSOLE
' ------------
QUIT:
     DEFSTR sExit
     INPUT "\n\n                    CR to QUIT \n\n", sExit
     Application.Terminate
     END
'
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Sat 2024-4-20  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2004-04-28 21:00:02