dcsimg
Results 1 to 16 of 16

Thread: [VB6] ShapeEx: Shape control replacement

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2017
    Posts
    1,932

    [VB6] ShapeEx: Shape control replacement

    It is windowless, as the original.
    It can be used as a direct replacement of the original VB-Shape control (by manually editing the *.frm source files... for the one familiar with doing that).

    Perhaps the main feature over the original control is that is is antialiased. It means that the shape is rendered with more quality:

    Name:  antialias.png
Views: 540
Size:  3.6 KB

    The second new feature is that it has more shapes.
    Here there is a screenshot:

    Name:  Shapes.jpg
Views: 573
Size:  30.2 KB

    New properties:

    Opacity: as the names says, it sets the opacity -or transparency-.

    RotationDegrees: the shape can be rotated 0-360.

    Mirrored: it flips the shape horizontally.

    CurvingFactor: This value applies to shapes that are not normally curved like the rectangle, the triangle and several others. It produces new figures by curving the edges. It accepts values in the range from -100 to 100. 0 meaning not curved.

    Shift: It is an additional value used by some controls: triangle scalene, kite, diamond, trapezoid, parallelogram, star, jagged star, arrow, crescent and talk. It accepts positive and negative values. Most useful values will be often in the range of -10 to 50.

    Vertices: Value used by these shapes: regular polygon, star and jagged star.

    Quality: High or Low (antialiased or not).

    Clickable: It determines whether the control will raise mouse events or not. If False, any control behind it will receive the events instead.

    This control uses subclassing.
    Requirements: it uses GDI+, it was introduced in Windows XP.

    Changelog:
    22-mar-19 Original release
    29-mar-19 Latest update: Improvements, bug fixes. Added another shape. Now the "talk" shape can accept negative values in the Shift property.

    Special thanks to LaVolpe, wqweto and The trick.
    Attached Files Attached Files
    Last edited by Eduardo-; Apr 1st, 2019 at 07:14 AM.

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2017
    Posts
    1,932

    Re: [VB6] ShapeEx: Shape control replacement

    Updated, with new shapes, more properties (CurvingFactor and Mirrored), self contained subclassing and bug fixes.
    Last edited by Eduardo-; Mar 25th, 2019 at 08:13 PM.

  3. #3
    Addicted Member
    Join Date
    Aug 2016
    Posts
    191

    Re: [VB6] ShapeEx: Shape control replacement

    If the shapes can put text inside or drag to resize and movement like MS Office, it will be useful in many applications.
    Last edited by DaveDavis; Mar 29th, 2019 at 08:26 PM.

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2017
    Posts
    1,932

    Re: [VB6] ShapeEx: Shape control replacement

    Quote Originally Posted by DaveDavis View Post
    If the shapes can put text inside
    Hello. To add text there is a control that is specific: the Label. Put a label over the shape and set the backstyle to transparent.
    I don't know if there is much of a a point in adding the capacity to draw text to the ShapeEx control, since it is quite easy to put a label inside the shape.

    The difficulty in adding text capacity to the ShapeEx control itself is that the text should not go outside of the shape, and for some shapes that is quite difficult to do (or impossible).
    So, what's the problem in adding a label over it? You can place the label exactly in the position that you want, after you has set up the shape that you wanted.

    If I decide to add the text capacity (may be in the future), perhaps it will be restricted only to some shapes.

    Quote Originally Posted by DaveDavis View Post
    or drag to resize and movement like MS Office, it will be useful in many applications.
    I don't know what you mean, could you explain?
    Do you mean it to have at run-time some similar capacity as the controls have in the IDE (of showing grips and being able to be moved and resized by the user)?
    Last edited by Eduardo-; Mar 29th, 2019 at 09:29 PM.

  5. #5
    Addicted Member
    Join Date
    Aug 2016
    Posts
    191

    Re: [VB6] ShapeEx: Shape control replacement

    Quote Originally Posted by Eduardo- View Post
    ... perhaps it will be restricted only to some shapes.
    yes, for star etc, it is not grace to have text into.

    Quote Originally Posted by Eduardo- View Post
    Do you mean it to have at run-time some similar capacity as the controls have in the IDE (of showing grips and being able to be moved and resized by the user)?
    I means we can adjust size at run-time or design-time using mouse.

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2017
    Posts
    1,932

    Re: [VB6] ShapeEx: Shape control replacement

    Ok, I'll keep these feature requests in mind. Thank you.

  7. #7
    Frenzied Member
    Join Date
    Sep 2012
    Posts
    1,695

    Re: [VB6] ShapeEx: Shape control replacement

    Hi Eduardo, I'm checking your ShapeEx, I'm going to use it to test wqweto's MST.

    Your ShapeEx is great, which can generate a lot of irregular graphics, but these graphics are rarely used in our programming. If your ShapeEx could generate Win10 system icons, its usefulness will be greatly improved.
    Attached Images Attached Images  

  8. #8

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2017
    Posts
    1,932

    Re: [VB6] ShapeEx: Shape control replacement

    Quote Originally Posted by dreammanor View Post
    Hi Eduardo, I'm checking your ShapeEx, I'm going to use it to test wqweto's MST.

    Your ShapeEx is great, which can generate a lot of irregular graphics, but these graphics are rarely used in our programming. If your ShapeEx could generate Win10 system icons, its usefulness will be greatly improved.
    Hello,
    Where are all those Windows 10 icons?
    Perhaps I'll make them at some point.

    About the shapes, I probably never used any shape in my programs, or at least I can't remember.
    The original purpose of this control was to make a shape control replacement but antialiased.

    Anyway, I think that a SVG renderer would be more useful.

  9. #9
    Member shagratt's Avatar
    Join Date
    Jul 2019
    Posts
    61

    Re: [VB6] ShapeEx: Shape control replacement

    Amazing contribution Eduardo!!!
    Im working hard on gattering control replacements to give vb6 a modern look. For the IDE Im using AxTools wich is awesome and some controls I found so far are this and the SSTabEx (extended version of sheridan tabs).
    Do you have any more usefull replacements or cool controls to share? (send me a private if you want)

    Im working on creating a set of new controls (a new button with tons of propertys, shadow and autocreate disabled icon) now I changed to ShapeEx for the background object.
    Do you have any transparent rotated antialiased label control?
    I also coded the only Flat combo box arround after not finding anyone wich works (Right now works, but I want to push it a little more and completely replace the dropdown graphic)

    Regards from Argentina!

  10. #10

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2017
    Posts
    1,932

    Re: [VB6] ShapeEx: Shape control replacement

    Quote Originally Posted by shagratt View Post
    Amazing contribution Eduardo!
    Thank you.

    Quote Originally Posted by shagratt View Post
    Do you have any transparent rotated antialiased label control?
    Here there is one (choose the windowless).

    Or here there is another one from Elroy.

    Quote Originally Posted by shagratt View Post
    Regards from Argentina!
    Greetings
    Last edited by Eduardo-; Jul 16th, 2019 at 08:59 PM. Reason: removed the attachment and added the first link

  11. #11

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2017
    Posts
    1,932

    Re: [VB6] ShapeEx: Shape control replacement

    Quote Originally Posted by shagratt View Post
    I also coded the only Flat combo box arround after not finding anyone wich works (Right now works, but I want to push it a little more and completely replace the dropdown graphic)
    Here I see there are some flat combos.

    What I do is to set the controls to use the Windows theme, then the comboboxes (and other controls) appear flat.

  12. #12
    Member shagratt's Avatar
    Join Date
    Jul 2019
    Posts
    61

    Re: [VB6] ShapeEx: Shape control replacement

    Quote Originally Posted by Eduardo- View Post
    Here I see there are some flat combos.

    What I do is to set the controls to use the Windows theme, then the comboboxes (and other controls) appear flat.
    I tried that approach but the problem is that if you relay on themes you dont really know how it will really look on the client machines. For example my work computer has themes disabled, my home computer got aero (win7) and my laptop windows10. I want to have controls that dont depend on user themes/colors/windows version so I can design wysiwyg and provide the same user experience.

  13. #13
    Member shagratt's Avatar
    Join Date
    Jul 2019
    Posts
    61

    Re: [VB6] ShapeEx: Shape control replacement

    [deleted. duplicate post]
    Last edited by shagratt; Jul 16th, 2019 at 09:37 PM.

  14. #14
    Member shagratt's Avatar
    Join Date
    Jul 2019
    Posts
    61

    Re: [VB6] ShapeEx: Shape control replacement

    Quote Originally Posted by Eduardo- View Post
    Here I see there are some flat combos.
    Yes, but most of them fail to be fully flat or are not based on standard ComboBox (cant replace the component and get everything working wich is not good for big projects)

    Example:
    Name:  Snap1.png
Views: 258
Size:  4.0 KB

    I hope I find some free time to finish it

  15. #15

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2017
    Posts
    1,932

    Re: [VB6] ShapeEx: Shape control replacement

    Here there is another one.

  16. #16
    Member shagratt's Avatar
    Join Date
    Jul 2019
    Posts
    61

    Re: [VB6] ShapeEx: Shape control replacement

    Quote Originally Posted by Eduardo- View Post
    Here there is another one.
    Thanks Eduardo! As you can see that one fail to do a full flat on the bottom line. I based my work on that one and modified the paint proc to my taste.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width