Click here to Skip to main content
15,921,697 members
Home / Discussions / C#
   

C#

 
AnswerRe: Edit TreeNode text ??? Pin
Polis Pilavas24-Apr-05 6:55
Polis Pilavas24-Apr-05 6:55 
AnswerRe: Edit TreeNode text ??? Pin
tommazzo24-Apr-05 10:22
tommazzo24-Apr-05 10:22 
AnswerRe: Edit TreeNode text ??? Pin
NassosReyzidis25-Apr-05 23:30
NassosReyzidis25-Apr-05 23:30 
General== or String.Equals() Pin
tommazzo24-Apr-05 6:43
tommazzo24-Apr-05 6:43 
GeneralRe: == or String.Equals() Pin
S. Senthil Kumar24-Apr-05 19:12
S. Senthil Kumar24-Apr-05 19:12 
GeneralRe: == or String.Equals() Pin
tommazzo26-Apr-05 2:48
tommazzo26-Apr-05 2:48 
Generalwin form Pin
vuthaianh24-Apr-05 2:55
vuthaianh24-Apr-05 2:55 
GeneralRe: win form Pin
Polis Pilavas24-Apr-05 3:14
Polis Pilavas24-Apr-05 3:14 
vuthaianh wrote:
Could i reference to a windows form from another

Ofourse you can. A form is a class like everything else. If you have assigned public variables or methods in the class you want to access then you can access them from any other class in your solution.

E.g. you have 2 classes, Form1 and Form2 and you want to access Form2 from Form1.
(1) First of all you create one instance of each class:
Form1 <code>myFirstForm </code>= new Form1();
Form2 <code>mySecondForm </code>= new Form2();


(2) Assuming that you have publicly available fields or methods in Form2 then you can access them from any class, including Form1. So if you wanted to call a method located inside Form2 from somewhere within Form1 you could say:
int <code>myRate </code>= mySecondForm.CalculateRate();


Hope this helps





Regards,
Polis

Can you practice what you teach?
GeneralRe: win form Pin
Nick Parker24-Apr-05 4:35
protectorNick Parker24-Apr-05 4:35 
GeneralRe: win form Pin
Polis Pilavas24-Apr-05 6:52
Polis Pilavas24-Apr-05 6:52 
GeneralExecute Stored Procedure... Pin
Illegal Operation24-Apr-05 2:53
Illegal Operation24-Apr-05 2:53 
GeneralRe: Execute Stored Procedure... Pin
Colin Angus Mackay24-Apr-05 3:42
Colin Angus Mackay24-Apr-05 3:42 
GeneralRe: Execute Stored Procedure... Pin
Illegal Operation24-Apr-05 4:05
Illegal Operation24-Apr-05 4:05 
GeneralRe: Execute Stored Procedure... Pin
Colin Angus Mackay24-Apr-05 4:11
Colin Angus Mackay24-Apr-05 4:11 
GeneralGarbage Collection - Question Pin
Tristan Rhodes24-Apr-05 0:33
Tristan Rhodes24-Apr-05 0:33 
GeneralRe: Garbage Collection - Question Pin
WillemM24-Apr-05 2:20
WillemM24-Apr-05 2:20 
GeneralIncluding a manifest file within the exe file Pin
Anonymous23-Apr-05 23:34
Anonymous23-Apr-05 23:34 
GeneralRe: Including a manifest file within the exe file Pin
DavidNohejl24-Apr-05 2:06
DavidNohejl24-Apr-05 2:06 
Generalwindows services Pin
sianatia23-Apr-05 23:18
sianatia23-Apr-05 23:18 
GeneralRe: windows services Pin
Claudio Grazioli24-Apr-05 6:14
Claudio Grazioli24-Apr-05 6:14 
GeneralList the files in another computer Pin
Johny Ng23-Apr-05 18:58
Johny Ng23-Apr-05 18:58 
GeneralRe: List the files in another computer Pin
lubos_h24-Apr-05 2:06
lubos_h24-Apr-05 2:06 
GeneralValue Types Vs Reference Types Pin
vchedalla23-Apr-05 18:57
vchedalla23-Apr-05 18:57 
GeneralRe: Value Types Vs Reference Types Pin
Colin Angus Mackay23-Apr-05 22:42
Colin Angus Mackay23-Apr-05 22:42 
Generalusing the serial port Pin
Mridang Agarwalla23-Apr-05 18:06
Mridang Agarwalla23-Apr-05 18:06 

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.