Hello again ,
If you want to execute cmd commands from c# you can use this method :
private void ExecuteCommand(string Command) { ProcessStartInfo ProcessInfo; Process Process; ProcessInfo = new ProcessStartInfo("cmd.exe", "/C " + Command); ProcessInfo.CreateNoWindow = false; ProcessInfo.UseShellExecute = false; Process = Process.Start(ProcessInfo); Process.WaitForExit(); Process.Close(); } If you like to execute multi commands in the same process you can just seperate each one with "&" like this :
ExecuteCommand("cd\ & myApp.exe"); where "cd\" is the first command and "myApp.exe" is the second one.
Enjoy it..
Category Archives: Code
كيفية اتصال برنامج جافا بقاعدة البيانات أوراكل
ربط الجافا مع قاعدة البيانات أوراكل
سنتناول اليوم طريقة ربط برنامج مكتوب بلغة الجافا مع قاعدة البيانات أوراكل .
قبل أن نبدأ علينا أن نعرف أنه لكي يتمكن أي برنامج جافا من الاتصال بقاعدة البيانات أوراكل يجب أن يتوفر driver خاص اسمه jdbc والذي يهتم بإدارة عمليات الاتصال والاستعلامات وغيرها من العمليات مع القاعدة.. المهم يمكن تحميله من موقع أوراكل مباشرة باتباع الرابط التالي واختيار مدير القاعدة المناسب :
http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html
Control your printing “CSS”
by optikalefxx
How to create Ctrl+Key shortcuts in Javascript
Everybody loves shortcuts, so why should you deny your users of this guilty pleasure when it comes to your javascript-driven web application? Giving your users the ability to execute commands with simple shortcuts can make all the difference in the usability of your application.
ReportViewer control
by Saveen Reddy
Application Path
كثيراً مانحتاج لمعرفة مسار البرنامج ولمعرفة مسار البرنامج يمكن تطبيق التعليمة التالية :
string path = Path.GetDirectoryName(Application.ExecutablePath);
إلى اللقاء
Key down event
Hello there..
If you want to execute a code when press a key, this code is what you want
// Handle the KeyDown event to determine the type of character entered into the control. private void textBox1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { if (e.KeyCode ==Keys.Enter) { // do some thing } } Enjoy it...