|
i kept my requirement in my question Babu..!
but no suitable answer i found.
|
|
|
|
|
YOur question is not clear....
Do you want to read a word document in runtime???
Do you want to get configuration data from a file while you setup your application??
Do you want add a document to your project, so that you can open and read the document???
What else you want....?????
Have a Happy Coding.....
|
|
|
|
|
I Added setup project to my solutoion.
For some security purpose i want to add a file to my setup project, for that i want to add a word document to my setup project (In this word document i will give some text by hardcoding).
while runtime i want to read that word document text.
For this how can i get my solution path and that word document path?
--Naren
|
|
|
|
|
Its so simple.....
Add the exe of your application and your required document file.
While setup put the exe and the document in the same folder ( By default it will be in the same folder only) then use Application.StartupPath in your program to open, read or write or for anything....
Have a Happy Coding.....
|
|
|
|
|
ohhhhhh
nooooooo
actually my application is at C:\Inetpub\wwwroot\TestingApplication
if i use StartupPath it will give
C:\Inetpub\wwwroot\TestingApplication\TestingApplication\bin\Debug
but i want just my application path only like
C:\Inetpub\wwwroot\TestingApplication
i hope you got my point
--Naren
|
|
|
|
|
|
i wont give any source code.
i just gave you example only for how i want to get.
tell me one thing
1. can we add a file(word document) to setup project which should be invisible (that should be visible in source code only).
2. If yes, how can i retrieve that word document in my Window Form.(just path is enough i can get text from that doc).
3. i played with
Application.ExecutablePath;,
Application.StartupPath;,
Environment.CurrentDirectory;
but exact path of that file i didnt get with these commands.
4. Suppose if you added a word file to your setup project(before giving it to client)
(i added by rightclicking on set up project--> add --> file...i gave path)
how can u get that worddocument through coding?
--Naren
|
|
|
|
|
Hi,
The query you gave to get application path
is giving the debug 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
Please help
itz urgent
|
|
|
|
|
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
|
|
|
|
|
WTF????
this is not how it works in this forum, please see guidelines[^]
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
LOL @ this was addressed to you only.
You're in high demand musefan.
|
|
|
|
|
lol, my first fan
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
nooooooooo
not fan, itz A.C
|
|
|
|
|
This[^] is the best link I can suggest you.
|
|
|
|
|
Strange, the application path seems to be giving you the path to your application.
You could always cut off the end of the string. Try looking up the string class on MSDN, it has everything you'd need, and more.
And in future, please don't make a new topic in reply to a post. If you reply to someone's post they will most likely get an e-mail so there's no need to try and keep yourself on the front page, distracting other users from helping people that need it.
My current favourite word is: Delicious!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
Hi to all........
User first send sms to server system(GSM Connect) from their mobile(it's done successfully).
Here the problem occured. while server reconize the user request query and automatic reply the corresponding user.example ( For asking cricket news type 'CRICKET NEWS' to 56547. After sending the message they will send the reply to our moblie)
Like that I want to send the information for the user from database(SQL)
|
|
|
|
|
Ramesh - Idiot ? I hope your are not a troll and I am guilty of feeding.
Your english needs some work, your post does not contain a question - it is generally accepted that the forum ANSWERS questions about coding\development problems.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Your 'question' is wrong on so many levels, I just don't know where to start:
- what is going wrong?
- what have you tried?
- when is your homework due?
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Ramesh!!! Let me Re-Frame the question for you!!!
you need to develop a GSMcommunication application, in which
a gsm modem(probably a cell phone)is connected to a computer, and when you receive an SMS from a sender say(XYZ) your system should recognize the sms content and send some data to the xyz number from the database according to the content...
right???
In that case you need to study about following things...
1.SMS details
2.SMS centre
3.SMS Gateway
4.Encryption or encoding Methods
5.AT commands for Gsm MObiles.
Do a little research in this and post only your problems if you face any...
Ella Pugazhum Iraivan Oruvanukkae...
Have a Happy Coding.....
|
|
|
|
|
<br />
using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Text;<br />
using System.IO.Ports;<br />
<br />
namespace ConsoleApplication1<br />
{<br />
class Program<br />
{<br />
static void Main(string[] args)<br />
{<br />
for (int i = 0; i < args.Length; i++)<br />
{<br />
System.Console.Write("Arg[{0}] = [{1}] ", i, args[i]);<br />
};<br />
Console.WriteLine();<br />
Console.WriteLine();<br />
Console.WriteLine("Written by Joseph Goldburg Phone 0412 750 765 joe.g@optusnet.com.au");<br />
Console.WriteLine();<br />
<br />
if (args.Length < 3) <br />
{<br />
Console.WriteLine("*** Error in command line arguments ***\n");<br />
Console.WriteLine("3 arguments required COMx inputfile logfile [Pause]\n\n");<br />
<br />
Console.WriteLine("Press any key to continue...");<br />
Console.ReadKey(true);<br />
<br />
System.Environment.Exit(1); <br />
}<br />
<br />
<br />
<br />
string comport = args[0].ToUpper();<br />
string inputfile = args[1].Replace("\\", "\\\\");<br />
string logfile = args[2].Replace("\\", "\\\\");<br />
<br />
<br />
<br />
System.IO.StreamReader sr = new System.IO.StreamReader(inputfile);<br />
System.IO.TextWriter tw = new System.IO.StreamWriter(logfile);<br />
string line;<br />
tw.WriteLine("Job Started {0} ", DateTime.Now);<br />
Console.WriteLine("Job Started {0} ", DateTime.Now);<br />
<br />
<br />
SerialPort port = new SerialPort(comport, 115200, Parity.None, 8, StopBits.One);<br />
try<br />
{
<br />
port.Open();<br />
tw.WriteLine("Compport {0} open ",comport);<br />
Console.WriteLine("Compport {0} open ", comport);<br />
<br />
string ATstring = "AT";<br />
string ATZstring = "ATZ";<br />
<br />
int starttime = DateTime.Now.Second;<br />
while (starttime == DateTime.Now.Second) { }<br />
port.WriteLine(ATZstring); tw.WriteLine(ATstring); Console.WriteLine(ATstring);
starttime = DateTime.Now.Second;<br />
while (starttime == DateTime.Now.Second) { }<br />
<br />
<br />
starttime = DateTime.Now.Second;<br />
while (starttime == DateTime.Now.Second) { }<br />
port.WriteLine(ATZstring); tw.WriteLine(ATZstring); Console.WriteLine(ATZstring);
starttime = DateTime.Now.Second;<br />
while (starttime == DateTime.Now.Second) { }<br />
starttime = DateTime.Now.Second;<br />
while (starttime == DateTime.Now.Second) { }<br />
<br />
while ((line = sr.ReadLine()) != null)
{<br />
if (line.IndexOf("^Z") > -1 || line.IndexOf("^z") > -1)
{<br />
line = line.Replace("^Z", "\x001A");
line = line.Replace("^z", "\x001A");
port.Write(line);
tw.WriteLine(line);<br />
Console.WriteLine("Control z reached : SMS is : --> {0}",line);<br />
<br />
<br />
starttime = DateTime.Now.Second;<br />
while (starttime == DateTime.Now.Second) { }<br />
starttime = DateTime.Now.Second;<br />
while (starttime == DateTime.Now.Second) { }<br />
}<br />
else<br />
{<br />
port.WriteLine(line);
tw.WriteLine(line);
Console.WriteLine(line);
<br />
starttime = DateTime.Now.Second;<br />
while (starttime == DateTime.Now.Second) { }<br />
}<br />
<br />
}<br />
port.Close();<br />
}<br />
catch<br />
{<br />
Console.WriteLine("Could not open serial comport {0}", args[0]);<br />
}<br />
<br />
if (args.Length > 3)<br />
{<br />
Console.WriteLine("Press any key to continue...");<br />
Console.ReadKey(true);<br />
}<br />
<br />
<br />
tw.Close();
sr.Close();
}<br />
}<br />
}<br />
|
|
|
|
|
Hi...
This seems to be a little old post..
anyway thanks for your code.. i will try it out sometimes....
Have a Happy Coding.....
|
|
|
|
|
I have implemented class using IComaprer where in compareto method has been used.
I have 2 objects and say i have date field in both set as march 20 2009 in both objects.
Let there be name field in both in first case it is Amit and second it is Ajay
Now i sort these 2 on date. first time i get Amit as first record and Ajay as second record. I say refresh and call sort again than i get Ajay first and Amit second. Cant i get same sequence everytime as date value on which sort is being done is same in both objects
|
|
|
|
|
Before returning from the CompareTo, check if the result is 0. If it is, do a secondary compare on the name field and return that result.
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)
|
|
|
|
|
Hey guys, I'd posted this question as a message in a thread that's been nudged down to page two, so not sure if anybody would read it. So I'll just re-ask here.
I have a sub-dialog in which I have a datagridview that i can search through, select a row, and click load. When clicking load, the data from that selected row is saved as a public static string in a class, so i can use it in my main dialog. The problem I am having is that I can't figure out how to automatically populate the fields of the main dialog on the click of the load button in the sub-dialog.
Any help greatly appreciated.
Martin
|
|
|
|
|
try searching for the information google is your friend[^]
Never underestimate the power of human stupidity
RAH
|
|
|
|