تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
لانشاء مجلد بالاعتماد علي APIs
#1
كاتب الموضوع : AhmedEssawy

لانشاء مجلد بالاعتماد علي APIs


كود :
[align=left][FONT=Calibri][FONT=Courier New][[color=teal]DllImport[/color]([color=maroon]"kernel32.dll"[/color], EntryPoint=[color=maroon]"CreateDirectoryA"[/color])][/FONT][/FONT]
[FONT=Calibri][FONT=Courier New][color=blue]public[/color] [color=blue]static[/color] [color=blue]extern[/color] [color=blue]bool[/color] CreateDirectory([color=blue]string[/color] lpPathName, [color=teal]SECURITY_ATTRIBUTES[/color] lpSecurityAttribut);[/FONT][/FONT][FONT=Calibri]
[color=green][FONT=Courier New]// This creates a directory if possible, and updates the status in the function [/FONT][/color]
[FONT=Courier New][color=green]// output text box.[/color][/FONT]
[FONT=Courier New][color=blue]private[/color] [color=blue]void[/color] btnCreateDirectory_Click([color=blue]object[/color] sender, System.[color=teal]EventArgs[/color] e) [/FONT]
[FONT=Courier New]{[/FONT]
[FONT=Courier New][color=teal]Win32API[/color].[color=teal]SECURITY_ATTRIBUTES[/color] security = [color=blue]new[/color] [color=teal]Win32API[/color].[color=teal]SECURITY_ATTRIBUTES[/color]();[/FONT][/FONT][/align]
[FONT=Calibri]

[align=left][FONT=Courier New][color=blue]if[/color] ([color=teal]Win32API[/color].CreateDirectory(txtDirectory.Text, security))[/FONT]
[FONT=Courier New]{[/FONT]
[FONT=Courier New]txtFunctionOutput.Text = [color=maroon]"Directory created."[/color];[/FONT]
[FONT=Courier New]}[/FONT]
[FONT=Courier New][color=blue]else[/color] [/FONT]
[FONT=Courier New]{[/FONT]
[FONT=Courier New]txtFunctionOutput.Text = [color=maroon]"Directory not created."[/color];[/FONT]
[FONT=Courier New]}[/FONT]
[FONT=Courier New]}[/FONT][/align]
[/FONT]
}}}
تم الشكر بواسطة:


المواضيع المحتمل أن تكون متشابهة .
الموضوع : الكاتب الردود : المشاهدات : آخر رد
  كيف تكون مجلد جديد RaggiTech 0 2,214 17-10-12, 09:22 PM
آخر رد: RaggiTech
  نسخ مجلد مع جميع محتوياته RaggiTech 0 2,108 17-10-12, 06:49 PM
آخر رد: RaggiTech
  معرفة حجم مجلد مع جميع الملفات و المجلدات التي يحتوي عليها باستعمال ال Recursion RaggiTech 0 2,184 17-10-12, 06:47 PM
آخر رد: RaggiTech
  لانشاء مجلد على سطح المكتب RaggiTech 0 1,889 17-10-12, 06:02 PM
آخر رد: RaggiTech
  تصحيح الأخطاء الكتابية بالاعتماد على محرر النصوص Microsoft Word RaggiTech 0 3,686 17-10-12, 05:56 PM
آخر رد: RaggiTech
  نسخ .. انشاء ... الغاء ...اعاده تسميه مجلد folderمعين فيجوال بيسك RaggiTech 0 3,462 17-10-12, 05:45 PM
آخر رد: RaggiTech
  لمعرفه نوع القرص المتصل بالجهاز بالاعتماد علي APIs RaggiTech 0 1,693 17-10-12, 05:41 PM
آخر رد: RaggiTech
  لمعرفه المساحه الخاليه بالبايت byte علي قرص معين (هارد ديسك معين) بالاعتماد علي ال A RaggiTech 0 1,739 17-10-12, 05:41 PM
آخر رد: RaggiTech
  لانشاء قاعده بيانات و التعامل معها من خلال الكود RaggiTech 0 2,691 17-10-12, 05:24 PM
آخر رد: RaggiTech
  لانشاء فورم غير مرئيه في البدايه البرنامج بال C# و VB.net RaggiTech 0 1,551 17-10-12, 05:23 PM
آخر رد: RaggiTech

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم