الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

هل يمكن هذا

مغلق
بدأه thepatriot55555 في 28 فبراير 2005 · 6 رد · 781 مشاهدة · في لغة Delphi
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم

مثال

الويندوز يشغل ملفات الفيديو ببرنامج Mediaplayer 2

كيف أغير برنامج التشغيل إلى RealPlayer

عن طريق البرمجه بالدلفي

مثال على ملفات الفيديو avi مثلا

الرجاء سرعة الرد

#2

حسب ماأعرف كل إمتداد أو نسق موجود بالنظام مثل txt , jpg , avi وهكذا

راح يكون لها برامج معينه لتشغيلها موجوده قيمها داخل محرر التسجيل regedit

يعني لو ضغطت على ملف صوره بالزر الأيمن راح يعطيك النظام مجموعة برامج اذا كانت موجوده لتشغيل

ملف الصوره

هذي الاشياء كلها تتم في محرر التسجيل

تغير قيمه ليصبح برنامج هو المشغل الرئيسي للنسق

وتضع قيم لتكون برامج اخرى تستطيع تشغيل الملف

فين بالضبط ماأعرف :wacko:

جايز الاخوان يساعدونك

#3
////
function
RegisterAssociation(ExeName,FileExt,FileDesc:String;FileIcon:String):boolean
;
{
   This function registers a file association.

   ExeName is the full path and name of the exe that will be associated
with the extension.
   FileExt is the extension of the file to register i.e. ".dxf" or .ord".
   FileDesc is the description of the file. i.e. "Drawing Exchange File".
   FileIcon is the location of the icon to associate with this file type.
             For example "C:\MyApplicationLocation\Myapplication.exe,0"
             Note the ",0" means use the icon associated with the .exe.
             You can also say ",1" to use the next icon, if one exists.
             Or you can pass the name of the icon itself such as:
             "C:\MyApplication\Icons\MyIcon.ico".
   Note: You may have to re-boot the PC before the associated icon will
change.
   Note: When end user double clicks on the registered file type, your .exe
         will launch, and the file name will be passed via ParamStr(1).
         (If the file name contains spaces, then it may also be passed in
          ParamStr(2), etc.)
}
Var
   FileClass:String;
begin

   Result:=false;

   FileExt:=Trim(FileExt);
   If FileExt='' then exit;
   If FileExt[1]<>'.' then FileExt:='.'+FileExt;

   FileClass:=Copy(FileExt,2,Length(FileExt))+'file';

   With TRegistry.create do
   begin
     Try
       RootKey:=HKEY_CLASSES_ROOT;
       if OpenKey(FileExt,True) then
       begin
         WriteString('',FileClass);
         CloseKey;
       end;
       if OpenKey(FileClass,True) then
       begin
         WriteString('',FileDesc);
         CloseKey;
       end;
       if OpenKey(FileClass+'\Shell\Open',True) then
       begin
         WriteString('','&Open');
         CloseKey;
       end;
       if OpenKey(FileClass+'\Shell\Open\command',True) then
       begin
         WriteString('',ExeName+' "%1"');
         CloseKey;
         Result:=true;
       end;
       {Register an icon file with the application.}
       if OpenKey(FileClass+'\DefaultIcon',True) then
       begin
         WriteString('',FileIcon);
         CloseKey;
       end;
     Finally
       Free;
     end;
   end;

end;

عندما تريد أن تتعلم جافا بالفيديو إليك قنوات الYouTube الخاصة بقسم الحاسب الآلي

أ. فاضل خداده

أ. عبدالعزيز الرومي

أ. وحيد الساير

(وَمَا أُوتِيتُمْ مِنْ الْعِلْمِ إِلاَّ قَلِيلاً) [سورة الإسراء: الآية 85]

#4

هى دى الحلول ولا بلاش الله يبارك فيك

{ربى زدنى علما}

#5

السلام عليكم

طريقة كويسه إنك بتستعمل الرجيستر بس يريت تذكرلنا المصدر علشان تعم الفائدة و نزورو الموقع ممكن نلاقوا فيه حجات مفيده (هذا في حالة أنك لم تقم ببرمجة الكود شخصيا)

تحياتي

أحمد صقر

أقوى عروض الإستضافة على الإطلاق

عروض تبدئ من 1.99 $ في الشهر

أدخل على صقر هوست و سترى بنفسك

#6

أشكركم على الرد

ولكن كيف أعرف أن أحد الملفات يتم تشغيله الأن

نعم أريد الكود الذي يجعل البرنامج يشعر بأن المستخدم يشغل أحد الملفات الآن

مثال عندما يشغل المستخدم الملف mp3.*

يقوم البرنامج بعمل شئ معين

#7

أحمد ليش الجمله كذا

اقتباس
نزورو الموقع ممكن نلاقوا فيه حجات مفيده

نزوروا ونلاقوا :wacko:

بالعربي هذي :lol:

هذا الموضوع مغلق.

مواضيع مشابهة