|
when we want open a file,we have to double click on the file,but Right now,i want open it by command,What must I do?,(note: open file which can see inside of it)
|
|
|
|
|
File.GetAllText ? Hard to know, your question isn't really laid out in a way that makes much sense.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Use StreamReader object to read the content of the file and display it in a window. Also, please make sure that your file may not only contain text data but it can contain picture etc. Hence, if you want to see the real world inside the file you should reading it in binary format and display the records.
Manoj
Never Gives up
|
|
|
|
|
thanks you,I am sorry because I don't display obvious my ideal
After that,I will display my question
when we double click a file,the window of file will display,and we can see the tittle of it(EX: file.txt)
If we use command of C#,what will we do to see the window of file.txt opended ?
|
|
|
|
|
just use Process class.Inside it there one method which takes input as file name and opens it.
Regards
Chintan
www.visharadsoft.com
(Nothing is so purify as KNOWLEDGE)
|
|
|
|
|
I want to represent telephone directory in this way.
Certainly, anybody may have more phones and each of them must be visible.
It is all dispose in more columns, that economically use working surface.
Table:
TelDirectory (ID,Name,Tel)
PK(ID) - primary key
How to show data like this:
Name1.....Name4
------.....------
Tel11......Tel41
Tel12
Name2
------
Tel21
Tel22
Tel23
Name3
------
Tel31
...
Thanks for any help.
|
|
|
|
|
where are you showing it ? If in a web app, a repeater is your best option.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
Then it's up to you to render the results any way you like. No built in control will give the layout you're wanting, however.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
First of all, the ID cannot be a Primary Key as it will not be unique, since anybody can have more than 1 phones.
You can get the list sorted on ID/name of the customer. Once it is sorted it will be esily printed.
Manoj
Never Gives up
|
|
|
|
|
Manoj Kumar Rai wrote: First of all, the ID cannot be a Primary Key as it will not be unique, since anybody can have more than 1 phones.
How does that make ID not unique
1 Colin Mackay 0123 456 7890
2 Colin Mackay 0321 654 0987
Looks fine to me - What did you think was wrong with it?
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
Ahhh, Ok. Its record ID and not the ID of the person where I thought wrongly. But in either case for the problem we had to print this Unique key do not have any role to play. We have to sort the list on the basis of the Name and get the values printed.
Manoj
Never Gives up
|
|
|
|
|
You posted this exact same question a few days ago. What have you tried since then? Even writing some long, slow, even poor code, to get the job done will give you a starting point. Then post snippets of that code, and the people here will help optimise it.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
|
|
|
|
|
It isn't difficult as a table, but I dont know how to displey data on win form in this way. If I get names and phones into dataset, how show them?
How can I provide repetition structure unequal form, that contain name and suitable phones, where all phones are visible?
It seems datagridview isn't proper control to realize that. How else can I do it?
|
|
|
|
|
how can i count the number of words or letters that i used
as an input?
SAMPLE:
\\ input string: mississippi
\\ input search word: i
\\ result: search found 4 occurences of the word 'i'
|
|
|
|
|
If you call string.split and pass in 'i', you can work it out by how many strings it returns.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Or:
string textold= "mississippi";
int countold = textold.Length;
string textnew = textold.Replace("i", "");
int countnew = textnew.Length;
int Found = countold-countnew;
All the best,
Martin
|
|
|
|
|
it didn't work..
what if my "input string" is not constant...
what if i can type any letters or words...
how will it work?
|
|
|
|
|
Sorry, I don't get your point!
Maybe if you show us your code, we could help!
All the best,
Martin
|
|
|
|
|
thanks anyway martin..
i still can't do the code for the program..
it confusing..
|
|
|
|
|
Aha, I see you remembered that one!
greetings
|
|
|
|
|
Hello Luc,
Luc Pattyn wrote: Aha, I see you remembered that one!
Hmmm, not really!
Have I stolen it from you?
If yes, I will change my message, to bring credit to you.
All the best,
Martin
|
|
|
|
|
Hi Martin,
that was my reply months ago to a similar question, look here[^] for
a more compact form of it.
So either you read it and remembered the base idea unknowingly,
or you just reinvented it, it does not really matter.
Nothing got stolen, no problem; chances are I saw
it elsewhere a long time ago, I don't recall.
|
|
|
|
|
All the best,
Martin
|
|
|
|
|
Or
int i = new List<char>("mississippi".ToCharArray()).FindAll(delegate(char c) { return c == 'i'; }).Count;
Not very maintainable, expensive, possibly slow, but fun!;)
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
|
|
|
|