Hello everyone! Here I will collect a library of controls (OCX), along with the source code as free time. All controls support Unicode. PS. Especially test I have no time, so I will be glad if someone would report bugs me.
Control - button. Support translucency and 32 bit icons. The theme used a picture from 10 states of the button. The sequence of states as follows:
Average depressed;
When the mouse depressed;
Average depressed in focus;
When the mouse depressed in focus;
Depressed inactive;
Normal press;
When the mouse pressed;
Average pressed in focus;
When the mouse pressed in focus;
Pressed inactive.
States disposed vertically:
Picture themes can contain an alpha channel. To support different scales I decided to make scalable and non-scalable zone. For example, take one state:
Field of violet color remain unscaled and located at the corners of control, red color stretch vertically and make right and left side, the green area - horizontal (upper and lower), the blue area is stretched along both axes and control fills the inside. The size of the boundary areas for simplification I made one value set properties Bevel. For example Bevel = 5 specifies the size of the outer regions 5 pixels. Button icons support, and 24-bit or 32-bit. It is also possible for each state to assign an icon for it as an icon to choose the same sequence and set the property MultiIcon = True. The position of icons on the text is customizable, you can put an icon on the left, top, right, bottom. You can also adjust the position of the contents horizontally and vertically. The distance between the edges of the control and between the text and icon set by property Spacing. To improve performance, transparency can be turned off (when the background is uniform), this is done by setting properties Transparent. Transparency works as follows: when you move a control, the picture below it is stored in the buffer, thus it is the background, so that if the background is changed, it is necessary to call SetWindowPos to synchronize background. Soft property specifies the mode of smooth rendering. The control supports additional mouse events (scroll wheel mouse care with control, approach control can sound like the story)
Control - checkbox. All properties are similar TrickButton. State are in the same sequence, only added more sosotoyaniya for Checked and Grayed, a total of 30 states.
For example:
It is possible to set the position of the flag property CheckPos, relative to the text.
Hi
Thanks for posting this code, its going to help me. I have one (perhaps dumb) question. In my IDE when I try to find definitions for things like IFont...they cannot be found. Seems they live i stdole2 ? Any idea why VB doesnt display them or seem to help me in anyway with them ?
Hello everyone! Here I will collect a library of controls (OCX), along with the source code as free time. All controls support Unicode. PS. Especially test I have no time, so I will be glad if someone would report bugs me.
I can not open the download link above. Could someone upload TrickButton to vbForums? Thanks very much.
I have downloaded the rar file
vbForums don't like us attaching anything compiled, so attaching it here is not an option.
If you PM me your email address, I will send it to you
(is rar OK, or do you prefer zip ?)
I have downloaded the rar file
vbForums don't like us attaching anything compiled, so attaching it here is not an option.
If you PM me your email address, I will send it to you
(is rar OK, or do you prefer zip ?)
Hi Bobbles, I have sent my email address to you, please check, thank you very much.
Hello everyone! Here I will collect a library of controls (OCX), along with the source code as free time. All controls support Unicode. PS. Especially test I have no time, so I will be glad if someone would report bugs me.
Hello everyone! Here I will collect a library of controls (OCX), along with the source code as free time. All controls support Unicode. PS. Especially test I have no time, so I will be glad if someone would report bugs me.