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

كيف أضيف صورة في Load

بدأه Discover_2010 في 25 يناير 2009 · 7 رد · 1,075 مشاهدة · في Microsoft Visual C#.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

اخواني انا اكتبت هذا الكود ولكن لا يعمل

اقتباس

pictureBox1.ImageLocation="D:\images.jpg";

#2

تحية طيبة :

pictureBox1.ImageLocation="D:\\images.jpg";

سلاام.

#3

instead of duplicating the '/' into every directory, another solution is with verbatim string that eliminate all the escape in your string!!


"c:\\Program Files\\Adobe\\Flash\Objects\\"
use this :
@"c:\Program Files\Adobe\Flash\Objects\"
instead of this:

Basslk

http://blogs.windowsclient.net/basslk

.NET Application Developer

MCSE

#4
White Wolf كتب:

instead of duplicating the '/' into every directory, another solution is with verbatim string that eliminate all the escape in your string!!


"c:\\Program Files\\Adobe\\Flash\Objects\\"
use this :
@"c:\Program Files\Adobe\Flash\Objects\"
instead of this:

exactly

#5

مشكورين اخواني .....انا كتبت الكود بالطريقة الاولى اتنفذ كويس بس لما جيت انفذه بالطريقة الثانية ظهر رسالة خطأ

pictureBox1.ImageLocation = "@D:\\Image0009.jpg";
#6

the @ character is before the " character the delimiter of the string OK body

@"c:\Folder1\SubFolerd11" its not inside the string its outside

Basslk

http://blogs.windowsclient.net/basslk

.NET Application Developer

MCSE

#7

شكرا جزيلاً .........عندي استفسار بسيط ماهو الفرق بين الطريقتين ؟

#8

السلام عليكــم ورحمـة الله وبركاتــه

المشكل أن الرمز \ محجوز عند إستخدامه داخل نص , كما هو الحال لعدة رموز أخرى و في الآن ذلك الرمز يمكن من إستخدام رموز خاصة داخل النصوص لذلك إذا أردت إستخدامه فعليك إستخدامه مسبوق بذاته :) أي تكراره.

الرمز @ يستخدم لإخبار المترجم أن النص الموالي هو مسار و ليس نص عادي.

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