Click here to Skip to main content
15,916,842 members
Home / Discussions / C#
   

C#

 
QuestionHow to access Local Security Policy using c# Pin
Pranav Soral2-May-07 18:47
Pranav Soral2-May-07 18:47 
AnswerRe: How to access Local Security Policy using c# Pin
Sathesh Sakthivel2-May-07 18:55
Sathesh Sakthivel2-May-07 18:55 
Questiondatagridview1 to datagridview2 Pin
balanjingot2-May-07 18:34
balanjingot2-May-07 18:34 
QuestionHow to export data from DataGrid to Excel? Pin
arbound082-May-07 17:51
arbound082-May-07 17:51 
AnswerRe: How to export data from DataGrid to Excel? Pin
tatchung2-May-07 19:38
tatchung2-May-07 19:38 
Questionhelp me about speed of loading data ... Pin
phantanagu2-May-07 15:51
phantanagu2-May-07 15:51 
AnswerRe: help me about speed of loading data ... Pin
Christian Graus2-May-07 16:07
protectorChristian Graus2-May-07 16:07 
GeneralRe: help me about speed of loading data ... Pin
phantanagu2-May-07 16:28
phantanagu2-May-07 16:28 
QuestionRe: help me about speed of loading data ... Pin
Stefan Prodan3-May-07 13:01
Stefan Prodan3-May-07 13:01 
QuestionFirefox Component Pin
bodikon2-May-07 15:01
bodikon2-May-07 15:01 
AnswerRe: Firefox Component Pin
Judah Gabriel Himango2-May-07 15:59
sponsorJudah Gabriel Himango2-May-07 15:59 
GeneralRe: Firefox Component Pin
bodikon2-May-07 21:32
bodikon2-May-07 21:32 
QuestionA simple form sizing problem Pin
zoroyster2-May-07 14:34
zoroyster2-May-07 14:34 
AnswerRe: A simple form sizing problem Pin
Christian Graus2-May-07 14:42
protectorChristian Graus2-May-07 14:42 
GeneralRe: A simple form sizing problem Pin
zoroyster2-May-07 16:05
zoroyster2-May-07 16:05 
QuestionGraphics ..with c # Pin
mr jets2-May-07 14:27
mr jets2-May-07 14:27 
AnswerRe: Graphics ..with c # Pin
Christian Graus2-May-07 14:45
protectorChristian Graus2-May-07 14:45 
No-one is going to read all of this.


mr jets wrote:
private void menuItem3_Click(object sender, System.EventArgs e)
{
//open the file
string str_reader;
if(openFileDialog1.ShowDialog()==DialogResult.OK)
{
StreamReader streamReader=new
StreamReader(openFileDialog1.FileName);
str_reader=streamReader.ReadToEnd();
MessageBox.Show(str_reader);
streamReader.Close();
}


This code assigns your file contents to a string, which you then discard ( it's a local variable, so it disappears after the function ends ). By what process did you expect your program to do anything with this data ?


mr jets wrote:
for(int j=0;j {
streamWriter.WriteLine("Line");
start=(Point)arraylist_points[j];
end=(Point)arraylist_points[j+1];
str_Line=start.ToString()+end.ToString();
streamWriter.WriteLine(str_Line);
j++;
}
streamWriter.Flush();
streamWriter.Close();
fs.Close();


You need to reverse this process and fill your array of points with the data you've read in.

Your program is not like Paint. Paint deals in raster info, you're doing a drawing package.

You shouldn't use a picture box, that's a waste of time, write your own handler for the paint message.


Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )

GeneralRe: Graphics ..with c # Pin
mr jets2-May-07 14:58
mr jets2-May-07 14:58 
GeneralRe: Graphics ..with c # Pin
Christian Graus2-May-07 15:28
protectorChristian Graus2-May-07 15:28 
QuestionHow to get a mini dump? Pin
Super Lloyd2-May-07 13:33
Super Lloyd2-May-07 13:33 
AnswerRe: How to get a mini dump? Pin
Super Lloyd2-May-07 17:20
Super Lloyd2-May-07 17:20 
QuestionSelect from another select statement to a repeater Pin
simsen2-May-07 11:28
simsen2-May-07 11:28 
QuestionHow can I have my Cursor visiable? Pin
Khoramdin2-May-07 11:26
Khoramdin2-May-07 11:26 
AnswerRe: How can I have my Cursor visiable? Pin
AFSEKI7-May-07 5:56
AFSEKI7-May-07 5:56 
QuestionUpdate() database from DataSet Pin
aecordoba2-May-07 10:58
aecordoba2-May-07 10:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.