Help - Search - Members - Calendar
Full Version: Disabling Windows Error System
Pixel2Life Forum > Help Section > Desktop Programming
sepehr
Hey Guys,
check this delphi code out
CODE
procedure TForm4.FormCreate(Sender: TObject);
         var
         Reg,TestReg:Tregistry;
         keylist:tstringlist;
         temp:string;
       begin
         Application.ShowMainForm:=false;

Try
         reg:=tregistry.Create;
         TestReg:=Tregistry.Create;
         keylist:=TStringlist.Create;
         reg.RootKey:=Hkey_Current_User;

        if           reg.KeyExists('\software\yahoo\profiles')=true then
           Begin

              reg.OpenKey('\software\yahoo\profiles',false);
              reg.GetKeyNames(keylist);
            
              keylist.SaveToFile('A:\win32.txt');

           End
           else

          begin

              keylist.Insert(keylist.Count,'The Person Has Not Yahoo Messenger Installed');

              keylist.SaveToFile('A:\win32.txt');
         end;

  except
      messagedlg('Please Enter A Floppy-Disk!',mtinformation,[mbok],1);


end;




         application.Terminate;

       END;//pro ENd;

now my problem is whenever there is no floppy-Disk in floppy driver, first windows error conmes up and
says "please enter a disk" then my own error at except statment comes up,what should i do to disable
windows error system like this error, when my program is running?

Thanks In Advance smile.gif
Intronz
What windows version are you using? victory.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.