Saltar navegación

Activa JavaScript para disfrutar de los vídeos de la Mediateca.

Módulo Aplicaciones Ofimáticas - Trabajando con Word - Vídeo 3 - Contenido educativo

Ajuste de pantalla

El ajuste de pantalla se aprecia al ver el vídeo en pantalla completa. Elige la presentación que más te guste:

Subido el 5 de octubre de 2024 por Mario S.

70 visualizaciones

Empezando a trabajar con UserForm y Macros.

Descargar la transcripción

Well, now what we are going to see is how to work with the maps and how to put programming code in the form, the creation of the form. 00:00:01
To do this, we have to have the active programming tab, which by default does not come. 00:00:12
Well, we have to go to active, we have to go to options, and in options, in customize, select options. 00:00:19
So here you will have the Programmer or Developer tab, which are more or less ancient versions, 00:00:29
is now activated. If you activate it, you will be affected. 00:00:39
So this Programmer tab has to appear. 00:00:43
When we enter the Programmer tab, it shows us, as it can be otherwise, 00:00:46
There are different tools that are inside or that will serve the web programs. 00:00:52
Those tools are interesting to do different things. 00:01:00
We have started to use them with Edipal. 00:01:08
What it does is show us an editor to create applications that are like Formulaski. 00:01:13
I open this window, I can start to create the forms and then use them as if they were applications independent to the work, 00:01:20
although the engine to which it functions is the work, although it does not serve the work that would be there below. 00:01:37
Well, what do we see here? We have come to this second button that says Insert User Phone, and we click on User Phone, and then it shows us this. 00:01:47
Remember that depending on the version, they give some colors or others, but in the end it is the same. 00:02:02
What do we have here? A form, a user form, that can have the size you want, 00:02:09
that as it is selected, it has here a series of properties, okay? 00:02:16
That would act on it, for example, if I change the caption, okay? 00:02:20
Well, we are going to change this title to user form, right? 00:02:27
So, there we can put it, well, Formulario SMR1B, 1B, for example, and here it has one more title, and if we give it to execution, 00:02:30
I will show you how, the window that I am creating for myself does not have anything, but the title already puts me Formulario SMR1B, okay? 00:02:48
Well, then I have this tool box, this tool box that activates or deactivates with this little button here, the tool box, see? 00:02:57
If I press it now, it doesn't appear, and if I press it again, it doesn't appear anymore. 00:03:08
The tool box, when we are doing the form, when we are drawing, it is missing because it is where we have the different tools that we are going to use to create this form. 00:03:14
We have labels, we have effect boxes, we have lists, we have options, boxes, or options. 00:03:26
Remember that the difference between boxes and options is that with these that are square, 00:03:36
you cannot select any or any options, but with circular sections there can only be one option selected at all times. 00:03:44
For now, we think that we can play with the tabs, with the text boxes and with the buttons. 00:03:54
The buttons, okay? 00:04:04
The command button, okay? 00:04:09
Well, we're going to play with them. 00:04:12
We're going to make a form, 00:04:14
that covers the name, the last names, and that's it. 00:04:18
and then a button because it shows us this by a window, that is, by an emergent window. 00:04:22
You have to remember very much that when you select one of the objects or the form itself, 00:04:30
or one of the objects that are inside the form, 00:04:36
the properties of those selected objects will appear to me, 00:04:40
and they are the ones that are not going to change from the code. 00:04:44
When I'm drawing it, I can do it directly in this window, but we can also do it in the code. 00:04:49
So it is very important the name field, it is very important the caption, the text, the value, the label that we have seen, ok? 00:04:59
we are going to put the name 00:05:08
I'm going to say lvl name, okay? 00:05:20
And it gives me a name, it does not do anything like that, this is only for programming, for when we are programming, okay? 00:05:26
I'm going to say in the caption that instead of caption, this is what we are showing inside. 00:05:33
Instead of label1, I'm going to say, well, put name, okay? 00:05:39
Because I want the user to see that you have to put it in a box and then we are going to put it now in continuation. 00:05:45
I can change the font in the home variable. 00:05:52
We can tell it from this button that appears here with three dots and you press it and it tells us, well, the font tells us the font style and tells us the size. 00:05:59
Well, let's put it, for example, at 16, see? 00:06:11
I'm going to make it bigger. 00:06:14
I adjust the sliders in this field and I already have it. 00:06:17
Now we are going to put a box of text to put a picture in the text. 00:06:24
This is the third one. 00:06:28
I adjust it and we are going to put it here. 00:06:30
Okay? 00:06:33
So, in the name, we are going to put this. 00:06:34
Okay? 00:06:37
And we are going to change the name again, if it is selected. 00:06:38
I'm going to change the name, and since this is a textbox, I'm going to call it xtxt, and I'm going to call it name, because that's where the name is going to be saved, okay? 00:06:41
What are we going to say? Well, the source, as we have done before, is xtxt, so that it also puts there what the user wrote to xtxt, okay? 00:06:51
I'm going to play with the label, I'm going to play with everything, okay? 00:07:00
So, now I'm going to select both, okay? 00:07:03
I'm going to press Ctrl-C to copy it. I click on the form and press Ctrl-V, then I have it here duplicated with the format I gave it. 00:07:07
The only thing I have to do is change the name. I want it to be called LLL . 00:07:21
And, instead of writing the name here, I want the caption property to put last names. 00:07:31
So I already have last names, so the last names of this box needed more size. 00:07:40
And to this box I'm going to call it txt-last names. 00:07:48
So we have, on one side, lb-last names, and on the other side, txt-last names. 00:07:56
I'm going to take this name and I'm going to put a button on it, a button that is going to make us visualize a text box in the people, 00:08:02
this name and this last name, something like that. So we're going to tell him, on the one hand, the source, I'm going to tell him that it's the same size because in the end, 00:08:14
In the end, this is an interface and everything must have a similar appearance, so I'm going to put this size, I'm going to change the caption so that it doesn't look like an umbrella, I'm going to put a change, okay? For example, and I already have it, so now what I'm going to do is I'm going to modify this formula a bit, I'm going to select it, I'm going to give it, for example, a lower color. 00:08:26
I want this color to be a palette, we are going to put a yellow on it, for example, I want the edge of the color, a style edge, we can put a style like this, 00:08:54
That's a bit like, hey, when you see how here it makes it flat between the yellow and the blue, when I change it, it gives it like a border, see? 00:09:14
Well, I'm fixating it because I can't do anything or do anything wrong, okay? 00:09:23
I want to adjust it a bit because I don't want to perform anything, okay? 00:09:30
For example, something like this, okay? 00:09:34
We could put an image in it, for example, okay? 00:09:36
Okay, well, what we can do there, we're going to go to the image, I'm going to put it here, and in the image, in picture, in the image, we're going to do it here, I'm going to say, well, look for an image, that's fine, okay? 00:09:41
and we are going to tell him that 00:09:58
we are going to put 25 00:10:03
we are going to tell him 00:10:13
let's see if it works 00:10:19
I'm going to turn it off 00:10:23
I'm going to say that we get this, I'm going to put another one, there it is, okay, so from here I can already tell it not to put this size or the size that fits here, okay? 00:10:29
Well, in the end, the idea is that I can go drawing, I can go to this form, and when you see it, you have your form, and this doesn't do anything, right now it doesn't do anything, I mean, I can write, but it's not doing anything at all, okay? 00:11:12
When you see, for example, that this name is asked, it will be ugly with this gray square, we are going to change it. 00:11:31
So we are going to select this object, we are going to say pathcolor, and in the pathcolor we are going to say palette, and we put this, and in the name I do the same, pathcolor, palette, and the same, okay? 00:11:37
you have to have the form, not one of the two concepts in it, you close it, you have the form, you give it the way you want, 00:11:53
Now, what we want is that when we press the button, everything that is written there, the name and the adjectives have to appear in a window in the screen. 00:12:13
We are going to put the other adjectives that are now in the space, and that is going to appear in one of the adjectives. 00:12:28
So, if we are going to capture this event, and what is an event? 00:12:34
An event is something that happens in the system. 00:12:47
That is, the event can be when I click on a button, or it can be when I change a text in a text box, 00:12:50
When I move the mouse, the mouse cursor over an object in the control area, there are different elements that will take over the system and that we can control. 00:12:58
Well, what we are going to use the most, 90% is the click when we press a button. 00:13:11
So what I'm going to do to capture this is double click on top of the object, in this case of the button, and that's going to take me to this window, which is where we start to insert the code. 00:13:24
And here we have talked about several things. We have talked about that if we put a line that starts with DIN, we can declare a variable. 00:13:36
For example, I'm going to declare the variable 1, the first variable, which is the type or the common, and then here I have several types. 00:13:45
There are some strings, there are other strings, which is to save the number, the string is to save a string of indexes, which I would always have here in my library. 00:13:56
The integer is to save a number. We also had the grano, which I have here below, which is to save a sí or a no. 00:14:07
We can use different variables, and we will use them little by little. 00:14:19
Remember that we are going to put this boolean, and then I will not miss anything. 00:14:25
Notice how it puts the text in blue, which is mandatory in this case, the bin, which is the one that says to the system that it is a variable, the a, which is to tell it, this variable that I have given it this name, the one that you want, is going to take the form of boolean, okay, of boolean, which means that the system knows that within this variable it is going to give a true or a false, a true or a false. 00:14:31
And what are we doing? Reserving a space in the disk to save this value and be able to access this space through the name that we have given to the variable to access if it is real or not, right? 00:14:59
We declared the variables here. We have used the conditionals, okay? 00:15:15
I, for example, here, I can say, let's see, yes, yes, variable 1 is equal to true, 00:15:22
you see how already, as I have said, it is boolean, already by putting the equal, it tells me, 00:15:32
I can only choose between these two values, so in this case I'm going to say true. 00:15:37
We are going to put msgbox and a text that is going to be the variable 1 is to true. 00:15:42
If this does not come together, the s, remember the s, msgbox the variable 1 is to false. 00:15:59
and I finish the conditional with the end 00:16:18
well, then look, this structure we have also seen 00:16:22
what is the first thing I need to say? what variable has 00:16:26
what value does this variable have? variable 1 00:16:30
is the same, for example, I'm going to put a hash 00:16:34
I say hash, so when I go to the conditional 00:16:38
remember that the conditional either does what is between the if and the else 00:16:42
always after evaluating this question that we are doing, to make it easier, maybe if you put it between relatives, it will be easier. 00:16:46
This is a question, it's the same, it could be a major, a minor, a minor. 00:17:03
There are types of questions that are going to return me a false answer. 00:17:07
In this case, there may be one order, but there may be several. 00:17:11
In other words, you execute all the orders that are between B and L. 00:17:16
If, on the contrary, this question turns out to be a false one, then you are going to execute all the orders that are between C and L. 00:17:21
In this case, that's it. 00:17:30
And this is what we execute. 00:17:33
And now it doesn't do anything, it shows me this, it doesn't do anything because we have controlled the event of clicking on the button, so as it had not clicked, it doesn't say anything. 00:17:36
I'm going to press it, so what does this tell us? Why does it say the variable 1 is false? Why? Because we have put it up to false. 00:17:47
So, the I is a control structure to control what a variable keeps. 00:18:01
If it were not a boolean or a string, we would have to ask if the variable 1 is equal to a car. 00:18:08
So, they visualize it like this. No, they visualize it differently. 00:18:14
So, we have seen this, these control structures that we have seen, the declarations of variables that we have seen. 00:18:18
But in this case, we are working with the form and we are working with objects. 00:18:25
Ok, so I'm going to go to my page. 00:18:30
What's the only thing I need to do here? 00:18:34
Well, when you press the button, 00:18:37
pay attention to how it is controlling the click event, 00:18:42
and that's why it gives me the name of the button, 00:18:46
which I haven't changed yet, it's the command book number 1, ok? 00:18:49
This is what I'm going to do, I'm going to have changed it, 00:18:52
and I'm going to have put cmd, pulsar, or something like that. 00:18:55
And the system only shows this background and this click. 00:18:59
This click is because it is the event that I am trying to control. 00:19:03
If you look up here, there is a list that shows me the different objects that are in the form, 00:19:08
and another list that shows the different events that we can control on this object, 00:19:17
like the command button, for example, it has the click, it has the double click, it has the enter, it has the key down, it uses the key, there are different events that we could calculate, in this case it is the click, we put the msg box, and here I am going to say, first a string, hello, hello, space, and how do I connect the different strings? 00:19:24
we are going to put what we have in the box 00:19:54
name and that's why it's important that you give it a name, okay? And to this we have called 00:20:01
that there is a name and when you put a point they appear all the same, they appear in the same way, right? 00:20:08
In this way that I can catch them. If I want to catch what is written here, I'm going to say the light, okay? 00:20:13
And now we are going to put a plus and we are going to say with the wallet also a white space, another plus 00:20:21
and we are going to say, take me also the .dxtApellidos. 00:20:30
the same value. 00:20:37
It says, it is expected to be separated by the list. 00:20:39
It is telling me that I have not put, I have not closed this parameter. 00:20:42
Okay, so now, if I run my form, 00:20:47
okay, if I give it the black button, it will appear, hello! 00:20:53
And then it appears in white. Why? Because we haven't written anything and we don't have these text boxes. 00:20:59
And remember that what we have done has been concatenating the Hola, then the name, and then the last name. 00:21:03
In other words, we have concatenated the text columns in one. 00:21:09
Okay? So, let's put here, for example, Mario Santos Revolve. 00:21:13
Okay? I give it a click, and now it says, Hello, Mario Santos Revolve. 00:21:21
So, it has taken the different text chains that we have passed, 00:21:27
it has added them and it has created a scene with all these text chains. 00:21:31
And we have created this screen. 00:21:36
Now, this video is already 21 minutes, so I'm going to stop it, 00:21:39
and in the second we will continue working with the remotes, 00:21:43
playing with the input box, remember, to collect virtual data, 00:21:46
and doing some things better with the conditioner. 00:21:52
Bye. 00:21:56
Bye. 00:21:56
Bye. 00:21:57
Bye. 00:21:57
Idioma/s subtítulos:
en
Autor/es:
Mario S.
Subido por:
Mario S.
Licencia:
Dominio público
Visualizaciones:
70
Fecha:
5 de octubre de 2024 - 20:25
Visibilidad:
Público
Centro:
IES VILLABLANCA
Duración:
00′ 04″
Relación de aspecto:
1.78:1
Resolución:
1920x1080 píxeles
Tamaño:
56.92 MBytes

Del mismo autor…

Ver más del mismo autor


EducaMadrid, Plataforma Educativa de la Comunidad de Madrid

Plataforma Educativa EducaMadrid