Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 22nd, 2003, 07:45 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default calling a form

Hi there:
First of all let me to to check if I call my forms from menu correctly or not?! my code are like foloow in a menuItem click:
Code:
private void menuItemSubject_Click(object sender, System.EventArgs e)
{
    Contents Subjects = new Contents();
    Subjects.ShowDialog();
}
Is it ok ?! if not how is that!?!?

Secondly I wanna call a form with a parameters, SO how could I do this one?! Any help appreciated.

Always:),
Hovik Melkomian.
__________________
Always,
Hovik Melkomian.
 
Old July 23rd, 2003, 12:06 AM
Registered User
 
Join Date: Jul 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

private void menuItemSubject_Click(object sender, System.EventArgs e)
{
    Contents Subjects = new Contents();
    Subjects.ShowDialog();
}

Code is OK... if you want "Subjects" to be displayed as a modal

Call a form with a parameter ,,, can you be more specific... i couldnt understand it...

 
Old July 23rd, 2003, 12:51 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

Tnx for reply! & what about NOT modal !??!

What i mean is: I have a form witch I wanna use it insted of 3 forms & I have to send a parameter to it?! isnt it?! how can I do that?!

Always:),
Hovik Melkomian.
 
Old July 23rd, 2003, 01:18 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Ankur_Verma Send a message via MSN to Ankur_Verma
Default

Hi Hovik

If I'm getting what you are trying to say right, adding a constructor to the Contents form class will solve your problem, add parameters to this constructor and initiallize Subjects using this constructor.

Write back if you there is anything else you should ask me.


Ankur Verma
.Net and C++ Specialist
Wiley Tech Support
 
Old July 23rd, 2003, 05:24 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

tnx dear! it works now!

Always:),
Hovik Melkomian.





Similar Threads
Thread Thread Starter Forum Replies Last Post
calling control in one form from another form netfresher C# 3 November 8th, 2006 10:05 AM
How to get the current calling form in a class? littlekitty ASP.NET 2.0 Basics 0 October 17th, 2006 08:28 PM
calling functions form another window geogomez Javascript How-To 2 November 29th, 2005 07:20 AM
calling txt fields of a form in a report mjuliao Access 1 October 16th, 2005 12:07 AM
Calling a procedure embeded in another form lryckman Access VBA 6 April 29th, 2005 08:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.