Results 1 to 12 of 12

Thread: opening a form

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Location
    Manila, Philippines
    Posts
    486

    opening a form

    how to open a form within my project? i am using window.open but it ain't working. thanks

  2. #2
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: opening a form

    have you tried window.show()? Where window is the name of the form?


    - ØØ -

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Location
    Manila, Philippines
    Posts
    486

    Re: opening a form

    error says 'Project.Main doesn't contain a definition for open'

  4. #4
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: opening a form

    Do you have any forms open at all in this project? Or is this the first form that you will open when the app starts? If it is the first one, then try this:


    Code:
         public static void Main()
         {
              Form form = new Form();
    
              form.Text = "My Very Own Form";
     
              Application.Run(form);
         }


    - ØØ -

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Location
    Manila, Philippines
    Posts
    486

    Re: opening a form

    yes i have, i am calling main on other form

  6. #6
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: opening a form

    Have you instansiated the other form? Made an object of it?


    - ØØ -

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Location
    Manila, Philippines
    Posts
    486

    Re: opening a form

    the form is already exists i just added another form that calls it.

  8. #8
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: opening a form

    Now you totaly lost me. When you mean exists. Do you mean that you have made an object out of it? Do you care to post the code, so I maybe understand what you mean?


    - ØØ -

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Location
    Manila, Philippines
    Posts
    486

    Re: opening a form

    aspx code

    Code:
    //Setup the button links			
    strScript = "JavaScript:return ViewBatch(" + intEmployeeID + ")";
    this.btnView.Attributes.Add("ONCLICK",strScript);

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Location
    Manila, Philippines
    Posts
    486

    Re: opening a form

    html

    Code:
    function ViewBatch(strEmployeeID) 
    { 
    intHeight = 600; 
    intWidth = 550; 
    intTop = (screen.height/2)-(intHeight/2); 
    intLeft = (screen.width/2)-(intWidth/2); 
    strFeatures = "resizable=no,scrollbars=no,status=yes,height=" + intHeight + ",width=" + intWidth + ",top=" + intTop + ",left=" + intLeft; 
    window.open("Main.aspx?EmployeeID=" + intEmployeeID ,"",strFeatures);
    }

  11. #11
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: opening a form

    Ohhh..this is ASP? Why didn't you say so right away? I guess this Q belongs in the ASP section then.

    - ØØ -

  12. #12

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Location
    Manila, Philippines
    Posts
    486

    Re: opening a form

    but i am using c#

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width