Hello, this is my 1st post here,:)
I have a problem With C#.net 2008,
I can't find the way to send variables from form to form, Could you post here all the ways to do so?
+ But my problem really is this.:icon_eek:
I have 2 Forms, 1-Form1, 2-SP(name of form "sp").
And form sp has a ListBox with text, I want to pass the selected text in that list box into form1's label(form 1 has a label called label2).
I can't really find the way to do so, please if you give me an answer please explain it to me so i would understand it too.
Thanks In advance.
agam360
-1
Light Poster
Recommended Answers
Jump to PostThere are several ways to do this. Does form1 call form SP?
Jump to PostIn other words, inside of Form1's class, you create form "SP", such as:
SP sp = new SP(); sp.ShowDialog();
Jump to PostWhat do you mean call?
Could you give me an example code?(for my 1st question..)There are soooo many ways to do this. Here is one technique:
public class MyVars { public string text1; public string text2; } public class Form1 : Form { MyVars myVars = …
Jump to Post…I know how to open a form but I asked how could I transfer from From2 that has a list box the selected item from the list box , and when button that transfers is pressed to show the value of the selected listbox item in the label in form1.
All 16 Replies
DdoubleD
315
Posting Shark
agam360
-1
Light Poster
DdoubleD
315
Posting Shark
agam360
-1
Light Poster
DdoubleD
315
Posting Shark
DdoubleD
315
Posting Shark
agam360
-1
Light Poster
agam360
-1
Light Poster
DdoubleD
315
Posting Shark
agam360
-1
Light Poster
ds2r
0
Light Poster
agam360
-1
Light Poster
DdoubleD
315
Posting Shark
DdoubleD
315
Posting Shark
serkan sendur
821
Postaholic
Banned
stoymigo
-2
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.