|
Application.StartupPath;
this is a string representing the full path where the application executable was started
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
That's not available in WPF.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: That's not available in WPF.
I didnt see anything about WPF....
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
If he wants to move the app to WPF, he will have issues if he uses that particular method. It's all about maintainability.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Does this still work in WPF:
System.Reflection.Assembly.GetExecutingAssembly.Location
(not the best way to do it but a way )
|
|
|
|
|
That's not always reliable. Try this[^] way instead.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
it is just a c#.net windows application
|
|
|
|
|
Repeat after me - "future-proofing" and "maintainability". You could just use interop and cal GetModuleFileName, because that's what .Net is doing anyway...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
it is giving the path like this
C:\Inetpub\wwwroot\TestingApplication\TestingApplication\bin\Debug
but i want just my application path only like
C:\Inetpub\wwwroot\TestingApplication
so that i can hardcode myfile name and i can concatinate
like
C:\Inetpub\wwwroot\TestingApplication\myfilename.doc
|
|
|
|
|
Narendra Reddy Vajrala wrote: but i want just my application path only like
C:\Inetpub\wwwroot\TestingApplication
i think thats a bad idea
the path you want just contains your project files and stuff, the application is the important part, if you want to import files at run time you should put them in the same location as the application executable or a sub-directory of it.
though im not entirely sure what you even want to do so maybe im wrong...
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
what exactly is
to my application setup i want to add a word document(here i will give some text here)
i want to read that text in one of my form.
how can i read that text.
Please help me itz urgent
|
|
|
|
|
ok well you can look into the System.IO.StreamReader class if you file is just plain text or you can do a search for 'Word Automation with C#' and have a look at working with MS Word, but that approach can be a bit of a pain.
What format your file in, and what data do you want to get from it, give example of input format and desired output and maybe i can help further
EDIT:
Actually i just seen your repost so my help stops here
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
sure.,
Thankyou
In my application(product) i have 2 modules, by default those 2 will install at the time of installation.
for some clients we have to give single module only at that time 2nd module should be blocked.
For this what i want to do is
I want to add a file (word or txt) with TRUE or FALSE as text
in my coding i want to read that value (TRUE/FALSE)
if TRUE i will allow 2nd module otherwise i want restrict.
for this how can i get that added document path
and this document i want to add to my solution setup project.
Thanks In Advance
|
|
|
|
|
use below code u ill be geting application start up path as string
Application.StartupPath();
|
|
|
|
|
i want my application path only not startup path
|
|
|
|
|
I need to retrieve data from microsoft excel using visual c# 2005 !!!......How can i do it ?? is it possible using file objects !! I planning to make a windows application wid it
plz help !!!
|
|
|
|
|
Here[^] is the list with examples!!
Enjoy
I are troll
|
|
|
|
|
the sites u gave displays either an excel sheet or enters data into excel sheet through c#. I want to read data from excel sheets through c# and display them in "windows form ". The output should be in a simple textual way.
Can i use streams and file objects to do so ??
plz help!!!
|
|
|
|
|
That depends on the layout of the Excel-file and the version of Excel. I suggest you use ODBC to read Excel, or interop. We also got articles here on CodeProject that explain the reading;
* ODBC[^] approach
* Example using InterOp[^].
Enjoy
I are troll
|
|
|
|
|
About Remoting .Net, I want to ask you how to debug a remoting object.
Suppose I have 3 projects:
+ Project RemotingService: provide Remoting class, type Library
+ Project RemotingServer: reference to RemotingService and register it to TCP Channel.
+ Project RemotingClient: this project references to RemotingService and use classes in RemotingService
They work well but I can not debug code in RemotingService project.
Could you have any ideas to solve this problem.
|
|
|
|
|
I've never done it personally, but I've seen #if DEBUG statements in main used to compile a service as a console app in debug mode; then it can be run and debugged just like any other program.
|
|
|
|
|
Hi Guys,
I have created a small project (application). Now I want to deploy it. I dont think that I require setup for it because, the project is very small. But the problem is that, there are certain icons and small images which I have added in my form. Those are saved in the resource file, with the .resx extension.
Now when I build my application and go to - Visual Studio 2005 - Projects - MyProjectNameFolder - Bin - Release - Application.exe and copy the file .exe file and run it on another machine. It simply shows some kind of error message! Will I've to copy the entire solution? But that wont be user friendly. So how do I create a standalone application?
Please tell me the steps!
Your help will be appreciated....
Rajdeep.NET
|
|
|
|
|
Is another machine installed .net framework?
You better create a Windows Installer project with the exe file added.
It's easy to create setup, why you dont think that you require setup for it because, the project is very small?
8.Kelvin()
{
while (!(the machine can program itself))
Wont_stop_coding = true;
}
|
|
|
|
|
Hi Kelvin,
Actually I was intending to create a standalone application. There are only 4 to 5 forms in my project connected to each other via creating objects of each other, and so I dont require a setup for it. I just want that the user download it and simply double-clicking the .exe file run the application, without needing any Setup.
Thanx,
Rajdeep.NET!
|
|
|
|
|
You can't do this.
In order to run the application you need the framework.
Also simply copying the exe only works if you don't use any other references(dll's), if you do you need to copy those aswell.
But as I said without the framework it's never going to work.
Simplest way is to create a simply setup (that's only 4 screens where the user has to click next, everyone is used to that), this setup is going to check if the framework is present and install it if needed.
|
|
|
|