|
-
Sep 5th, 2005, 10:04 AM
#1
Thread Starter
Hyperactive Member
opening a form
how to open a form within my project? i am using window.open but it ain't working. thanks
-
Sep 5th, 2005, 10:05 AM
#2
Re: opening a form
have you tried window.show()? Where window is the name of the form?
- ØØ -
-
Sep 5th, 2005, 10:19 AM
#3
Thread Starter
Hyperactive Member
Re: opening a form
error says 'Project.Main doesn't contain a definition for open'
-
Sep 5th, 2005, 10:29 AM
#4
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);
}
- ØØ -
-
Sep 5th, 2005, 11:49 AM
#5
Thread Starter
Hyperactive Member
Re: opening a form
yes i have, i am calling main on other form
-
Sep 5th, 2005, 11:58 AM
#6
Re: opening a form
Have you instansiated the other form? Made an object of it?
- ØØ -
-
Sep 5th, 2005, 12:09 PM
#7
Thread Starter
Hyperactive Member
Re: opening a form
the form is already exists i just added another form that calls it.
-
Sep 5th, 2005, 12:15 PM
#8
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?
- ØØ -
-
Sep 5th, 2005, 12:25 PM
#9
Thread Starter
Hyperactive Member
Re: opening a form
aspx code
Code:
//Setup the button links
strScript = "JavaScript:return ViewBatch(" + intEmployeeID + ")";
this.btnView.Attributes.Add("ONCLICK",strScript);
-
Sep 5th, 2005, 12:26 PM
#10
Thread Starter
Hyperactive Member
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);
}
-
Sep 5th, 2005, 12:35 PM
#11
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.
- ØØ -
-
Sep 5th, 2005, 12:47 PM
#12
Thread Starter
Hyperactive Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|