CHECK THIS OUT! How to Buy Website Domain & Hosting, Complete Simple Procedure kzbin.info/www/bejne/l16WhnmqZteSZ6s
@ricklangston88953 жыл бұрын
I just went through this two or three times and it feels like I just learned in six minutes what would've taken six weeks to learn from other "dry" tutorials. Again, good job.
@HassaanRaza3 жыл бұрын
thanks man! thank you so much your appreciation inspire us creators to do more 😁
@konichiwaya24483 жыл бұрын
this just answered 5 pages of modules, I've been fixing my project for 2 weeks! THANK YOU SO MUCH!!!
@HassaanRaza3 жыл бұрын
thats is super awesome to know! best of luck with you project.
@viniciusmachadovianna Жыл бұрын
This helped me with an issue I was facing about one whole week. I'm immensely grateful for this content, many blessings for you!
@HassaanRaza Жыл бұрын
thanks mate, keep going. good luck with whatever you are making :)
@warzonerustproject72273 жыл бұрын
I went through a lot of videos, not one did not work, I saw yours, checked it and immediately worked, thank you very much, you helped a lot
@HassaanRaza3 жыл бұрын
that's great!
@sumaidch11243 ай бұрын
Man, You made my Day
@mohamedhussein96793 жыл бұрын
THIS IS THE BEST!!! THANK YOU 3000! I have been looking for this for over 3 weeks now!
@HassaanRaza3 жыл бұрын
yup its a little tricky to figure.
@normal.2002 Жыл бұрын
After 2 years and i am here Thanks you Indian teacher
@HassaanRaza Жыл бұрын
haha that's awesome, cheers! by the way I'm from Pakistan (so not indian)
@normal.2002 Жыл бұрын
@@HassaanRaza ohh i am so sorry thank you my Pakistan teacher 🥰🥰
@HassaanRaza Жыл бұрын
hehe
@mahersabit92652 ай бұрын
how about when i click the button to open the other form the first form disappears or changed.
@zuratchankvetadze66468 ай бұрын
omg.. you help me a lot.. no blackbox no stackover... thank u man
@HassaanRaza8 ай бұрын
haha im glad i could be of help :)
@janstergaard703 Жыл бұрын
I usually have a hard time with Hinglish. But this time it was WELL WORTH it, thanks ! Also slowing the video a bit down helped a little bit ;-)
@BoorgPL2 жыл бұрын
Hi. I have a problem with the example given here. I have a Form object named EDF1 on the form I have public static cmdrName, shipName_z etc. So I have this code in EDF1 form: public static EDF1 instance; public Label cmdrName_z; public Label shipName_z; and instance = this; cmdrName_z = cmdrName; shipName_z = shipName; Then in the second class project file I have a function public void read_file (string changeFile) in which I read the changes that appeared in the file given as "changeFile". If the change is significant, I enter it into the element on the EDF1 form with the code: EDF1.instance.cmdrName_z.Text = newValue The problem is, I get an exception once in a while: "Invalid cross-thread operation: The 'cmdrName' control is being accessed from a thread other than the thread on which it was created." This exception was originally thrown on this call stack: System.Windows.Forms.Control.Handle.get () System.Windows.Forms.Control.WindowText.set (string) System.Windows.Forms.Control.Text.set (string) ED_Informator.Jurnal.read_file (string) in Jurnal.cs ED_Informator.EDF1.OnChanged (object, System.IO.FileSystemEventArgs) in Form1.cs System.IO.FileSystemWatcher.OnChanged (System.IO.FileSystemEventArgs) System.IO.FileSystemWatcher.CompletionStatusChanged (uint, uint, System.Threading.NativeOverlapped *) System.Threading._IOCompletionCallback.PerformIOCompletionCallback (uint, uint, System.Threading.NativeOverlapped *) Same appeal EDF1.instance.cmdrName_z.Text = newValue There are also two other functions, one of which is called to read some information from the most recently created change log file. The second pre-checks the file after creating a new change log file.
@fetrush63838 ай бұрын
Hi thank you i look for this method over 5 month you saved my life :D
@HassaanRaza8 ай бұрын
hahaha glad you found me XD
@rk81oman11 күн бұрын
Very helpful, thank you Hassaan!
@HassaanRaza11 күн бұрын
Yo welcome :)
@ricklangston88953 жыл бұрын
That was so cool. I've been hacking away at this for over an hour. This video was clear and straight to the point. Thanks. You saved me a lot of time. :D
@HassaanRaza3 жыл бұрын
that's great to know :)
@trevorloughlin14923 жыл бұрын
I kept finding programs opening multiple instances of form2 every time I transferred data, but this does exactly what I needed. Since I am using some hardware in combination with advanced mathematical processing to send messages back from the future, you will be first in line for the lottery numbers when everything is up and running. Thank you! I presume I can run a chart control using similar methods? There are so many charts in my program that one form is not enough.
@HassaanRaza3 жыл бұрын
yes you can, good luck with your worj
@mihailoradovanovic7283 Жыл бұрын
Ty so much! This helped me with my school work a lot
@HassaanRaza Жыл бұрын
that awesome :)
@dominikweclewski57533 жыл бұрын
Thank you so much. I looked for this for 5 days.
@HassaanRaza3 жыл бұрын
thats great to know :)
@thantsintun1004 ай бұрын
Thank you. Very clear and simple.
@tadehack_ctz Жыл бұрын
I'm not sure if you can help me but whenever I try accessing something from the other form it gives me this exception error: "Object reference not set to an instance of an object." public partial class FormConfig : Form { public static FormConfig instance; public TextBox tbCaminhoCadastros; //Constructor public FormConfig() { InitializeComponent(); instance = this; tbCaminhoCadastros = txtCaminhoCadastros; } } public partial class FormMain : Form { private void wathexSolutions_Load(object sender, EventArgs e) { FormConfig.instance.tbCaminhoCadastros.Text = "test"; } } The exeptions occurs for everything I try to access from "FormConfig" and not just for that textBox, it also happens when I try to access it from the "FormMain" Constructor too, are there anything I'm missing?
@sonr0xz Жыл бұрын
same
@OtsileM Жыл бұрын
The name instance does not exist in current context. Am using a multi document winforms with parent and child forms. Any suggestions?
@picexcelbi_ytb2 жыл бұрын
If i would like to share information from FORM to FORM2, by in this case. To appear in Datagridview from From2. It´s the same proccess?
@HassaanRaza2 жыл бұрын
yes, if i remember correctly its the datagrid.datasource which contains you can tranfer it the same way.
@francescosantone18582 жыл бұрын
Perfect tutorial 😍... You are saved my project
@HassaanRaza2 жыл бұрын
thank you :)
@Trexstudio12 жыл бұрын
it say this - System.NullReferenceException: 'Object reference not set to an instance of an object.'
@5awaga4 күн бұрын
Because you should open the form2 dialogue in the same time.
@ThisIsABadIdeaSrsly3 жыл бұрын
I have a question regarding example 2. Let's say I open multiple instances of "Form2" using "button1". If I write something on textbox2 and apply the change pressing "button change form2", will the label in all instances of Form2 change? Or will only the last opened form be affected? After a bit of experimenting, the latter seems to be the case, but I wonder if it's possible to make the change apply to all instances of Form2 instead of just the last one. If you have any ideas I'd like to hear them. In advance, thank you for your time!
@HassaanRaza3 жыл бұрын
form2.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace databtwforms { public partial class Form2 : Form { //list of all instance of form2 opened by form1 private static List instancesList; public Label lab1; //this constructor run only one time because its static for initialization of list static Form2() { instancesList = new List(); } public Form2() { InitializeComponent(); instancesList.Add(this); lab1 = label1; } private void button1_Click(object sender, EventArgs e) { Form1.instance.tb1.Text = "set by form2"; } //NEWLY CREATED METHOD public static void ChangeAllText(string text) { foreach (var item in instancesList) { item.lab1.Text = text; } } } }
@HassaanRaza3 жыл бұрын
inside form1: private void button2_Click(object sender, EventArgs e) { //USED THE NEWLY CREATED METHOD Form2.ChangeAllText(textBox2.Text); }
@HassaanRaza3 жыл бұрын
so bascially each time we are creating a form2 we are storing instance info in a list, and when its time to change textbox we are change all the instances textboxes
@ThisIsABadIdeaSrsly3 жыл бұрын
@@HassaanRaza Yes, this works perfectly for what I've been working on. Huge thanks to you! PS: My mom sends her thanks too!
@HassaanRaza3 жыл бұрын
hahah remember me in your prayers
@Kamil32-nq6be4 ай бұрын
Thx man, you really helped me a lot!!
@signaller2 жыл бұрын
Thank you so much i was trying to figure out how to do this!
@RasitTunc15 Жыл бұрын
Thank you my friend, you were very useful
@fitrahazizah72673 жыл бұрын
How about using com port in multiple windows? can you help me? I have to receive my data from com port in form2 and display it in my main form (form1)
@javasocketexception2 жыл бұрын
How am I supposed to get the form1 app on the add new items? I can't find it
@rashidselemani4752 жыл бұрын
Thanks sir for this tutorial, you help me a lot
@44D3N Жыл бұрын
Hi, I want to do this but from form1 I want to be able to hide form 2 using a button. So When you press a button on form 1 it will hide form2 something like (form2.Hide();) I have tried lots of ways and none of them are working
@Isamu10133 жыл бұрын
Hey great Video. I have a question when I create an instance of form 2 in the form 1 click event why can't I access methods/data using that instance name? Form2 newForm2 = new Form2(); string title = newForm2.getTitle; //This doesn't work and says that there is no getTitle function) and in Form2 I have defined public string getTitle() { return titleTextBox.text; } Using your way works perfectly just wonder why.
@HassaanRaza3 жыл бұрын
it will show up! string title = newForm2.getTitle();
@Isamu10133 жыл бұрын
@@HassaanRaza I had the () in the code just forget them here. The issue was I mistakenly made it Form newForm2 = new Form2() instead of Form2 newForm2 = new Form2() No idea how that happened.
@burakoranler66552 жыл бұрын
thank you for your helpfull videos, hope to see new ones too.
@HassaanRaza2 жыл бұрын
you're welcome, i am working on some good one that you'll see soon, its just hard for me to make time after work.
@khaibaromari81783 жыл бұрын
That was amazing, save me a lot of time
@nightskyblackx74223 жыл бұрын
I have a question. When I tried it, there was an error with the Show(). Is there something wrong with it?
@alikemalkulful2 жыл бұрын
Great Technic, Thank you very much. It saved me a lot of work :)
@HassaanRaza2 жыл бұрын
thats awesome :)
@semrasanlioglu2 жыл бұрын
Using the method in this video, I opened the serial port in form 1 and read the value from the serial port in other forms. But other opened forms do not work simultaneously. What can I do about this situation?
@enginargaming72623 жыл бұрын
Hello, I want a picture printed on one form and that picture to appear in the other. How can I?
@sgd192510 ай бұрын
thank you , I need it to my project
@000adrianelpiola000 Жыл бұрын
It is rare, but i have a warning about the posibility of being instance a null value. It has zero sense, and it doesn't does any damage, it is a curiosity.
@HassaanRaza Жыл бұрын
don't worry its just a stupid warning from vs2022, if you want to get rid of it use example Form? data type instead of Form
@000adrianelpiola000 Жыл бұрын
@@HassaanRaza yes i did, but after this everytime i use the instance the vs says something like the instance can be null. It doesn't matter, the trick works very well.
@timothylennryd2528 Жыл бұрын
Great help! Thank you for this video! ^^
@HassaanRaza Жыл бұрын
thats great, you're welcome :)
@sabuhiamirov2883 жыл бұрын
Hi i have question. how do send class data between multiple form?
@KaioPatrick3 жыл бұрын
Awesome, you made it so simple!!!
@manuelcornejo74052 жыл бұрын
Congratulations.Good job!
@HassaanRaza2 жыл бұрын
thank you :)
@beelogtv95492 жыл бұрын
How to save it in database? Like form1 data will show in form2 data and save it.
@abdulqahar9852 Жыл бұрын
how to insert and update data in just one button(save) in C# // I need some help
@stepbystep12702 жыл бұрын
for combobox instead of textbox how it will coded as puplic
@Cesar_Une2 жыл бұрын
I wanted to do this same command from a server to client, can you help me?
@DjSashaWaksOfficial Жыл бұрын
Great Video - Thank you very much :)
@HassaanRaza Жыл бұрын
you're welcome :)
@chathuskamahanama76063 жыл бұрын
Thank you very much 👍👍 very usefull
@Alexandra-jc5wc2 жыл бұрын
Is this what we also call "Code to call form"?
@HassaanRaza2 жыл бұрын
we saving the reference of the form then using it to locate the form that we need to change, don't know if it called by the phrase you wrote.
@Alexandra-jc5wc2 жыл бұрын
@@HassaanRaza oh i'm so sorry I thought this is it. I was having a hard time finding something like what I said. Can't even see what is this.
@muhammedareeb14643 жыл бұрын
You are a life saver man. Thank you!
@kurdishprogramming46982 жыл бұрын
Good💐💐💐👌
@PrivacyNProgramming3 жыл бұрын
help! i want to make an OS and in it, I tried to detect whether a program is closed or minimized so when I tried to make the "public TextBox tb1;" part, I changed it to "public Form calculator" and I tried to do the "tb1 = textbox1;" and it looks like this "calculator = Form.Calculator;" but it doesn't work, could you help? EDIT!!: i just remembered that instead of using the form name(Calculator.cs) for the same form(Calculator.cs), could have just typed in "calculator = this;" rather than "calculator = Form.Calculator;", still good video tho, its explains a lot of stuff i didn't understand
@HassaanRaza3 жыл бұрын
i didn't understood your comment, its really confusing
@davidkei2114 Жыл бұрын
Thanks All of your coding !
@FarhanAli-km5id3 жыл бұрын
Very nice 👍👍👍
@varishaaslam5632 жыл бұрын
Can u plz tell how can we close form 1 through form 2
@HassaanRaza2 жыл бұрын
we'll that's a good question, you will be needing the reference of form 1 in your form 2, you can get the reference by "this" keyword
@ΙΜΜυΝΙΤΥ Жыл бұрын
how would u do this with only one form active and the other hidden?
@med64022 жыл бұрын
you saved my life thank you so much
@HassaanRaza2 жыл бұрын
:) live safely from now on.
@ЧУДОЮДО-к9х2 жыл бұрын
Thank you from Kazakhstan
@HassaanRaza2 жыл бұрын
thanks for commenting brother, im from Paksitan :)
@riverofgolds2 жыл бұрын
How would I do this with radioButtons?
@martinqmtakacs41453 жыл бұрын
Thank you this helped me :)
@tetraldinodanatividademart424211 ай бұрын
very nice
@기린퇴물임3 жыл бұрын
oh thank you this video help me to solve my problem
@HassaanRaza3 жыл бұрын
its great to know!
@scrapylegit46903 жыл бұрын
my problem is for me that i cant figure out how to use a public vector in 2 forms?
@HassaanRaza3 жыл бұрын
make a new class put a public static vector there than you can use it in all forms
@scrapylegit46903 жыл бұрын
but how do i that? im new to this?. is it easy?
@HassaanRaza3 жыл бұрын
I'll make a video on it this weekend if you can wait.
@onurtimur5242 жыл бұрын
Great Job Bro Adamsın
@aliardi4859 Жыл бұрын
Bonjour merci beaucoup 🌟🌟🌟🌟🌟
@xxjaxxful3 жыл бұрын
Best solution ! Thanks
@SadamKam2 жыл бұрын
bro first of all, thanks for the tutorial .. how about calling the form directly without creating an instance of it . inside form2 .. form1.textbox1.text .. what's wrong with it .. with all do respect .. it doesn't make sense to me to create multiple public variables in order to get data from the parent form .. I've been doing this for entire my life ..
@HassaanRaza2 жыл бұрын
form1 is not static, so you need the exact instance of form1 to work on thats why its important to create a variable. (the variable store the exact instance of form1) that we want to change.
@andrearruda90052 жыл бұрын
Thank you So Much!!!!!
@shiro5410 Жыл бұрын
amazing
@MarethaNurAzizah Жыл бұрын
omg thank you so much man
@jaimeelipascua85282 жыл бұрын
thanks for this..
@rafaelrodriguessilva99942 жыл бұрын
Thanks for the vid
@guanyuren3008 Жыл бұрын
Thanks really a lot!
@sonhong62532 жыл бұрын
great
@mustafakemaltaskn4303 Жыл бұрын
Thanks bro.
@irenecarlotto29822 жыл бұрын
THANKS FOR THIS
@pako_tube68982 жыл бұрын
thank you sir
@hamzaaitbrik2 жыл бұрын
Thank you!
@sinarbitonlineservices65 Жыл бұрын
Thank you
@IvanSchob3 жыл бұрын
thanks it helped
@Maolana_ModiG Жыл бұрын
thanks mate
@smoua45883 жыл бұрын
You are God. Thanks!
@HassaanRaza3 жыл бұрын
just a servant 😉 of God.
@nafisahamid386710 ай бұрын
Hello
@charlyflu97002 жыл бұрын
I fucking love you
@HassaanRaza2 жыл бұрын
haha, nice!
@agressive80503 жыл бұрын
I love u im a man btw lol
@HassaanRaza3 жыл бұрын
;D its brotherly love then.
@ThaoMeoTV3 жыл бұрын
Singleton.
@a2ei7502 жыл бұрын
Hello Thank you for your Help, do you have the solution with VB.NET
@HassaanRaza2 жыл бұрын
same thing will work for vb, whats the issue?
@a2ei7502 жыл бұрын
I'm trying to do data transfer between two forms with VB.NET using a show method, I can't find the solution.