main.prg

来自「MSComm控件资料,Visual Basic 6.0(以下简称VB) 是一种功」· PRG 代码 · 共 88 行

PRG
88
字号
LPARAMETER tcMethod, tcSystem

LOCAL lcCommand, lcMethod, lcSystem, llFound

CLEAR PROGRAM

lcMethod = IIF(EMPTY(tcMethod), "", UPPER(tcMethod))

DO CASE
	CASE INLIST( lcMethod, 'SUPERCLS' , ;
	                       'BUILDERB' , ;
	                       'ZIPFILE'  , ;
	                       'SETINCL'  , ;
	                       'CHANGECL' , ;
	                       'GENDBCX'  , ;
	                       'OBJSEC'     )
		=EVAL(tcMethod)

	OTHERWISE
	    IF .NOT. ( "FLASHSTD" $ UPPER( SET('CLASSLIB') ) )
	       SET CLASS TO flashstd ADDITIVE
	    ENDIF
	    
		IF TYPE('_screen.oFlashStandard') == 'U'
			_screen.AddObject("oFlashStandard", "FlashMacros")
		ENDIF

		IF lcMethod <> 'RELEASEMENU'

			*-- Create and/or open the flashstd table
			IF !FILE("c:\flashstd.dbf")
				CREATE TABLE c:\flashstd (	cAuthor C(35), ;
											cCompany C(35), ;
											cSystem C(35), ;
											cInitials C(3))
				INDEX ON cSystem TAG cSystem
			ELSE
				IF !USED("flashstd")
					USE c:\flashstd IN 0 SHARED
				ENDIF
			ENDIF
			
			*-- If a system was specified as a parameter, use it.
			*-- Otherwise, if the FLASHSTD.MEM file exists, use it
			*-- to get the most recently used system name
			IF !EMPTY(tcSystem)
				lcSystem = tcSystem
				IF FILE('C:\FLASHSTD.MEM')
					ERASE C:\FLASHSTD.MEM
				ENDIF
				SAVE TO C:\FLASHSTD ALL LIKE lcSystem
			ELSE
				IF FILE('C:\FLASHSTD.MEM')
					RESTORE FROM C:\FLASHSTD ADDITIVE
				ENDIF
			ENDIF
			
			IF TYPE('lcSystem') == 'C'
				llFound = SEEK(lcSystem, 'flashstd', 'csystem')
			ENDIF

			IF !llFound
				IF  !_screen.oFlashStandard.Config()
					RETURN .F.
				ENDIF
			ELSE
				_screen.oFlashStandard.cAuthor	= flashstd.cAuthor
				_screen.oFlashStandard.cCompany	= flashstd.cCompany
				_screen.oFlashStandard.cSystem	= flashstd.cSystem
				_screen.oFlashStandard.cInitials	= flashstd.cInitials
			ENDIF
		ENDIF && lcMethod <> 'RELEASEMENU'
		
		IF !EMPTY(lcMethod)
			lcCommand = '=_screen.oFlashStandard.' + lcMethod
			&lcCommand
		ENDIF

		IF lcMethod = 'RELEASEMENU'
			_screen.RemoveObject('oFlashStandard')
		ENDIF
		
		IF USED('flashstd')
			USE IN flashstd
		ENDIF
ENDCASE

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?