Hi,
there is definitely something wrong with me, as I don't seem to be
able to grasp something that is probably simple:
The problem (for me that is)
I want to switch windows. When I click in Window A on a button I want
Window B to open (at the same position and size as Window A) and vice
versa.
Should be simple I thought so I wrote this:
Dim newWindow As Window
Select Case node.Text -------> using the Einhugur's Taskbar
case "Beheer Gebruikers"
newWindow = new studentswindow
App.SwitchWindow(newWindow)
case "Beheer Opdrachten"
newWindow = new KeyFilesWindow
App.SwitchWindow(newWindow)
end Select
App.Switchwindow is this:
Sub SwitchWindow(ByRef NewWindow As Window)
Dim myPosInfo As Dictionary
myPosInfo = new Dictionary
if App.CurrentWindow isa Window then
myPosInfo.Value("Left") = App.CurrentWindow.Left
myPosInfo.Value("Top") = App.CurrentWindow.Top
myPosInfo.Value("Width") = App.CurrentWindow.Width
myPosInfo.Value("Height") = App.CurrentWindow.Height
App.CurrentWindow.Close
App.CurrentWindow = NewWindow
App.CurrentWindow.Left = myPosInfo.Value("Left")
App.CurrentWindow.Top = myPosInfo.Value("Top")
App.CurrentWindow.Width = myPosInfo.Value("Width")
App.CurrentWindow.Height = myPosInfo.Value("Height")
else
App.CurrentWindow = NewWindow
end if
End Sub
When I clicked in Studentswindow on the node to open KeyFilesWindow,
KeyFilesWIndow opens but not in the right place.
When I then return to studentswindow by clicking on the node in
KeyFilesWindow, the app freezes for about 30 secs and then opens
completely distorted (resized & strechted over the limit of my 20"
screen)
PS the ByRef was my latest attemp I first used simply passing
newWindow as Window
HELP (grrr)
TIA
Bart
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>