As I said in the title, I encountered two problems, with the resizing action of the Form!
They would be the following:
The first is that I have made a scrolling (as is used to do) with two Pictureboxes (one of which scrolls into the other).
I have added two ScrollBars (vertical and horizontal), and I have set them for the positioning and for the dimensions; but I can't understand where the problem arises (in particular, in horizontal scrolling), following the instructions regarding this operation, when I resize the Form, the value of the bar no longer corresponds ...
I'm working on it!
The second, however, is that in the same project, I created a frame, in which I inserted a Textbox (or a Label; I saw that the same thing happens!): How do you make the Textbox resize according to to the size of the Frame (it seems to me that the measurement 'scales' do not correspond)?
I'm not really sure what you are asking in terms of scalemode. Just keep in mind that scalemode does not change the size of anything. It is just a setting that allows you to use a different base measurement. The default is twips but you may want to use pixels changing the scale mode does not change the size of the control it simply changes the scale of the values. If you want controls to resize then you have to write code that resizes/repositions them as needed.
Command 1 size is not in pixels. showing a width of 1935 compared to 161.25 on command 3
You also forgot to use the math for the height so if the scale was correct it would not show as it would be past the bottom of the frame.
Command 2 uses math based on command 1 which is a much higher value due to scale and causes it to be drawn off screen.
command 3 math does not use scale width so it is also drawn off screen
DataMise, I actually did this example on the fly, just to show you what was happening ...
But only now that you pointed it out to me, I saw that one of the problems arises from the fact that the control is linked to the Frame: I hadn't noticed that it changed automatically, once created inside it!
And, Argus19, "Screen.TwipsPerPixelY" etc., I hadn't really taken it into consideration, as I thought the two measures were enough!
Anyway thanks!
Now I'll try again, in my program, and let's see what effect it has, also on the other controls !!
How is it possible (if possible), to set a Label or a Textbox in Pixel or Twips, within a Frame, if you don't want to use the Argus19 method !?
Twips is the default mode. You only run into the types of issues you were having when you change this to something else.
I wasn't aware until I looked at your project that the controls in a frame do not get the forms scalemode but then I rarely ever use anything other than twips for my forms so I have not had any issues with it.