asp.net WebDesktop creating a window from another window using server side.

3 replies. Last post: February 8, 2011 10:18 PM by Handy Surya
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
danfrpa1Member

How do I create a window from another window on the fly.

 

Here is what I have in my class, I can reference the WebDesktop, but it is not working.  It doesn't error out... just no window shows up.

Public Sub BuildActiveWindow(ByVal ssName As String, ByVal ssURL As String, ByVal ssCaption As String, ByVal ssWidth As Int32, ByVal ssHeight As Int32, ByVal ssAllowMinimize As Boolean, ByVal ssAllowMaximize As Boolean, ByVal ssAllowResize As Boolean, ByVal ssAllowClose As Boolean, ByVal ssControlBoxImage As String, ByVal amaPage As Web.UI.Page)
MainDesktopManager = amaPage.Session("MainDesktopManager")
Dim isWindow As ISNet.WebUI.WebDesktop.WebDesktopWindow
Dim aFound As Boolean = False
For Each isWindow In MainDesktopManager.Windows
If isWindow.Name = ssName Then
aFound = True
Exit For
End If
Next
If aFound = False Then
isWindow = New ISNet.WebUI.WebDesktop.WebDesktopWindow
isWindow.Text = ssCaption
isWindow.Name = ssName
isWindow.ControlBox = ControlBox.Yes
isWindow.ControlBoxImage = ssControlBoxImage
isWindow.ContentMode = ContentMode.UseIFrame
isWindow.ContentURL = ssURL
isWindow.ShowInTaskBar = True
Dim vSize As System.Drawing.Size = New System.Drawing.Size(640, 480)
isWindow.MinimumSize = vSize
Dim isSize As System.Drawing.Size = New System.Drawing.Size(ssWidth, ssHeight)
isWindow.Size = isSize
If ssAllowMaximize = True Then
isWindow.AllowMaximize = AllowMaximize.Yes
Else
isWindow.AllowMaximize = AllowMaximize.No
End If
If ssAllowMinimize = True Then
isWindow.AllowMinimize = AllowMinimize.Yes
Else
isWindow.AllowMinimize = AllowMinimize.No
End If
If ssAllowResize = True Then
isWindow.AllowResize = AllowResize.Yes
Else
isWindow.AllowResize = AllowResize.No
End If
If ssAllowClose = True Then
isWindow.AllowClose = CloseMode.Yes
Else
isWindow.AllowClose = CloseMode.No
End If
isWindow.ClientVisible = True
MainDesktopManager.Windows.Add(isWindow)

Else
End If
End Sub
All times are GMT -5. The time now is 1:49 AM.
Previous Next