|
HI..
How to get the path of the folder or file that the user has clicked in the windows explorer
Thanks & Regards,
Venkat
|
|
|
|
|
Thank you for your kind response.i need to get the path in console application.but in console application Application.ExecutablePath and Application.StartupPath are not working. Is there any other way.
babu
|
|
|
|
|
Of course they are working
You just have to add the System.Windows.Forms reference, then add the using System.Windows.Forms; line to your Program.cs file.
After that, a line of code like this one:
string S = Application.ExecutablePath;
will return the information you need.
SkyWalker
|
|
|
|
|
Hello,
Happy new year!
I think "System.Environment.CurrentDirectory" is what you need.
All the best,
Martin
|
|
|
|
|
Not quite, Martin
It returns the directory from which this process starts. During the running, the current directory may change. Then you need to use the Application.ExecutablePath .
SkyWalker
|
|
|
|
|
Hello!
Mircea Puiu wrote: During the running, the current directory may change
You mean the path where the exe was called changes?
OK, I never took care of that.
But, I mainly use "System.Environment.CurrentDirector" because of it's design time support.
All the other methods I tested return an obscure design path.
All the best,
Martin
|
|
|
|
|
No, no!
The current directory is the same with the executable path when the app starts. You may change the current directory (by using a file dialog for example), and that has nothing to do with the execution path.
SkyWalker
|
|
|
|
|
Ohh,
Ok, I got it now!
I was thinking he needs only the exe path.
Thanks for the info!
All the best,
Martin
|
|
|
|
|
Hello,
I am trying to integrate GoogleCheckout and working on to process order notifications sent by google...
Google sends order notifictaion in XML format as HTTP_RAW_POST_DATA.
I can retrive it in PHP as follows:
if(isset($GLOBALS["HTTP_RAW_POST_DATA"]) && $GLOBALS["HTTP_RAW_POST_DATA"] != "")
{
$msg.="<br>".$GLOBALS["HTTP_RAW_POST_DATA"];
}
Can anybody let me know its equivalent code in asp.net C# 2.0
Thanks in advance for all your help.
Regards,
Suman Singh
|
|
|
|
|
Hello all,
I have two c# dlls and i want to know the difference in text format.
So please refer me some tool available on internet.
The 'Comp' command of DOS prompt gives result at binary level.
I do not want that.I want code level difference.
Thank you.
"Every thing matters in this world but what you think,it matters more.
When thinking changes,the whole world changes."
|
|
|
|
|
|
hi,
how to merge the datagrid header column in windows application using C# ?
|
|
|
|
|
|
I want some software information about LDAP (Lightweight Directory Access Protocol). I want to know if the windows support it or not.If so, how can I work with it and some information of this kind. Whould you please help me this way? I'd appreciate it.
Thanks in advance.
|
|
|
|
|
|
Hi
Can anyone help me??????????
I want the code for self extracting the files (can be anytype namely .rar,.zip.........)using c#.net
Thanks,
vin1070.
Thanks,
Vin1070
|
|
|
|
|
I believe .NET 2.0 has zip support. There's certainly no RAR support built in.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thanks Christian Graus
u ve said .NET 2.0 has zip support.but is it possible to write code with out taking refrence of any other dll.
What i mean to say is i developed an application by taking the refrence of some thirdparty dll.but i ve to build my own application without taking any reference except the inbuilt refrences which we ve in .net.
Is it possible............
|
|
|
|
|
You can also use...some exe to extract the files
for example you can use process to start the WinZip or WinRar to extract files to perticular location..
You can pass the zip filename as an argument to the process
eg,
this.process1.StartInfo.FileName="C:\\Program Files\\WinRAR2.rar.exe";
this.process1.StartInfo.Arguments="something.zip";//or something.rar
this.process1.Start();
regards ,
nishu
|
|
|
|
|
I want to programatically fire an event to a .NET control, but the syntax confuses me. I read the MSDN sample for "AlarmClock", but it's confusing and not exactly what you'd read to answer my simple question.
Here's the handler for my control:
void dgvAllEvents_ColumnDividerDoubleClick(object sender, DataGridViewColumnDividerDoubleClickEventArgs e)
I know I need to create a new DataGridViewColumnDividerDoubleClickEventArgs and fill it out, but how do I then fire the event?
|
|
|
|
|
The point is that you don't, the framework fires the event, your code simply subscribes to it.
In fact, you can view the event list in the designer, and type in a method name, and the IDE will generate the event code and hookup for you.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
No no, you misunderstand me. I WANT to fire the event, as if the user had double-clicked the column divider.
Why? Because the DataGridView handles the "AutoResizeColumns" concept somewhat, uh... stupidly. I can't tell the DGV to resize the columns themselves, and then go back to a state where the user can resize them, without them resetting themselves to their original widths.
So, I want to fire the "hey, act as if the user had double-clicked the column divider" event, which will cause the column to autoresize and still be user-changeable.
|
|
|
|
|
So, let's get back to the original question - what is the syntax for raising an event?
|
|
|
|
|
Hi Joe!
It is not difficult at all to implement your own delegates and events that allow you to send notifications from one part of your application to another.
You must understand the delegates and the events . Do yourself a favour and read this excellent article[^] by Joe Bennett.
SkyWalker
|
|
|
|
|
Before I dig into this - and this article essentially covers the same ground as the Alarm Clock example from the MSDN documentation, which I pointed out was unnecessarily complex to answer this simple question - do I really need to create delegates just to shoot an event to an existing .NET control?
I just want to raise an existing System event... is this not just one line of code?
|
|
|
|