Click here to Skip to main content
15,925,309 members
Home / Discussions / C#
   

C#

 
QuestionA form inside another Pin
sinosoidal19-Mar-07 8:04
sinosoidal19-Mar-07 8:04 
Hi,

I have a main form.

I then want to have a second form which only asks me for a URL.

I call the second form within the main form in the following way:

<br />
           URL u = new URL();<br />
            u.ShowDialog();<br />


Once i done everything i have to do in the second form i want to click ok and return:

<br />
private void btnOk_Click(object sender, EventArgs e)<br />
        {<br />
            bool valid = true;<br />
            try<br />
            {<br />
                Uri url = new Uri(tbAddress.Text);<br />
                valid = true;<br />
            }<br />
            catch (Exception error)<br />
            {<br />
                MessageBox.Show(error.Message);<br />
                valid = false;<br />
            }<br />
<br />
            if (valid)<br />
            {<br />
                MessageBox.Show("URL is valid!");<br />
                this.host.Valid<br />
            }<br />
<br />
        }<br />


How can i retrieve the value of the second form in the sequence of its call?

Thx,

Nuno
AnswerRe: A form inside another Pin
Hesham Amin19-Mar-07 8:27
Hesham Amin19-Mar-07 8:27 
AnswerRe: A form inside another Pin
Dave Kreskowiak19-Mar-07 13:19
mveDave Kreskowiak19-Mar-07 13:19 
AnswerRe: A form inside another Pin
joon vh.19-Mar-07 13:20
joon vh.19-Mar-07 13:20 
GeneralRe: A form inside another Pin
sinosoidal20-Mar-07 4:23
sinosoidal20-Mar-07 4:23 
GeneralRe: A form inside another Pin
joon vh.20-Mar-07 4:32
joon vh.20-Mar-07 4:32 
AnswerRe: A form inside another Pin
sinosoidal20-Mar-07 4:17
sinosoidal20-Mar-07 4:17 
Questionhow to communicate between forms and classes Pin
Waldihuber19-Mar-07 8:03
Waldihuber19-Mar-07 8:03 
AnswerRe: how to communicate between forms and classes Pin
Hesham Amin19-Mar-07 8:31
Hesham Amin19-Mar-07 8:31 
GeneralRe: how to communicate between forms and classes Pin
Waldihuber19-Mar-07 11:07
Waldihuber19-Mar-07 11:07 
GeneralRe: how to communicate between forms and classes Pin
Dave Kreskowiak19-Mar-07 13:13
mveDave Kreskowiak19-Mar-07 13:13 
Questionstring parsing Pin
jesarg19-Mar-07 7:57
jesarg19-Mar-07 7:57 
AnswerRe: string parsing Pin
Judah Gabriel Himango19-Mar-07 8:27
sponsorJudah Gabriel Himango19-Mar-07 8:27 
AnswerRe: string parsing Pin
snorkie19-Mar-07 9:45
professionalsnorkie19-Mar-07 9:45 
AnswerRe: string parsing Pin
Ed.Poore19-Mar-07 12:42
Ed.Poore19-Mar-07 12:42 
GeneralRe: string parsing Pin
sherifffruitfly19-Mar-07 14:08
sherifffruitfly19-Mar-07 14:08 
GeneralRe: string parsing Pin
Ed.Poore19-Mar-07 23:00
Ed.Poore19-Mar-07 23:00 
AnswerRe: string parsing Pin
Vasudevan Deepak Kumar19-Mar-07 16:14
Vasudevan Deepak Kumar19-Mar-07 16:14 
QuestionDisplaying Report using a web browser offline Pin
Banjo Ayorinde19-Mar-07 7:55
Banjo Ayorinde19-Mar-07 7:55 
AnswerRe: Displaying Report using a web browser offline Pin
Ed.Poore19-Mar-07 12:54
Ed.Poore19-Mar-07 12:54 
QuestionFormatConditions Pin
alex.almeida19-Mar-07 7:53
alex.almeida19-Mar-07 7:53 
AnswerRe: FormatConditions Pin
Ed.Poore19-Mar-07 12:47
Ed.Poore19-Mar-07 12:47 
QuestionNull reference issue Pin
Abbas8219-Mar-07 7:28
Abbas8219-Mar-07 7:28 
AnswerRe: Null reference issue Pin
Christian Graus19-Mar-07 7:38
protectorChristian Graus19-Mar-07 7:38 
GeneralRe: Null reference issue Pin
Abbas8219-Mar-07 7:41
Abbas8219-Mar-07 7:41 

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.