I’ve developed a VB6 application. Now I want to disabled resizing the form. I know there is a property Border style, which changes to fixed single, can do my work. But I want minimize button to my form. Minimize button is only in “Sizable” mode. I changed another property MaxButton to false. When I run my program, still I can re-size the form.
Please tell me how to disable resizing the Form.
Can't you just set the "MinButton" property to true on fixed-single border form. I can in my version of VB6.
Related
Is there a way, after selection of a color, to programmatically hide the color picker of the TComboColorBox? I've searched on the web and Embarcadero community but couldn't find a way to do this.
The answer is no, there is no designed way to hide (collapse) the popup programmatically. And you did not explain why you think it would be necessary to have.
Keep in mind that there are 4 subcontrols, that the user may want to use:
a THueTrackBar,
an alpha channel trackbar,
a color quad, and
a hex color value edit box.
An automatic collapse of the popup would be just annoying.
The user can at any time decide to close the popup simply by clicking on the constantly visible bar.
With reference to your comment:
After your answer, I realized that I must implement a color picker component that shows a rect containing a TComboColorBox and a TButton as childs. Clicking the child button, in turn, hides the container rect itself.
I have told you twice that the user can close the popup part of the TComboColorBox simply by clicking on the component (the base part of it).
In fact, the user can click anywhere outside of the popup window in order to close the popup window. The popup is closed immediately when the focus moves away from it.
In my opinion there's no need for a special "Close" button.
I'm currently working on a project that utilizes an MDI Form. What I would like to achieve is that when the user hovers over one of the menu options in the MDI menu, a ToolTipText appears describing what can be found in said menu. I'm aware of the fact that in some options for VisualBasic 6, ToolTip is supported. However, I can't seem to add this to the MDI Form, or add a label control for that matter. Has anyone ever run into this problem, and if so, is there a workaround or a solution?
Please let me know if you have any additional questions or comments. Thank you in advance.
I'm not aware that any true menus on a VB6 for (even non-MDI) have a tool-tip property; hence, neither does the MDIForm when one its child forms has its menu displayed.
However, there are a few controls that can be put on the MDI parent form. The most useful of these is probably the PictureBox, into which you can then place any type of control, such as CommandButtons. It must be "docked" to either the top or bottom of the MDIForm, using the PictureBox.Align property. Controls within the PictureBox can be located any way you wish, and can have their normal ToolTip properties set.
Another MIDForm-usable control that I've had good luck with is the ToolBar control, which comes in as part of the CommonControls component. Like the PictureBox, it has a .Align property to set it to the top or bottom of the MDIForm. You can put any reasonable number of "buttons" on it, and have reasonable control over their appearance (graphics, etc.); apropos the OP's query, you can assign a ToolTip to each button. It wouldn't be difficult to have the buttons change depending upon the currently-active form, just as the MDI menus normally do.
One other alternative that can be considered (but may be quite tedious to implement) could be reading the Mouse.X and Mouse.Y properties for each MDI menu and setting the captions of a Label control (or TextBox) using the Mouse Hover event.
You'd need to find the top left and bottom right points for each MDI menu and if it is within the box, you can show your label control with the intended caption. But note that you can't just put any controls on an MDI Form except maybe PictureBoxes, Toolbars and Coolbars, etc.
So the Label or TextBox control would have to be first placed on top of a PictureBox control which can be top aligned.
I'm making an FMX app for Win32 (one form only) with C++ Builder 10.2 update 3. How can i change the form's background from grey to white? I can't edit the form's style like i can other controls.
I tried the following based on this but it had no effect.
Form1->Fill->Color = TAlphaColor(TAlphaColorRec::White);
I know i can just add a TRectangle to the form (aligned to client with HitTest false) and just set it's color. But i'd rather just use the form itself if not overly complicated.
thanks,
russ
In Lazarus, once you undecorate a form, how do you decorate the form again. To Undecorate, all you do is right click on the form's title bar on the top. Then, click on Un/Decorate option. At that point title bar disappears. Now, how do you undo or decorate again? There seems to be no option anywhere in the Lazarus IDE that I can see.
While I'm not familiar with this method of "undecorating" a form, the way you can specify whether a form has a title bar is through the form's BorderStyle property. Select the form in the object inspector and set the form's BorderStyle to bsNone to cause the form to be displayed (when the program is running) with no border or title bar. Setting it back to bsSizeable will cause the form to have a normal border and title bar. There are other options you can try that affect whether the form is sizeable and the type of borders it has.
These options may have slightly different meanings on different platforms under different widget sets.
I've made a custom sheet and it appears and disappears as necessary. However, the sheet includes an NSForm that disappears when automatic cell resizing is disabled.
When "Auto recalculate cell size" is enabled, the form appears but the form's cells are not sized properly.
Has anyone had this problem before?
The problem was with auto layout. I just disabled it for the sheet. Worked fine after that.