Replies: 9 comments 18 replies
-
Form1 is a type. You must refer to fForm1, below is the definition: |
Beta Was this translation helpful? Give feedback.
-
Ok, , where would that go? |
Beta Was this translation helpful? Give feedback.
-
By default, this is already there:
|
Beta Was this translation helpful? Give feedback.
-
Ok, I can see that code in the form1 constructor. So, I am still at square 1. If that is the code I need to make this work and that code is already there.... Then why can't I change the form1.text ? |
Beta Was this translation helpful? Give feedback.
-
Thank You, thank you, thank you. Can I get a little more info on what the lower case f in "fForm1.text" is for? |
Beta Was this translation helpful? Give feedback.
-
Anatomy of a Form1.frm codeEvery form has a template code for the beginning when you add a form in your project.
First we have a preprocessor check to test if the code runs in windows. If it is, then we order to compile also Form1.rc file.
After that we have the Region form code.
After we have the Form1 type which extends the Form type.
Next, we have the object's constructors.
After that we define an object var for the type Form1. This var has the name fForm1.
After that, we have the app section where we run the app and show the form.
Below this section the IDE adds event subs |
Beta Was this translation helpful? Give feedback.
-
I am so confused. I have tried a few things with this. I can change the label on a button.
CommandButton1.text = "Hello" works
But I can't change the label of a form
From1.text = "hello"
doesn't work
Form1.capttion = "hello"
doesn't work.
I get compile errors like "error 214: Member isn't static" or "error255 Ambiguous symbol access. Explicate scope resolution required, found "text"
Neither one of those mean anything to me and I haven't been able to find any information using google. Is there any documentation at all for these forms, widgets? I'm not sure I understand what the difference between, Text, and Caption. But it works for the command button but not a form. It would seem to me that it should work the same way as the text for the button.
Frustration aside. I have been able to do some simple loops and math with output to the terminal. Overall I am really having fun. But being a newbie my ability to understand the problems and troubleshoot them is very limited.
Beta Was this translation helpful? Give feedback.
All reactions