Click here to Skip to main content
15,915,702 members
Home / Discussions / C#
   

C#

 
Questionhow to handle history (Edit>Undo Redo) Pin
Susuko17-Jun-06 4:54
Susuko17-Jun-06 4:54 
AnswerRe: how to handle history (Edit>Undo Redo) Pin
Colin Angus Mackay17-Jun-06 5:03
Colin Angus Mackay17-Jun-06 5:03 
AnswerRe: how to handle history (Edit>Undo Redo) Pin
Jun Du17-Jun-06 5:32
Jun Du17-Jun-06 5:32 
AnswerRe: how to handle history (Edit>Undo Redo) Pin
LongRange.Shooter17-Jun-06 18:23
LongRange.Shooter17-Jun-06 18:23 
Questioncrystal report help!! Pin
ersinsivaz17-Jun-06 4:23
ersinsivaz17-Jun-06 4:23 
AnswerRe: crystal report help!! Pin
vernchen17-Jun-06 6:16
vernchen17-Jun-06 6:16 
QuestionAdding option box to user control Pin
BRShroyer17-Jun-06 3:46
BRShroyer17-Jun-06 3:46 
AnswerRe: Adding option box to user control Pin
Robert Rohde17-Jun-06 11:09
Robert Rohde17-Jun-06 11:09 
Hi,

here a rough plan of what I would do:
1. Design the options form with everything you need.
2. Place Save/Ok and Cancel button on the form and set their DialogResult properties.
3. Set CancelButton and OkButton properties of the options form to your both buttons.
4. Add a property of type UserControlOptions with both getter and setter which either fills the contained controls from the given values (getter) or creates a new instance with the respective values and returns it (setter).
5. in the double click event handler of your user control add the following:
MyOptionsForm optionsForm = new MyOptionsForm();
optionsForm.Options = _myOptionsField;
if (optionsForm.ShowDialog() == DialogResult.Ok) {
   _myOptionsField = optionsForm.Options;
}

Beside the fact that this way the dialog behaviour of .Net is used also no reference (except a temporary local variable) is needed.
QuestionA question for the Experts! :p i think Pin
TheBeginner7717-Jun-06 2:50
TheBeginner7717-Jun-06 2:50 
AnswerRe: A question for the Experts! :p i think Pin
WillemM17-Jun-06 3:08
WillemM17-Jun-06 3:08 
QuestionDevice interface Pin
bannapradeep17-Jun-06 2:50
bannapradeep17-Jun-06 2:50 
AnswerRe: Device interface Pin
Dave Kreskowiak17-Jun-06 16:55
mveDave Kreskowiak17-Jun-06 16:55 
QuestionTeamWork Developement Pin
HRiazi17-Jun-06 2:41
HRiazi17-Jun-06 2:41 
AnswerRe: TeamWork Developement Pin
Tamimi - Code17-Jun-06 2:49
Tamimi - Code17-Jun-06 2:49 
AnswerRe: TeamWork Developement Pin
WillemM17-Jun-06 3:10
WillemM17-Jun-06 3:10 
AnswerRe: TeamWork Developement Pin
Jun Du17-Jun-06 5:36
Jun Du17-Jun-06 5:36 
AnswerRe: TeamWork Developement Pin
leppie17-Jun-06 6:42
leppie17-Jun-06 6:42 
QuestionDecrypting Username and Password Pin
wo1noreen17-Jun-06 1:30
wo1noreen17-Jun-06 1:30 
Questionexcel to dataView Pin
caliph17-Jun-06 0:08
caliph17-Jun-06 0:08 
AnswerRe: excel to dataView Pin
Robert Rohde17-Jun-06 11:11
Robert Rohde17-Jun-06 11:11 
QuestionHierachy Model Tab Control Pin
Haridas.R16-Jun-06 23:06
Haridas.R16-Jun-06 23:06 
QuestionData Bindings again Pin
rzvme16-Jun-06 22:36
rzvme16-Jun-06 22:36 
AnswerRe: Data Bindings again Pin
Bogdan Damian19-Jun-06 10:24
Bogdan Damian19-Jun-06 10:24 
QuestionDataGrid Class and its Methods Pin
Alamzeb khan16-Jun-06 22:30
Alamzeb khan16-Jun-06 22:30 
AnswerRe: DataGrid Class and its Methods Pin
Kevin McFarlane17-Jun-06 3:26
Kevin McFarlane17-Jun-06 3:26 

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.