Click here to Skip to main content
15,888,527 members
Home / Discussions / C#
   

C#

 
QuestionHow to find 24Hrs Back Time Pin
VenkataRamana.Gali5-Jul-06 3:34
VenkataRamana.Gali5-Jul-06 3:34 
AnswerRe: How to find 24Hrs Back Time Pin
stancrm5-Jul-06 3:39
stancrm5-Jul-06 3:39 
AnswerRe: How to find 24Hrs Back Time Pin
MatthewAnderson5-Jul-06 3:40
MatthewAnderson5-Jul-06 3:40 
GeneralRe: How to find 24Hrs Back Time Pin
Guffa5-Jul-06 4:03
Guffa5-Jul-06 4:03 
GeneralRe: How to find 24Hrs Back Time Pin
Guffa5-Jul-06 4:07
Guffa5-Jul-06 4:07 
QuestionProblem with Diagnostics.Process Pin
suguimoto5-Jul-06 3:28
suguimoto5-Jul-06 3:28 
AnswerRe: Problem with Diagnostics.Process Pin
S. Senthil Kumar5-Jul-06 5:06
S. Senthil Kumar5-Jul-06 5:06 
QuestionSeeking Input value from Dialog box but not closing it Pin
For_IT5-Jul-06 3:20
For_IT5-Jul-06 3:20 
Hi I am creasting an application where I am implementing "search and replace word" functionality. I have a dialog "SearchAndReplace" which takes two text inputs and has three buttons as "FindNext", "Replace" and "Close"

I have implemented following code in my main form:

My main class code is:

<br />
if (SearchReplaceDialog.ShowDialog() == DialogResult.OK)<br />
{<br />
     if (SearchReplaceDialog.WithReplace)<br />
     {<br />
	int c = this.Editor.Replace(SearchReplaceDialog.Search, SearchReplaceDialog.Replace, SearchReplaceDialog.Match, SearchReplaceDialog.Word, SearchReplaceDialog.Up);<br />
	MessageBox.Show(c.ToString() + " strings found and replaced");<br />
     } <br />
     else <br />
     {<br />
	bool r = this.htmlEditor1.Find(SearchReplaceDialog.Search, SearchReplaceDialog.Match, SearchReplaceDialog.Word, SearchReplaceDialog.Up);<br />
	if (!r)<br />
	{<br />
	 MessageBox.Show("String '"+SearchReplaceDialog.Search+"' not found");<br />
	}<br />
     }<br />
}<br />


SearchDialog code:
<br />
private void btnFindNext_Click(object sender, System.EventArgs e)<br />
{<br />
     Match = this.chbMatchCase.Checked;<br />
     Word = this.chbMatchWholeWord.Checked;<br />
	Up = this.chbSearchUpward.Checked;<br />
	Search = this.txtFindWhat.Text;<br />
	Replace = this.txtReplaceWith.Text = String.Empty;<br />
	WithReplace = false;<br />
<br />
	DialogResult = DialogResult.OK;<br />
}<br />


When I click Find Next, the Search and replace dialog box closes. I want to retain it on top of application and close the dialog when user closes it on Clicking "Close" button.

Can anyone please suggest my how can I achieve this?

Thanks
AnswerRe: Seeking Input value from Dialog box but not closing it Pin
stancrm5-Jul-06 3:54
stancrm5-Jul-06 3:54 
AnswerRe: Seeking Input value from Dialog box but not closing it Pin
BoneSoft5-Jul-06 4:09
BoneSoft5-Jul-06 4:09 
QuestionHow to show login prompt when accessing database? [modified] Pin
jazzka5-Jul-06 2:32
jazzka5-Jul-06 2:32 
AnswerRe: How to show login prompt when accessing database? Pin
Colin Angus Mackay5-Jul-06 2:47
Colin Angus Mackay5-Jul-06 2:47 
GeneralRe: How to show login prompt when accessing database? Pin
jazzka5-Jul-06 3:08
jazzka5-Jul-06 3:08 
GeneralRe: How to show login prompt when accessing database? Pin
Colin Angus Mackay5-Jul-06 9:21
Colin Angus Mackay5-Jul-06 9:21 
GeneralRe: How to show login prompt when accessing database? [modified] Pin
jazzka5-Jul-06 19:58
jazzka5-Jul-06 19:58 
GeneralRe: How to show login prompt when accessing database? Pin
Colin Angus Mackay5-Jul-06 20:32
Colin Angus Mackay5-Jul-06 20:32 
GeneralRe: How to show login prompt when accessing database? Pin
jazzka5-Jul-06 21:08
jazzka5-Jul-06 21:08 
GeneralRe: How to show login prompt when accessing database? Pin
Colin Angus Mackay6-Jul-06 8:02
Colin Angus Mackay6-Jul-06 8:02 
QuestionC# Datagrid Search Pin
Gammaza5-Jul-06 2:14
Gammaza5-Jul-06 2:14 
AnswerRe: C# Datagrid Search Pin
Tim Kohler5-Jul-06 2:56
Tim Kohler5-Jul-06 2:56 
GeneralRe: C# Datagrid Search Pin
Gammaza5-Jul-06 3:05
Gammaza5-Jul-06 3:05 
AnswerRe: C# Datagrid Search Pin
Robert Rohde5-Jul-06 3:56
Robert Rohde5-Jul-06 3:56 
GeneralRe: C# Datagrid Search Pin
Gammaza5-Jul-06 4:04
Gammaza5-Jul-06 4:04 
QuestionDrag and drop function Pin
Joyeo5-Jul-06 1:56
Joyeo5-Jul-06 1:56 
QuestionDate Time in c# Pin
Rajesh_K_Sharma5-Jul-06 1:45
Rajesh_K_Sharma5-Jul-06 1:45 

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.