|
-
Sep 10th, 2008, 08:42 AM
#1
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)
-
Sep 10th, 2008, 09:02 AM
#2
Re: Metrics inside a frame
 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?
-
Sep 10th, 2008, 11:57 AM
#3
Re: Metrics inside a frame
 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)
-
Sep 10th, 2008, 12:09 PM
#4
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
Sep 10th, 2008, 12:31 PM
#5
Re: Metrics inside a frame
 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.
-
Sep 10th, 2008, 12:33 PM
#6
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
Sep 10th, 2008, 03:48 PM
#7
Re: Metrics inside a frame
 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|