473,587 Members | 2,321 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

2 questions

I'm creating a file compare app,(I know about windif) but i'm creating my
own, to add my own features.
I have several questions I'm stuck with to finish up my app.

1. I have a message box that is displayed with a OK and Cancel buttons. If
the user clicks OK I want to open the 2 different files. How can I determine
if the user clicks OK?

2. If OK is clicked I want to open both files the user is comparing and
display the contents of the file. How can I open the files to read? the
files will open in notepad of course.

I know theres windif, and other file compare tools, but i'm creating my own
to get a better understanding of what C# can do, and since we have a in
house source code managment tool, it has no file compare feature to it.
Nov 15 '05 #1
8 1265
Hi Mike,
"Mike" <cs*********@sb cglobal.net> wrote in message
news:el******** ******@TK2MSFTN GP12.phx.gbl...
I'm creating a file compare app,(I know about windif) but i'm creating my
own, to add my own features.
I have several questions I'm stuck with to finish up my app.

1. I have a message box that is displayed with a OK and Cancel buttons. If the user clicks OK I want to open the 2 different files. How can I determine if the user clicks OK?
The return value of MessageBox.Show :

if ( MessageBox.Show ( "Text", "Caption", MessageBoxButto ns.OKCancel) ==
DialogResult.OK )
2. If OK is clicked I want to open both files the user is comparing and
display the contents of the file. How can I open the files to read? the
files will open in notepad of course.


How you will show the comparision if you show each file in notepad?
Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Nov 15 '05 #2
100
Hi Mike,
1. I have a message box that is displayed with a OK and Cancel buttons. If the user clicks OK I want to open the 2 different files. How can I determine if the user clicks OK?

If you use the MessageBox class its Show method returns DialogResult value
that carries the information about which button has been clicked

if(DialogResult .OK == MessageBox.Show (....))
{
//'Ok' button has been clicked on
}

B\rgds
100
Nov 15 '05 #3
at this time i'm not sure how to show the comparisions. Once I get the files
opened and displaying the contents in notepad I'll be happy, then I can
figure out how to show the compares
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us > wrote
in message news:un******** ******@TK2MSFTN GP10.phx.gbl...
Hi Mike,
"Mike" <cs*********@sb cglobal.net> wrote in message
news:el******** ******@TK2MSFTN GP12.phx.gbl...
I'm creating a file compare app,(I know about windif) but i'm creating my own, to add my own features.
I have several questions I'm stuck with to finish up my app.

1. I have a message box that is displayed with a OK and Cancel buttons.

If
the user clicks OK I want to open the 2 different files. How can I

determine
if the user clicks OK?


The return value of MessageBox.Show :

if ( MessageBox.Show ( "Text", "Caption", MessageBoxButto ns.OKCancel) ==
DialogResult.OK )
2. If OK is clicked I want to open both files the user is comparing and
display the contents of the file. How can I open the files to read? the
files will open in notepad of course.


How you will show the comparision if you show each file in notepad?
Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Nov 15 '05 #4
Hi Mike,

Well the whole point of a windif 's like program is that, how to show the
differences, you will have to show it yourself, not using notepad.

you don't need to open the files to display them in notepad, a sinple call
to Process.Start(" c:\winnt\notepa d " + filename ); can do it.

Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Mike" <cs*********@sb cglobal.net> wrote in message
news:ug******** ******@TK2MSFTN GP12.phx.gbl...
at this time i'm not sure how to show the comparisions. Once I get the files opened and displaying the contents in notepad I'll be happy, then I can
figure out how to show the compares
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us > wrote in message news:un******** ******@TK2MSFTN GP10.phx.gbl...
Hi Mike,
"Mike" <cs*********@sb cglobal.net> wrote in message
news:el******** ******@TK2MSFTN GP12.phx.gbl...
I'm creating a file compare app,(I know about windif) but i'm creating my own, to add my own features.
I have several questions I'm stuck with to finish up my app.

1. I have a message box that is displayed with a OK and Cancel buttons.
If
the user clicks OK I want to open the 2 different files. How can I

determine
if the user clicks OK?


The return value of MessageBox.Show :

if ( MessageBox.Show ( "Text", "Caption", MessageBoxButto ns.OKCancel) ==
DialogResult.OK )
2. If OK is clicked I want to open both files the user is comparing

and display the contents of the file. How can I open the files to read? the files will open in notepad of course.


How you will show the comparision if you show each file in notepad?
Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation


Nov 15 '05 #5
OK, thanks
I'm going one step at a time with this
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us > wrote
in message news:OG******** ******@TK2MSFTN GP11.phx.gbl...
Hi Mike,

Well the whole point of a windif 's like program is that, how to show the
differences, you will have to show it yourself, not using notepad.

you don't need to open the files to display them in notepad, a sinple call
to Process.Start(" c:\winnt\notepa d " + filename ); can do it.

Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Mike" <cs*********@sb cglobal.net> wrote in message
news:ug******** ******@TK2MSFTN GP12.phx.gbl...
at this time i'm not sure how to show the comparisions. Once I get the

files
opened and displaying the contents in notepad I'll be happy, then I can
figure out how to show the compares
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us >

wrote
in message news:un******** ******@TK2MSFTN GP10.phx.gbl...
Hi Mike,
"Mike" <cs*********@sb cglobal.net> wrote in message
news:el******** ******@TK2MSFTN GP12.phx.gbl...
> I'm creating a file compare app,(I know about windif) but i'm creating
my
> own, to add my own features.
> I have several questions I'm stuck with to finish up my app.
>
> 1. I have a message box that is displayed with a OK and Cancel buttons. If
> the user clicks OK I want to open the 2 different files. How can I
determine
> if the user clicks OK?

The return value of MessageBox.Show :

if ( MessageBox.Show ( "Text", "Caption", MessageBoxButto ns.OKCancel)
== DialogResult.OK )

> 2. If OK is clicked I want to open both files the user is comparing

and > display the contents of the file. How can I open the files to read? the > files will open in notepad of course.
>

How you will show the comparision if you show each file in notepad?
Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation



Nov 15 '05 #6
I tried that line to see how it works, and it errors out.

unrecognized escape sequence.

what does that mean?

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us > wrote
in message news:OG******** ******@TK2MSFTN GP11.phx.gbl...
Hi Mike,

Well the whole point of a windif 's like program is that, how to show the
differences, you will have to show it yourself, not using notepad.

you don't need to open the files to display them in notepad, a sinple call
to Process.Start(" c:\winnt\notepa d " + filename ); can do it.

Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Mike" <cs*********@sb cglobal.net> wrote in message
news:ug******** ******@TK2MSFTN GP12.phx.gbl...
at this time i'm not sure how to show the comparisions. Once I get the

files
opened and displaying the contents in notepad I'll be happy, then I can
figure out how to show the compares
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us >

wrote
in message news:un******** ******@TK2MSFTN GP10.phx.gbl...
Hi Mike,
"Mike" <cs*********@sb cglobal.net> wrote in message
news:el******** ******@TK2MSFTN GP12.phx.gbl...
> I'm creating a file compare app,(I know about windif) but i'm creating
my
> own, to add my own features.
> I have several questions I'm stuck with to finish up my app.
>
> 1. I have a message box that is displayed with a OK and Cancel buttons. If
> the user clicks OK I want to open the 2 different files. How can I
determine
> if the user clicks OK?

The return value of MessageBox.Show :

if ( MessageBox.Show ( "Text", "Caption", MessageBoxButto ns.OKCancel)
== DialogResult.OK )

> 2. If OK is clicked I want to open both files the user is comparing

and > display the contents of the file. How can I open the files to read? the > files will open in notepad of course.
>

How you will show the comparision if you show each file in notepad?
Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation



Nov 15 '05 #7
Hi Mike,

It means that I typed it in OE :)
remember that you need to escape the \ character in a string:

Process.Start( @"c:\winnt\note pad.exe" + filename );

Will solve that, but please remember that it was just for show you how you
could do it, I haven't even tested if notepad is really in c:\winnt

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Mike" <cs*********@sb cglobal.net> wrote in message
news:uL******** ******@TK2MSFTN GP10.phx.gbl...
I tried that line to see how it works, and it errors out.

unrecognized escape sequence.

what does that mean?

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us > wrote in message news:OG******** ******@TK2MSFTN GP11.phx.gbl...
Hi Mike,

Well the whole point of a windif 's like program is that, how to show the
differences, you will have to show it yourself, not using notepad.

you don't need to open the files to display them in notepad, a sinple call to Process.Start(" c:\winnt\notepa d " + filename ); can do it.

Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Mike" <cs*********@sb cglobal.net> wrote in message
news:ug******** ******@TK2MSFTN GP12.phx.gbl...
at this time i'm not sure how to show the comparisions. Once I get the files
opened and displaying the contents in notepad I'll be happy, then I can figure out how to show the compares
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us >

wrote
in message news:un******** ******@TK2MSFTN GP10.phx.gbl...
> Hi Mike,
>
>
> "Mike" <cs*********@sb cglobal.net> wrote in message
> news:el******** ******@TK2MSFTN GP12.phx.gbl...
> > I'm creating a file compare app,(I know about windif) but i'm creating my
> > own, to add my own features.
> > I have several questions I'm stuck with to finish up my app.
> >
> > 1. I have a message box that is displayed with a OK and Cancel

buttons.
> If
> > the user clicks OK I want to open the 2 different files. How can I
> determine
> > if the user clicks OK?
>
> The return value of MessageBox.Show :
>
> if ( MessageBox.Show ( "Text", "Caption",
MessageBoxButto ns.OKCancel) == > DialogResult.OK )
>
> > 2. If OK is clicked I want to open both files the user is

comparing and
> > display the contents of the file. How can I open the files to
read? the
> > files will open in notepad of course.
> >
>
> How you will show the comparision if you show each file in notepad?
>
>
> Cheers,
>
> --
> Ignacio Machin,
> ignacio.machin AT dot.state.fl.us
> Florida Department Of Transportation
>
>



Nov 15 '05 #8
ok, thanks.
I understand it was for show, but it put on the right path
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us > wrote
in message news:OF******** ******@TK2MSFTN GP12.phx.gbl...
Hi Mike,

It means that I typed it in OE :)
remember that you need to escape the \ character in a string:

Process.Start( @"c:\winnt\note pad.exe" + filename );

Will solve that, but please remember that it was just for show you how you
could do it, I haven't even tested if notepad is really in c:\winnt

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Mike" <cs*********@sb cglobal.net> wrote in message
news:uL******** ******@TK2MSFTN GP10.phx.gbl...
I tried that line to see how it works, and it errors out.

unrecognized escape sequence.

what does that mean?

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us >

wrote
in message news:OG******** ******@TK2MSFTN GP11.phx.gbl...
Hi Mike,

Well the whole point of a windif 's like program is that, how to show the differences, you will have to show it yourself, not using notepad.

you don't need to open the files to display them in notepad, a sinple call to Process.Start(" c:\winnt\notepa d " + filename ); can do it.

Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Mike" <cs*********@sb cglobal.net> wrote in message
news:ug******** ******@TK2MSFTN GP12.phx.gbl...
> at this time i'm not sure how to show the comparisions. Once I get the files
> opened and displaying the contents in notepad I'll be happy, then I can > figure out how to show the compares
>
>
> "Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us > wrote
> in message news:un******** ******@TK2MSFTN GP10.phx.gbl...
> > Hi Mike,
> >
> >
> > "Mike" <cs*********@sb cglobal.net> wrote in message
> > news:el******** ******@TK2MSFTN GP12.phx.gbl...
> > > I'm creating a file compare app,(I know about windif) but i'm

creating
> my
> > > own, to add my own features.
> > > I have several questions I'm stuck with to finish up my app.
> > >
> > > 1. I have a message box that is displayed with a OK and Cancel
buttons.
> > If
> > > the user clicks OK I want to open the 2 different files. How can I > > determine
> > > if the user clicks OK?
> >
> > The return value of MessageBox.Show :
> >
> > if ( MessageBox.Show ( "Text", "Caption", MessageBoxButto ns.OKCancel)
==
> > DialogResult.OK )
> >
> > > 2. If OK is clicked I want to open both files the user is

comparing and
> > > display the contents of the file. How can I open the files to read? the
> > > files will open in notepad of course.
> > >
> >
> > How you will show the comparision if you show each file in notepad? > >
> >
> > Cheers,
> >
> > --
> > Ignacio Machin,
> > ignacio.machin AT dot.state.fl.us
> > Florida Department Of Transportation
> >
> >
>
>



Nov 15 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
4083
by: softwareengineer2006 | last post by:
All Interview Questions And Answers 10000 Interview Questions And Answers(C,C++,JAVA,DOTNET,Oracle,SAP) I have listed over 10000 interview questions asked in interview/placement test papers for all companies between year 2000-2005 in my website http://www.geocities.com/allinterviewquestion/ So please have a look and make use of it.
0
4571
by: connectrajesh | last post by:
INTERVIEWINFO.NET http://www.interviewinfo.net FREE WEB SITE AND SERVICE FOR JOB SEEKERS /FRESH GRADUATES NO ADVERTISEMENT
2
7179
by: freepdfforjobs | last post by:
Full eBook with 4000 C#, JAVA,.NET and SQL Server Interview questions http://www.questpond.com/SampleInterviewQuestionBook.zip Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of attending interviews. If you own a company best way to judge if the candidate is...
4
2500
by: Drew | last post by:
I posted this to the asp.db group, but it doesn't look like there is much activity on there, also I noticed that there are a bunch of posts on here pertaining to database and asp. Sorry for cross-posting. I am trying to build a "checklist", where a user can navigate to an ASP page on the intranet which shows a list of "questions" that the...
8
7968
by: Krypto | last post by:
Hi, I have used Python for a couple of projects last year and I found it extremely useful. I could write two middle size projects in 2-3 months (part time). Right now I am a bit rusty and trying to catch up again with Python. I am now appearing for Job Interviews these days and I am wondering if anybody of you appeared for a Python...
0
1483
by: ramu | last post by:
C# Interview Questions and Answers8 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers8.html C# Interview Questions and Answers7 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers7.html C# Interview Questions and Answers 6...
1
1614
by: ramu | last post by:
C# Interview Questions and Answers8 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers8.html C# Interview Questions and Answers7 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers7.html C# Interview Questions and Answers 6...
0
4480
by: ramu | last post by:
C# Interview Questions and Answers8 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers8.html C# Interview Questions and Answers7 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers7.html C# Interview Questions and Answers 6...
0
3418
by: reema | last post by:
EJB Interview Questions http://interviewdoor.com/technical/EJB-Interview-Questions.htm CSS Interview Questions http://interviewdoor.com/technical/CSS-Interview-Questions.htm C Interview Questions http://interviewdoor.com/technical/C-Interview-Questions.htm C# Interview Questions...
0
2928
by: reema | last post by:
EJB Interview Questions http://interviewdoor.com/technical/EJB-Interview-Questions.htm CSS Interview Questions http://interviewdoor.com/technical/CSS-Interview-Questions.htm C Interview Questions http://interviewdoor.com/technical/C-Interview-Questions.htm C# Interview Questions...
0
7918
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7843
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8206
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6621
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3840
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3875
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2353
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.