PC Review


Reply
Thread Tools Rate Thread

Correctly using forms

 
 
John
Guest
Posts: n/a
 
      1st Sep 2004
Hi all,

I come from a VB6 background and noticed that one cannot simply load forms
the way we used to.

What is the best way to code using multiple forms within one's ppc
application?

Any pointers to reading material will help greatly.

Thanks and regards
John.


 
Reply With Quote
 
 
 
 
Dan
Guest
Posts: n/a
 
      6th Sep 2004
John,

'---------------------------------------------------------------------
'
' for a typical OK / Cancel form
'

Form1 frm1 = new Form() ' creates the new form object
If frm1.ShowDialog() = DialogResult.OK Then ' ShowDialog() opens the
dialog
' Code if the user clicked on OK
Else
' Code if the user clicked on Cancel
EndIf


'---------------------------------------------------------------------
'
' in the Form1 "OK" button click event
'

DialogResult = DialogResult.OK ' sets the ShowDialog to return with OK and
closes this dialog


'---------------------------------------------------------------------
'
' in the Form1 "Cancel" button click event
'

DialogResult = DialogResult.Cancel ' sets the ShowDialog to return with OK
and closes this dialog



'---------------------------------------------------------------------


If you're not bothered about the result the dialog returns, then just call
Close() in the dialog to return from ShowDialog().

Does that answer you're question?

Dan.

"John" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi all,
>
> I come from a VB6 background and noticed that one cannot simply load forms
> the way we used to.
>
> What is the best way to code using multiple forms within one's ppc
> application?
>
> Any pointers to reading material will help greatly.
>
> Thanks and regards
> John.
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Viewing Forms Correctly =?Utf-8?B?c29uZml0eg==?= Microsoft Access Getting Started 1 20th Jan 2006 09:00 PM
Outlook Forms not working correctly =?Utf-8?B?U2luaGFuYWRh?= Microsoft Outlook Discussion 1 28th Sep 2005 06:08 PM
Forms not displaying correctly... =?Utf-8?B?V0hHZW9yZ2U=?= Microsoft Outlook Form Programming 0 23rd Sep 2005 04:37 PM
3 Forms Linked, last one not updating correctly =?Utf-8?B?U01hYw==?= Microsoft Access Forms 0 8th Nov 2004 02:41 PM
problems displaying forms correctly =?ISO-8859-1?Q?S=E9rgio_Almeida?= Microsoft Dot NET Framework Forms 1 4th Jun 2004 11:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:33 PM.