Results 1 to 7 of 7

Thread: Metrics inside a frame

  1. #1

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Metrics inside a frame

    I have a control inside a frame and want to move it at run time. I'd like to set the scalemode to pixels but frames don't seem to have this property. Do I have to use Screen.TwipsPerPixelX and Screen.TwipsPerPixelY or is there another way?
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  2. #2
    PowerPoster Code Doc's Avatar
    Join Date
    Mar 2007
    Location
    Omaha, Nebraska
    Posts
    2,354

    Re: Metrics inside a frame

    Quote Originally Posted by krtxmrtz
    I have a control inside a frame and want to move it at run time. I'd like to set the scalemode to pixels but frames don't seem to have this property. Do I have to use Screen.TwipsPerPixelX and Screen.TwipsPerPixelY or is there another way?
    Does "it" mean that (1) you want to move the control inside the frame and leave the frame at a fixed position or (2) move the frame itself and thus carry the control with the movement of the frame?
    Doctor Ed

  3. #3

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: Metrics inside a frame

    Quote Originally Posted by Code Doc
    Does "it" mean that (1) you want to move the control inside the frame and leave the frame at a fixed position or (2) move the frame itself and thus carry the control with the movement of the frame?
    It means (1)
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Metrics inside a frame

    So then you would set its location using the .Move method of the child control and the settings would be relevant to the frames top let being 0, 0
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5
    PowerPoster Code Doc's Avatar
    Join Date
    Mar 2007
    Location
    Omaha, Nebraska
    Posts
    2,354

    Re: Metrics inside a frame

    Quote Originally Posted by krtxmrtz
    It means (1)
    Interesting. Even though the form ScaleMode can be set to pixels and thus the frame positioned in pixels, any control contained inside the frame remains positioned in twips relative to the frame.
    Doctor Ed

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Metrics inside a frame

    So why not divide by thte twips per pixel? Shouldnt be an issue.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: Metrics inside a frame

    Quote Originally Posted by RobDog888
    So why not divide by thte twips per pixel? Shouldnt be an issue.
    Of course but I was surprised that even if the form the frame is in was set to pixels, still the frame metrics was twips. That's why my question was if there was any other 'hidden' trick I had overlooked or didn't know about.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

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