当前位置:首页
开发技术指南» 文章正文
    引言:

    摘要: 浏览图片,提交后 把原图“image”与其缩略图“newimage”分别上传到“big”和“small”文件夹下 而“big”和“small”文件夹一起放在upload文件夹中 upload文件夹是和程序放在一起的 运行后 结果---上传失败! 我对路径不太会写(如:mpath+"\\big"+imagename) try { mpath=server.mappa......
 ·vc中0x0012在vb6中怎么定义    »显示摘要«
    摘要: vc中 char a = 0x0022; 在vb中怎么定义? const a as byte =0x22 ? 这样是不是长度不一样了? ......


如何确定project.exe执行了

自己做了个小程序,但发现project.exe居然能同时运行多个.且多次同时运行的时候会发生严重错误.  
   
  想在程序中进行控制,如果project.exe已经运行的话,再运行project.exe应提示:project.exe已经运行,不能再运行了.

NO.1   作者: xixuemao

修改工程文件如下:  
  program   Project1;  
   
  uses  
      Forms,  
      Windows,  
      Unit1   in   Unit1.pas   {Form1};  
   
  {$R   *.res}  
  var  
          hMutex:hWnd;  
  begin  
      Application.Initialize;  
      Application.Title:=test;  
      hMutex:=CreateMutex(nil,false,test);  
      if   GetLastError<>Error_Already_Exists   then  
      begin  
          Application.CreateForm(TForm1,   Form1);  
          Application.Run;  
      end  
      else  
      begin  
          Application.MessageBox(本程序只允许同时运行一个,Error);  
          ReleaseMutex(hMutex);  
      end;  
  end.


 ·在c++中的handle在c#是如何用    »显示摘要«
    摘要: 我调用了外部dll,dll函数中会返回handle,在c#如何定义该类型? ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE