Groups | Blog | Home
all groups > dotnet distributed apps > december 2003 >

dotnet distributed apps : User Interface Process Application Block



george r smith
12/23/2003 2:22:20 PM
How would you go about create multiple instances of a form in the UIP.
We would like to have multiple forms of let us say order processing open at
the
same time.

ps I have tried a MDI approach and have given up on that in the UIP

thanks
grs

lukezhan NO[at]SPAM online.microsoft.com
12/24/2003 6:20:45 AM
Hi George,

In the UIP QuickStart Sample, there is one named "Multiple navigation
Graphs". You may take a look at it to see if it is a similar issue with
your requirement.

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
n33470 NO[at]SPAM yahoo.com
1/5/2004 7:39:27 AM
[quoted text, click to view]

George,

What is it about using MDI in the UIP that caused you to "give up"?
When you start a task in the UIPManager, you specify the MDIParent
form that should be assigned to all subsequent views that are
navigated to within that task. Have you noticed this process breaking
down after a while?

Did you discover something in the UIP that breaks the MDI model? I'm
just curious.

george r smith
1/5/2004 10:20:38 AM
Steve,

Well I gave up because while waiting for a response on how to go the MDI
route we decided
to go to multiple instances of forms using SDI.

Also, I read that MS now recommends SDI and in Longhorn MDI support might go
away.

We inserted some lines in the WinFormViewManager to allow for these multiple
instances and also added a property called "copies" to the view section of
the app.config file.

Steve since you replied to one of my posts if you want to correspond on this
UIP my email is
gsmith@budgetext.com

lukezhan NO[at]SPAM online.microsoft.com
1/7/2004 9:19:21 AM
Hi George,

If you are working with a SDI solution currently, you may try to add one
line to the Store sample (Win/Logon form):

Private Sub okButton_Click(sender As Object, e As System.EventArgs) Handles
okButton.Click
'Ask controller if user is valid
If StoreController.IsUserValid(emailText.Text, passwordText.Text)
Then
' Logon was valid.
User = emailText.Text

' Start task with the previous task id
UIPManager.StartTask("Shopping", New CartTask(emailText.Text))

UIPManager.StartTask("Shopping", New
CartTask("mstuart@microsoft.com"))

'This view can be hidden because it started the task and its
lifetime isnt controlled
'by the UIPManager class
Me.Visible = False
Else
MessageBox.Show("The user or password are incorrect")
End If
End Sub

Notice we execute StartTask twice and there will be two instances of cart
form for different user. To create multiple instances of a form in the UIP,
the basic idea is create multiple task with different task ID.

Hope this help,

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
AddThis Social Bookmark Button