+set screenwidth [winfo screenwidth $win]
+set screenheight [winfo screenheight $win]
+set initialwidth 1200
+set initialheight 900
+
+if {$screenwidth < $initialwidth} {
+ set initialwidth $screenwidth
+}
+
+if {$screenheight < $initialheight} {
+ set initialheight $screenheight
+}
+