please sent the bitmap to Window Picture and FAX viewer instead of MS paint。 我看了看,应该没有什么问题的: Windows 图片和传真查看器概述图像或图片是通常通过扫描设备(例如,数字相机、传真机或扫描仪)转换成数字化格式的照片、线条画或文本文档。可以从扫描设备下载图像并将其保存在文件夹之中。将图片下载到计算机之后,可以以幻灯片形式查看图像,也可以通过 Windows 图片和传真查看器进行查看。
rundll32.exer %Systemroot%\System32\shimgvw.dll,ImageView_Fullscreen----启动一个空白的Windows图片和传真查看器 于是我就简单的写了一下 Winexec("rundll32.exer %Systemroot%\\System32\\shimgvw.dll,ImageView_Fullscreen c:\\1.1");结果运行失败,GETLASTERROR一看,0x0000007E 找不到指定的模块。 真是非常奇怪,在开始--运行里面都是好好的, 只好老老实实: char strexe[255]; char strsys[255]; GetSystemDirectoryA(strsys,255); strcpy(strexe,strsys); strcat(strexe,"\\rundll32.exe "); strcat(strexe,strsys); strcat(strexe,"\\shimgvw.dll,ImageView_Fullscreen "); strcat(strexe,strFile); 这些总算成功了。可是VB里面直接SHELL都是可以的 执行一个可执行文件,返回一个 Variant (Double),如果成功的话,代表这个程序的任务 ID,若不成功,则会返回 0。 如果 Shell 函数成功地执行了所要执行的文件,则它会返回程序的任务 ID。任务 ID 是一个唯一的数值,用来指明正在运行的程序。如果 Shell 函数不能打开命名的程序,则会产生错误。 注意 缺省情况下,Shell 函数是以异步方式来执行其它程序的。也就是说,用 Shell 启动的程序可能还没有完成执行过程,就已经执行到 Shell 函数之后的语句。 WinExec The WinExec function runs the specified application. This function is provided for compatibility with 16-bit Windows. Win32-based applications should use the CreateProcess function. UINT WinExec( LPCSTR lpCmdLine, // address of command line UINT uCmdShow // window style for new application ); Parameters lpCmdLine Pointer to a null-terminated character string that contains the command line (filename plus optional parameters) for the application to be executed. If the name of the executable file in the lpCmdLine parameter does not contain a directory path, the system searches for the executable file in this sequence: The directory from which the application loaded. The current directory. The Windows system directory. TheGetSystemDirectory function retrieves the path of this directory. The Windows directory. TheGetWindowsDirectory function retrieves the path of this directory. The directories listed in the PATH environment variable. uCmdShow Specifies how a Windows-based application window is to be shown and is used to supply the wShowWindow member of the STARTUPINFO parameter to the CreateProcess function. For a list of the acceptable values, see the description of the nCmdShow parameter of theShowWindow function. For a non-Windows – based application, the PIF file, if any, for the application determines the window state. 明明说The Windows system directory. 支持系统目录的。真是奇怪。 字体:大 中 小 |