Jump to content


Photo

Disabling Windows Error System


  • Please log in to reply
1 reply to this topic

#1 sepehr

sepehr

    Young Padawan

  • Members
  • Pip
  • 1 posts

Posted 30 September 2006 - 04:09 AM

Hey Guys,
check this delphi code out
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 :unsure:

Edited by sepehr, 30 September 2006 - 04:18 AM.


#2 Intronz

Intronz

    Young Padawan

  • Members
  • Pip
  • 1 posts

Posted 08 October 2006 - 04:05 PM

What windows version are you using? :blink:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users