Click here to Skip to main content
15,902,492 members
Home / Discussions / C#
   

C#

 
GeneralRe: Reply to Dave's Solution Pin
Dave Kreskowiak9-Jun-05 16:16
mveDave Kreskowiak9-Jun-05 16:16 
GeneralRe: Reply to Dave's Solution Pin
Christian Graus9-Jun-05 16:17
protectorChristian Graus9-Jun-05 16:17 
GeneralRe: Reply to Dave's Solution Pin
Dave Kreskowiak10-Jun-05 1:32
mveDave Kreskowiak10-Jun-05 1:32 
GeneralRe: Reply to Dave's Solution Pin
Christian Graus13-Jun-05 12:10
protectorChristian Graus13-Jun-05 12:10 
GeneralReply to Fantas's Solution Pin
DJdC9-Jun-05 15:37
DJdC9-Jun-05 15:37 
GeneralRe: Reply to Fantas's Solution Pin
Christian Graus9-Jun-05 16:21
protectorChristian Graus9-Jun-05 16:21 
GeneralReply to Christian's Solution Pin
DJdC9-Jun-05 15:48
DJdC9-Jun-05 15:48 
GeneralRe: Reply to Christian's Solution Pin
Christian Graus9-Jun-05 15:53
protectorChristian Graus9-Jun-05 15:53 
The answer remains the same. If the method in question is intrinsic to the fact that it's part of a Form class, then derive a class from Form, and put the method there, then derive both Form1 and Form2 from the common base class, so they both have access to the method. If it's a web app, the base class is Page.

Also, if you're adding components dynamically, make sure it happens in OnInit, so the controls are in the page early enough in the lifecycle that viewstate is restored for them, assuming you want it to be. You should not dynamically generate controls if there is any other way of doing things, it just messes with stuff too much.

DJdC wrote:
Its not really something to share as in the same function to be performed on Form2 thats not what I meant. I just need Form2 to call the function for it to be performed as per normal...

So if Forms2 doesn't need the function performed on it, why is it calling the function at all ? Why does Form2 need to call it ?


Christian Graus - Microsoft MVP - C++
GeneralReRe: Reply to Christian's Solution Pin
DJdC9-Jun-05 16:26
DJdC9-Jun-05 16:26 
GeneralRe: ReRe: Reply to Christian's Solution Pin
Christian Graus9-Jun-05 16:34
protectorChristian Graus9-Jun-05 16:34 
GeneralReRe: ReRe: Reply to Christian's Solution Pin
DJdC9-Jun-05 17:06
DJdC9-Jun-05 17:06 
GeneralRe: ReRe: ReRe: Reply to Christian's Solution Pin
Christian Graus9-Jun-05 17:12
protectorChristian Graus9-Jun-05 17:12 
GeneralReRe: ReRe: ReRe: Reply to Christian's Solution Pin
DJdC9-Jun-05 17:45
DJdC9-Jun-05 17:45 
GeneralRe: ReRe: ReRe: ReRe: Reply to Christian's Solution Pin
Christian Graus9-Jun-05 17:51
protectorChristian Graus9-Jun-05 17:51 
GeneralReRe: ReRe: ReRe: ReRe: Reply to Christian's Solution Pin
DJdC9-Jun-05 19:10
DJdC9-Jun-05 19:10 
GeneralRe: ReRe: ReRe: ReRe: ReRe: Reply to Christian's Solution Pin
Christian Graus13-Jun-05 11:56
protectorChristian Graus13-Jun-05 11:56 
GeneralRe: Please Help! Function on Separate Form Pin
Jack Bond13-Jun-05 2:23
Jack Bond13-Jun-05 2:23 
GeneralGame Programming Pin
Sabry19058-Jun-05 22:55
Sabry19058-Jun-05 22:55 
GeneralRe: Game Programming Pin
Philip Price8-Jun-05 23:20
Philip Price8-Jun-05 23:20 
GeneralRe: Game Programming Pin
MoustafaS9-Jun-05 0:49
MoustafaS9-Jun-05 0:49 
GeneralRe: Game Programming Pin
Christian Graus9-Jun-05 17:52
protectorChristian Graus9-Jun-05 17:52 
GeneralRe: Game Programming Pin
JDUK12-Jun-05 11:53
JDUK12-Jun-05 11:53 
GeneralConverting Code Pin
Sabry19058-Jun-05 22:49
Sabry19058-Jun-05 22:49 
GeneralRe: Converting Code Pin
Philip Price8-Jun-05 23:17
Philip Price8-Jun-05 23:17 
GeneralRe: Converting Code Pin
Carsten Zeumer8-Jun-05 23:25
Carsten Zeumer8-Jun-05 23:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.