|
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.
|
|
|
|
|
Rajdeep.NET wrote: It simply shows some kind of error message!
And we are supposed to magically figure out what your error is? Tell us the error and we may be able to help.
As a hint, you may have to copy everything in your Release folder to your target machine.
|
|
|
|
|
Just tell me how to create a standonly application?
|
|
|
|
|
Copy all the files from the release folder under obj to a disk (you can use a USB these days), take some bluetak and apply a lump to the side of the disk you want to "stand alone" on and place it next to the computer. Whalla standonly application.
Don't be so bloody rude next time - Tom gave you a valid answer and the reasoning why you need to create an installer.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi again Rajdeep,
You've already been told possible cause of your problem. The target machine [shout]*MUST*[/shout] have the required framework installed. If it has, then just copying the exe (and any referenced dlls if there are any) may work. I often do this for in house apps at work as I know they all have all frameworks installed.
You can either create a SetUp project if using VisualStudio, or a Click Once deployment if using VisualStudio or C# Express. These will check if the prerequisites are met and download/install them if required.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Hi,
I just want to read the table data in a HTML file and Write as it is into a text file as it viewed in HTML view, I mean I don't want retrieve the soucrce code, but I want the text as well as empty spaces between each table cell in the text file also.
How can I do this in c#?
If I read the table data which is present in the HTML page in the following way:
he following figure shows how the table defined in this example renders. Rendered table.
after reading this table from html page, how to write in a text file such that the table's content should be renderd in same manner in the text file also.
modified on Friday, April 3, 2009 7:49 AM
|
|
|
|