Click here to Skip to main content
15,920,576 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to change remote registries that have a username/pw? Pin
Spydre7-Jan-07 10:39
Spydre7-Jan-07 10:39 
GeneralRe: How to change remote registries that have a username/pw? Pin
Ed.Poore7-Jan-07 11:29
Ed.Poore7-Jan-07 11:29 
GeneralRe: How to change remote registries that have a username/pw? Pin
Spydre7-Jan-07 11:53
Spydre7-Jan-07 11:53 
GeneralRe: How to change remote registries that have a username/pw? Pin
Ed.Poore7-Jan-07 12:06
Ed.Poore7-Jan-07 12:06 
QuestionHow to access methos of one form from another? Pin
TrooperIronMan6-Jan-07 7:38
TrooperIronMan6-Jan-07 7:38 
AnswerRe: How to access methos of one form from another? [modified] Pin
Luc Pattyn6-Jan-07 8:00
sitebuilderLuc Pattyn6-Jan-07 8:00 
GeneralRe: How to access methos of one form from another? Pin
TrooperIronMan6-Jan-07 8:53
TrooperIronMan6-Jan-07 8:53 
GeneralRe: How to access methos of one form from another? Pin
Luc Pattyn6-Jan-07 9:28
sitebuilderLuc Pattyn6-Jan-07 9:28 
No no, the simplest way is the other way around, it is the main form that does
everything about the text, including the searching, the findDialog's purpose is
to specify and trigger the search, not to perform it.

And the architecture would be something like this (incomplete!):

public class mainForm : Form {

	FindDialog findDialog;	// reference to the find dialog

	public mainForm() {	// constructor
		// ...
	}
	
	// this could be called by clicking a "Open Find" button on mainForm
	public void btnOpenFind_Click(object sender, EventArgs e) {
		findDialog=new FindDialog();
		findDialog.btnFind.Click+=new EventHandler(btnFind_Click);
		findDialog.btnClose.Click+=new EventHandler(btnClose_Click);
		findDialog.ShowDialog();
	}
	private void btnFind_Click(object sender, EventArgs e) {
		// read findDialog.tbSearch.Text
		// and perform search in the text inside mainForm
	}
	private void btnClose_Click(object sender, EventArgs e) {
		// do postprocessing if needed (e.g. preserve current settings),
		// then
		findDialog.Close();
	}
}

public class FindDialog : Form {
	public Button btnFind;		// will start the search
	public Button btnClose;		// closes the dialog
	public TextBox tbSearch;		// holds what to search
}


Hope this helps you way forward.





Luc Pattyn

GeneralRe: How to access methos of one form from another? Pin
TrooperIronMan7-Jan-07 1:59
TrooperIronMan7-Jan-07 1:59 
AnswerRe: How to access methos of one form from another? Pin
Ennis Ray Lynch, Jr.6-Jan-07 8:06
Ennis Ray Lynch, Jr.6-Jan-07 8:06 
QuestionHow to share the same DataBinding in diferent forms??? Pin
Pet Lizard6-Jan-07 5:32
Pet Lizard6-Jan-07 5:32 
AnswerRe: How to share the same DataBinding in diferent forms??? Pin
Not Active6-Jan-07 6:48
mentorNot Active6-Jan-07 6:48 
QuestionDShowNet Pin
RockyC#6-Jan-07 4:12
RockyC#6-Jan-07 4:12 
AnswerRe: DShowNet Pin
Stefan Troschuetz6-Jan-07 4:43
Stefan Troschuetz6-Jan-07 4:43 
GeneralRe: DShowNet Pin
RockyC#6-Jan-07 5:44
RockyC#6-Jan-07 5:44 
GeneralRe: DShowNet Pin
Stefan Troschuetz6-Jan-07 5:52
Stefan Troschuetz6-Jan-07 5:52 
GeneralRe: DShowNet Pin
RockyC#6-Jan-07 10:35
RockyC#6-Jan-07 10:35 
GeneralRe: DShowNet Pin
Ed.Poore6-Jan-07 11:20
Ed.Poore6-Jan-07 11:20 
GeneralRe: DShowNet Pin
Stefan Troschuetz6-Jan-07 23:47
Stefan Troschuetz6-Jan-07 23:47 
GeneralRe: DShowNet [modified] Pin
RockyC#7-Jan-07 5:28
RockyC#7-Jan-07 5:28 
QuestionC# asp.net 2.0 Pin
chirag_nine6-Jan-07 1:57
chirag_nine6-Jan-07 1:57 
AnswerRe: C# asp.net 2.0 Pin
Not Active6-Jan-07 7:20
mentorNot Active6-Jan-07 7:20 
QuestionRe: C# asp.net 2.0 Pin
chirag_nine6-Jan-07 7:37
chirag_nine6-Jan-07 7:37 
AnswerRe: C# asp.net 2.0 Pin
Christian Graus6-Jan-07 12:19
protectorChristian Graus6-Jan-07 12:19 
QuestionCreate a .NET dll Pin
Tyler456-Jan-07 1:34
Tyler456-Jan-07 1:34 

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.