Hello all,I need help again.I don't know how to handle this Error. I wanna 
create mulitiple forms in one project.I did the same as I used to deal with 
Ironpython IDE.But it doesn't work because I use Visual Studio 2005 SDK to 
implement this project.I've already attached my project sample. I really don't 
know what  to do now.Please let me know if I have to go back to the old way 
immediately. Thank you,Jane
 
_________________________________________________________________
Put your friends on the big screen with Windows Vista® + Windows Live™.
http://www.microsoft.com/windows/shop/specialoffers.mspx?ocid=TXT_TAGLM_CPC_MediaCtr_bigscreen_012008
import System
from System.Windows.Forms import *
from System.ComponentModel import *
from System.Drawing import *
from clr import *
from Form2 import *

from System.Globalization import *
class f1: # namespace
    
    class Form1(System.Windows.Forms.Form):
        """type(_button1) == System.Windows.Forms.Button, type(_frm2) == 
System.Windows.Forms.Form()"""
        __slots__ = ['_button1','_frm2']
        def __init__(self):
            
            self.InitializeComponent()
        
        @accepts(Self(), bool)
        @returns(None)
        def Dispose(self, disposing):
            
            
            
            super(type(self), self).Dispose(disposing)
        
        @returns(None)
        def InitializeComponent(self):
            self._button1 = System.Windows.Forms.Button()
            self._frm2 = System.Windows.Forms.Form()
            self.SuspendLayout()
            # 
            # button1
            # 
            self._button1.Location = System.Drawing.Point(107, 126)
            self._button1.Name = 'button1'
            self._button1.Size = System.Drawing.Size(75, 23)
            self._button1.TabIndex = 0
            self._button1.Text = 'Go to form 2'
            self._button1.UseVisualStyleBackColor = True
            self._button1.Click += self._button1_Click
            # 
            # Form1
            # 
            self.ClientSize = System.Drawing.Size(292, 273)
            self.Controls.Add(self._button1)
            self.Name = 'Form1'
            self.Text = 'Form1'
            self.Load += self._Form1_Load
            self.ResumeLayout(False)
        
        @accepts(Self(), System.Object, System.EventArgs)
        @returns(None)
        def _Form1_Load(self, sender, e):
            pass
        
        @accepts(Self(), System.Object, System.EventArgs)
        @returns(None)
        def _button1_Click(self, sender, e):
            
            
            
            self.Hide()
            self._frm2 = Form2()
            
            self._frm2.ShowDialog()





            # Snippet Statement
            pass
            # End Snippet Statement
        
    

import System
from System.Windows.Forms import *
from System.ComponentModel import *
from System.Drawing import *
from clr import *
from Form1 import *
from System.Globalization import *
class f1: # namespace
    
    class Form2(System.Windows.Forms.Form):
        """type(_button1) == System.Windows.Forms.Button, type(_frm1) == 
System.Windows.Forms.Form()"""
        __slots__ = ['_button1','_frm1']
        def __init__(self):
            self.InitializeComponent()
        
        @accepts(Self(), bool)
        @returns(None)
        def Dispose(self, disposing):
            
            
            
            super(type(self), self).Dispose(disposing)
        
        @returns(None)
        def InitializeComponent(self):
            self._button1 = System.Windows.Forms.Button()
            self._frm1 = System.Windows.Forms.Form()
            self.SuspendLayout()
            # 
            # button1
            # 
            self._button1.Location = System.Drawing.Point(97, 156)
            self._button1.Name = 'button1'
            self._button1.Size = System.Drawing.Size(75, 23)
            self._button1.TabIndex = 0
            self._button1.Text = 'Back to Form 1'
            self._button1.UseVisualStyleBackColor = True
            self._button1.Click += self._button1_Click
            # 
            # Form2
            # 
            self.ClientSize = System.Drawing.Size(292, 273)
            self.Controls.Add(self._button1)
            self.Name = 'Form2'
            self.Text = 'Form2'
            self.Load += self._Form2_Load
            self.ResumeLayout(False)
        
        @accepts(Self(), System.Object, System.EventArgs)
        @returns(None)
        def _button1_Click(self, sender, e):
            self.Hide()
            self._frm1 = Form1()
            self._frm1.ShowDialog()
            # Snippet Statement
            pass
            # End Snippet Statement
        
        @accepts(Self(), System.Object, System.EventArgs)
        @returns(None)
        def _Form2_Load(self, sender, e):
            pass
        
    

_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to