Results 1 to 5 of 5

Thread: RC6 & VB6: Question: Moving a widget in the X axis using mouse drag

  1. #1

    Thread Starter
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,351

    RC6 & VB6: Question: Moving a widget in the X axis using mouse drag

    Olaf,

    I have a VB6/RC6 volume program which is completely comprised of layers extracted from a PSD using your simple PSD parser. The program is missing one UI element and that is the ability to slide the sliderset widget left and right within the bounds of the underlying pipes. This is demonstrated in the attached GIF of the Xwidget version in action.



    In the .js version we have an OnMouseDrag event where I can click on the sliderset and using the mouse X co-ordinate, change the HOffset/Left property of the sliderset, constraining the movement in the Y axis to the current value and only allowing limited movement left and right.

    Currently, I do not know how to dynamically translate a RC6 widget to a different X,Y position using a mouse click and drag. I can change other characteristics (alpha &c) but not the .left or .top properties. I cannot find examples amongst the RC5/6 example code of how to change a widget's .left property. Can you enlighten me with an example?


    P.S. I have managed to achieve it in a partial sense but only when the underlying form is locked in position by disabling the Form_MouseMove and setting the .Moveable = True on the sliderset widget, I can then move the sliderset in both axis freely. I still need to be able to constrain the widget in Y axis and I also need to alter the width of another widget, the cable. I need some help here.

    I feel I am doing something fundamentally wrong or missing some functionality due to my lack of understanding. Am I doing it partially correct?


    The volume control is here: https://github.com/yereverluvinuncle...me-Control-VB6
    Last edited by yereverluvinuncleber; May 25th, 2024 at 06:19 PM.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  2. #2
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,311

    Re: RC6 & VB6: Question: Moving a widget in the X axis using mouse drag

    Have made a simpler Demo (based on the original transparent WidgetForm-Project), which is now:
    - supporting your "dieselVolumeMerged.psd" in the Res-Folder
    - allowing "drag in x-direction" (with proper "extent-spooling" of the "cable")
    - supporting (beside the drag-op) also MouseWheel-based Volume-changes

    https://vbRichClient.com/Downloads/PSDSlider.zip

    Please study this for a while - and ask questions here, if something is not clear...

    HTH

    Olaf

  3. #3

    Thread Starter
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,351

    Re: RC6 & VB6: Question: Moving a widget in the X axis using mouse drag

    That's perfect. I will study.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  4. #4

    Thread Starter
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,351

    Re: RC6 & VB6: Question: Moving a widget in the X axis using mouse drag

    OK, Olaf that really is perfect. I'll have an image or two here shortly and possibly an animated GIF if the forum will let me.

    I have incorporated your changes into my code and it all works exactly as I wanted it to. I will now start to make sure I understand it fully. It will take me from here to there in terms of understanding of RC6. I'll complete the addition of your sound control functionality and then the desktop 'widget' will be operational.

    This will allow me to remove my old desktop XWidget version which is becoming increasingly obsolete now that jscript is deprecated. A nice VB6/RC6 version placed in its stead.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  5. #5

    Thread Starter
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,351

    Re: RC6 & VB6: Question: Moving a widget in the X axis using mouse drag

    Hopefully, the forum will let this image persist for more than 5 mins.



    Link to original animated version here: https://imgur.com/a/vMpFGqz

    Showing the slider operate and the indicated volume shown in percent. No sound in the animated GIF but be assured, the sound is controlled as it should be. I have some minor tasks to finish, some documentation, tidying up of my code (as always) and addition of keyboard keypresses to control the slider. I also want to have a version for ReacOS and XP so I will have to import the necessary sound APIs for those older oses. I may have to create a new version for XP/ReactOS alone.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

Posting Permissions

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



Click Here to Expand Forum to Full Width