Harini
July 11th, 2001, 11:07 AM
Hello,
I have an MDI application in which I have one Mainscreen and two child forms. when I double click on the title bar of one of the child forms then the Form_Resize() event of the second form is getting called. Can any body tell me why it is happening and how to avoid it. The code that I wrote in the Form_Resize() event of the both the forms (Form1 & Form2) is as follows.
Dim iWidth as Integer, iHeight as Integer
Dim iTop as Integer, iLeft as Integer
Dim bMax as Boolean
bMax = false
If me.WindowState = vbMaximized And Not bMax then
me.Hide
bMax = true
me.WindowState = vbNormal
me.width = MainScreen.width / 1.4
me.height = 2.4 / 3 * MainScreen.height
me.top = MainScreen.top + MainScreen.height / 50
me.left = MainScreen.left + MainScreen.width / 3.8
me.Show
ElseIf bMax = true And me.WindowState = vbMaximized then
me.Hide
me.WindowState = vbNormal
me.width = iWidth
me.height = iHeight
me.top = iTop
me.left = iLeft
bMax = false
me.Show
ElseIf Not bMax then
iWidth = me.width
iHeight = me.height
iTop = me.top
iLeft = me.left
End If
MainScreen is the name of the MDI parent form.
I have written the above code in the Resize event to bring the form to the size that I want when double clicked on the form titlebar. I want to hide/show the form to avoid the flickering effect on the screen.
Thanks
Harini
I have an MDI application in which I have one Mainscreen and two child forms. when I double click on the title bar of one of the child forms then the Form_Resize() event of the second form is getting called. Can any body tell me why it is happening and how to avoid it. The code that I wrote in the Form_Resize() event of the both the forms (Form1 & Form2) is as follows.
Dim iWidth as Integer, iHeight as Integer
Dim iTop as Integer, iLeft as Integer
Dim bMax as Boolean
bMax = false
If me.WindowState = vbMaximized And Not bMax then
me.Hide
bMax = true
me.WindowState = vbNormal
me.width = MainScreen.width / 1.4
me.height = 2.4 / 3 * MainScreen.height
me.top = MainScreen.top + MainScreen.height / 50
me.left = MainScreen.left + MainScreen.width / 3.8
me.Show
ElseIf bMax = true And me.WindowState = vbMaximized then
me.Hide
me.WindowState = vbNormal
me.width = iWidth
me.height = iHeight
me.top = iTop
me.left = iLeft
bMax = false
me.Show
ElseIf Not bMax then
iWidth = me.width
iHeight = me.height
iTop = me.top
iLeft = me.left
End If
MainScreen is the name of the MDI parent form.
I have written the above code in the Resize event to bring the form to the size that I want when double clicked on the form titlebar. I want to hide/show the form to avoid the flickering effect on the screen.
Thanks
Harini