Jokuc - you need to first set the variable for setInput. If you load form2 without first loading form1 and passing the value through you will get an error as the form now requires setInput in order to load
I do exactly like you do but I get the error "'Project.Form2' does not contain a constructor that takes 0 arguments" Even though I put private void btnApply_Click(object sender, EventArgs e) { Form2 Form2Instance = new Form2(tbxTextInput.Text); Form2Instance.Show(); } in form1 and public Form2(string setInput) { InitializeComponent(); lblScroll.Text = setInput; } in form2
//for functions from another forms Main_Form main_form = this.Owner as Main_Form; main_form.FUNCTION_FROM_MAIN_FORM //for data from another forms Main_From.VAR_From_Main_Form -->all VARs should be public static
Thank you so much ! i ve a qeustion concerning a combobox : I' ve a ComboBox with Three Items in main Form and a button make another form.show so in the second form i am asking about the selected item in the combox and switch it in 3 cases but i ve an error said nullReference the item is null even i select one item from the Combox ( "Tete", "Doublette", "Triplette") Thank you for Your Help
I have been trying for a lot of days in which I can create a media player, also get the file path and file name from the database and then play it also you can help me in fullscreen
Please, please, stop moving the cursor so much. I had to close my eyes and just listen. Otherwise very useful, detailed and clearly presented information.
can you make a video tutorial abt this ??? personnally this this tutorial helps me a lot still if you said there is a better way i really wish to know it please
Richard Evans i have found another way... this is a login application... so i get the value of the username and password... with the use of MYSQL database ..try this FORM1 //at login button i include this MessageBox.Show("Log In Successful!!!"); this.Hide(); checkup c = new checkup(); c.user = name_tb.Text; c.pass = pass_tb.Text; c.ShowDialog(); FORM2 private string Nm; private string su; public string pass { get { return su; } set { su = value; } } public string user { get { return Nm; } set { Nm = value; } } private void checkup_Load(object sender, EventArgs e) { name_tb.Text = Nm; sur_tb.Text = su; string MyConnection = "datasource=localhost; port = 3306;username=root;password=Yuri"; string Query = "select * from data.info where first= '"+ this.name_tb.Text + "' and sur= '"+ this.sur_tb.Text +"' ;"; i forgot from what tutorial i was able to get this.. ^_^ GL
can i use a form for two fonctions ???? i mean for exemple : if i click on the button add or button show take me to the second form but when i click Button add the second form will save informations and when i click Buttonshow the second form will show informations
Am I the only one that thinks that the example works in the opposite way that he says it should work? at 2:09, he said whatever value he entered in Form2 will pop up in Form 1 after clicking the button; however, when he clicked, it sends the information from Form 1 to Form 2 instead. This got me confused at first because I couldn't understand why he was declaring a variable in the Form 2 method that would be accepting the text rather than sending the text.
The content is very helpful and I was need to watch this video. But rotating your cursor drives me crazy. I was diverting my eyes to another side not to see it but... I need to see what u`re doing there. Sorry. But for me it`s impossible to watch all your videos. They`re too annoying...
Not sure if you are still active man, but you explained this better than 100 youtube videos I watched before reaching yours, thank you!!!!
No matter what others say, this helped me out. Thank you!
Thank You man! Your tutorial made my day. I have been searching for this all around.
Thank you for this video
Jokuc - you need to first set the variable for setInput. If you load form2 without first loading form1 and passing the value through you will get an error as the form now requires setInput in order to load
what am i supposed to put in the constructor of Form1? im having a hard time though >.
WOW!! Working like a charm!! :) THANKS!
This helped me with something I've been struggling with for 3 days. Thank you!!
Thank you very much
How do I pass more than one string value to another form? So send data from two different textboxes to another form.
Form1(login)>>passed to form2(Main Dashboard)>>Form3>>returns to Form2 [the value passed from 1 is not available]
very nice well explained video ..i want to know how to make reports in c#
Thanks bro
please make vedios of unit test cases for Windows form in C#
Thanks!
What if i want to pass some data back to form1 one from form2?? can u please guide me??
thanks sir
Plz show me how i can keep the frm without changing it.s boarder like unruntime plz
Thank you!!!
Helllo Juste a little point your r using the same name of text Box1 in tow Forms So I can t difference between them
I do exactly like you do but I get the error
"'Project.Form2' does not contain a constructor that takes 0 arguments"
Even though I put
private void btnApply_Click(object sender, EventArgs e)
{
Form2 Form2Instance = new Form2(tbxTextInput.Text);
Form2Instance.Show();
}
in form1 and
public Form2(string setInput)
{
InitializeComponent();
lblScroll.Text = setInput;
}
in form2
//for functions from another forms
Main_Form main_form = this.Owner as Main_Form;
main_form.FUNCTION_FROM_MAIN_FORM
//for data from another forms
Main_From.VAR_From_Main_Form -->all VARs should be public static
Thank you so much ! i ve a qeustion concerning a combobox : I' ve a ComboBox with Three Items in main Form and a button make another form.show so in the second form i am asking about the selected item in the combox and switch it in 3 cases but i ve an error said nullReference the item is null even i select one item from the Combox ( "Tete", "Doublette", "Triplette")
Thank you for Your Help
I have been trying for a lot of days in which I can create a media player, also get the file path and file name from the database and then play it also you can help me in fullscreen
Please, please, stop moving the cursor so much. I had to close my eyes and just listen. Otherwise very useful, detailed and clearly presented information.
can you make a video tutorial abt this ??? personnally this this tutorial helps me a lot still if you said there is a better way i really wish to know it please
How would I do this but with checkboxes, like say topmost
Thank you for this...
BUT what if i want to pass multiple data from one form to another>>>>????
HELP PLEASE
Richard Evans
i have found another way... this is a login application...
so i get the value of the username and password... with the use of MYSQL database ..try this
FORM1
//at login button i include this MessageBox.Show("Log In Successful!!!");
this.Hide();
checkup c = new checkup();
c.user = name_tb.Text;
c.pass = pass_tb.Text;
c.ShowDialog();
FORM2
private string Nm;
private string su;
public string pass
{
get { return su; }
set { su = value; }
}
public string user
{
get { return Nm; }
set { Nm = value; }
}
private void checkup_Load(object sender, EventArgs e)
{
name_tb.Text = Nm;
sur_tb.Text = su;
string MyConnection = "datasource=localhost; port = 3306;username=root;password=Yuri";
string Query = "select * from data.info where first= '"+ this.name_tb.Text + "' and sur= '"+ this.sur_tb.Text +"' ;";
i forgot from what tutorial i was able to get this.. ^_^
GL
its right
@@yuriko1890 what to insert if I want to add a back button in form2 to form1?
Thank you :D It took me so long to actually realize how simply it was
i have the same problem from the comment below, what am i supposed to do with the "Constructor"?
can i use a form for two fonctions ????
i mean for exemple :
if i click on the button add or button show take me to the second form but when i click Button add the second form will save informations
and when i click Buttonshow the second form will show informations
Thank you.
What if i want to pass 3 or 4 value?? Add 4 parameters?
Thank you!
you just passed username what if based on username and pasword it retrieves rest of information like name etc in other form textboxes
Thanks a loooot
thank you very much.
how about passing data from one form to database?
I'm trying to pass all items from a listbox (or list, idc) to the second form.. any suggestions?
Am I the only one that thinks that the example works in the opposite way that he says it should work? at 2:09, he said whatever value he entered in Form2 will pop up in Form 1 after clicking the button; however, when he clicked, it sends the information from Form 1 to Form 2 instead. This got me confused at first because I couldn't understand why he was declaring a variable in the Form 2 method that would be accepting the text rather than sending the text.
Yeah I had to completely start over because of it.
What is your name Brother?
i've done it's working but now i cant switch forms without the login popping out again...
great job!
Pls help me how to do it with wamp server.
what to insert if I want to add a back button in form2 to form1?
this.Hide();
Mainmenu mm = new MainMenu(); // I GOT ERROR IN HERE //
mm.ShowDialog();
Thanks that helps alot
\
The zoom combined with the scrolling about makes this more difficult to follow than it could be.
Sir! Please tell me how to pass many values from one form to another form
best video quality... 360p
Thank you a lot!
anyone can tell me how to same template design on other form class???
too clumsy.
nebesvaik
Do not keep this tutorial in mind. It is really bad. Use events to pass data between 2 forms.
What do you mean?
You completely fucked my program by mixing up which form was receiving the value. I had to start over from scratch. Thanks.
f
The content is very helpful and I was need to watch this video. But rotating your cursor drives me crazy. I was diverting my eyes to another side not to see it but... I need to see what u`re doing there. Sorry. But for me it`s impossible to watch all your videos. They`re too annoying...
gooooooooooo toooooooooo arrrrrrrrrrrrrrrrrrr what the fuck***
You talk so slow
if the video is too slow or fast you can adjust the video speed. Lower right screen, click the gear...
Thank you so much...
thanks a lot!