home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cenvi23.zip / BCKGRND.CMD < prev    next >
OS/2 REXX Batch file  |  1994-10-03  |  841b  |  30 lines

  1. EXTPROC CEnvi2
  2. //*****************************************
  3. //*** Bckgrnd.cmd - Load and display a  ***
  4. //*** ver.1         new background file ***
  5. //*****************************************
  6.  
  7. #include <PMdll.lib>
  8.  
  9. main(argc,argv)
  10. {
  11.    if ( argc != 2  ||  !strcmp(argv[1],"/?")  ||  !strcmpi(argv[1],"help") )
  12.       Instructions();
  13.    else {
  14.       if ( NULL != (DesktopObject = WinQueryObject("<WP_DESKTOP>")) ) {
  15.          sprintf(SetupString,"BACKGROUND=%s;ICONVIEW=NONFLOWED,MINI;",argv[1]);
  16.          WinSetObjectData(DesktopObject,SetupString);
  17.       }
  18.    }
  19. }
  20.  
  21. Instructions()
  22. {
  23.    printf("\n")
  24.    printf("Bckgrnd - Change desktop background image\n")
  25.    printf("\n")
  26.    printf("USAGE: BCKGRND <FileSpec>\n")
  27.    printf("WHERE: FileSpec is the name of an image file to make new background\n")
  28.    printf("\n")
  29. }
  30.