C# calling forms
-
Wrong. I have a C# Windows Forms application that I executed that code in before I posted it to you. I am trying hard not to insult you ( no comments needed from you Pete :-D ), I really mean it sincerely when I suggest you need to use a beginners book. There is nothing wrong with that, I still have shelves of them at home from when I started and I still have to look things up in them almost 20 years later! :laugh: It's a never ending experience learning about development but we really need a foundation to work from.
led mike
led mike wrote:
I am trying hard not to insult you ( no comments needed from you Pete ),
Moi? Little ole moi? Would I...?
Deja View - the feeling that you've seen this post before.
-
Funky as in classy shaped icon. No insults there - just 3 MVPs chewing the fat.
Deja View - the feeling that you've seen this post before.
Which leads to another question: did/does CP ever explain what MVP stands for? it could be many things, Most Vertical Primate being one of them. :)
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.
-
Which leads to another question: did/does CP ever explain what MVP stands for? it could be many things, Most Vertical Primate being one of them. :)
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.
-
Which leads to another question: did/does CP ever explain what MVP stands for? it could be many things, Most Vertical Primate being one of them. :)
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.
I'd like to think it's Most Valuable Professional, but in my case it could be Madly Vocal Pessimist.
Deja View - the feeling that you've seen this post before.
-
Luc Pattyn wrote:
did/does CP ever explain what MVP stands for?
I don't know about yours but my award stands for Most Valuable Puke. I wanted Most Valuable Cookie Tosser but Chris said John Simmons already had that.
led mike
it seems to me we need another editable column in the database, so we can personalize this. And in a couple of weeks the friday quiz question: given 40 MVP names and 40 titles, who is who? :)
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.
-
I'd like to think it's Most Valuable Professional, but in my case it could be Madly Vocal Pessimist.
Deja View - the feeling that you've seen this post before.
I didn't see you as a pessimist :doh:
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.
-
so in other words you dont know thanks lol
No. He is telling you to get a book and learn.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
-
well the fuction he is trying to tell me to use is Visual basic function try it your self works fine in VB but not C++ or C# which i was asking about
The
Show
method works just fine in both C++.NET and C#. I use it every day :rolleyes:"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
-
so in other words you dont know thanks lol
Gregory Bryant wrote:
so in other words you dont know
Look at the icon, man! He's an MVP, dude!
Upcoming FREE developer events: * Developer Day Scotland Recent blog posts: * Mixins in C#3.0 My website | Blog
-
in c# i created the first form as a login the second displays a buddy list once you login the first form is hiden using Form1.hide(); now on the second one i have a log out button that i want to close the second form and open the original first form not a new object i have everything done but reopening the first form. thank you if you can help
Since you couldnt help here is how you do it declare a public, static variable of type Form1 just below the Form1 class declaration. I’ve named the variable frm1 public static Form1 frm1 = null; then when you show form2 frm1 = this; this.Visible = false; Form2 frm2 = new Form2(); frm2.Show(); then from form2 you can call Form1.frm1.show(); so thanks for all your help lol
-
Gregory Bryant wrote:
so in other words you dont know
Look at the icon, man! He's an MVP, dude!
Upcoming FREE developer events: * Developer Day Scotland Recent blog posts: * Mixins in C#3.0 My website | Blog
Another one. What happened to the normal people? They are supposed to run in the millions. :-D
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.
-
Another one. What happened to the normal people? They are supposed to run in the millions. :-D
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.
Luc Pattyn wrote:
What happened to the normal people?
Ahem, I've barked at the OP a few times :rolleyes:
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
-
Luc Pattyn wrote:
What happened to the normal people?
Ahem, I've barked at the OP a few times :rolleyes:
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
Sorry, I forgot about your daily show... :laugh:
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.
-
Sorry, I forgot about your daily show... :laugh:
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.
It's okay :laugh:
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
-
Since you couldnt help here is how you do it declare a public, static variable of type Form1 just below the Form1 class declaration. I’ve named the variable frm1 public static Form1 frm1 = null; then when you show form2 frm1 = this; this.Visible = false; Form2 frm2 = new Form2(); frm2.Show(); then from form2 you can call Form1.frm1.show(); so thanks for all your help lol
http://www.codeproject.com/KB/dotnet/passingvaluesbetweenforms.aspx[^] by Colin Mackay could be helpful for you :)
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
-
i am trying to open the first form from the second that does not work i get an error An object reference is required but i dont want to creat a new object and i do not know how to get the orginal object from my second form
-
so in other words you dont know thanks lol
No, in other words, you plainly have no idea what you're doing and should learn some basics before wasting all our time asking questions you don't understand the answer to.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Since you couldnt help here is how you do it declare a public, static variable of type Form1 just below the Form1 class declaration. I’ve named the variable frm1 public static Form1 frm1 = null; then when you show form2 frm1 = this; this.Visible = false; Form2 frm2 = new Form2(); frm2.Show(); then from form2 you can call Form1.frm1.show(); so thanks for all your help lol
Wow - that's some nasty ass code. Can I make a few suggestions: 1 - buy a beginners book before you become more entrenched in the really bad habits that you're currently forming. Otherwise, your code will always suck as much as this code does. 2 - try to use real variable names. form1 and form2 make sense on your first day of coding, they are not workable in a real project Seriously, you come here, ask for help, complain when you get it, and then you're all proud because you found a way that frankly, belongs in the coding horrors forum.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Since you couldnt help here is how you do it declare a public, static variable of type Form1 just below the Form1 class declaration. I’ve named the variable frm1 public static Form1 frm1 = null; then when you show form2 frm1 = this; this.Visible = false; Form2 frm2 = new Form2(); frm2.Show(); then from form2 you can call Form1.frm1.show(); so thanks for all your help lol
That's one seriously bad piece of code. Why do you think yours is better than the solution I posted above? Let's see - I've been in this industry over 20 years, and have extensive experience in developing applications including using patterns to develop robust systems - and you? Well you accept default form names. Nuff said.
Deja View - the feeling that you've seen this post before.
-
I'd like to think it's Most Valuable Professional, but in my case it could be Madly Vocal Pessimist.
Deja View - the feeling that you've seen this post before.
Pete O'Hanlon wrote:
but in my case it could be Madly Vocal Pessimist.
If the award was for that, it would be much easier for me to win one. In fact I would probably have top honors. ;P
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)