473,624 Members | 2,515 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Usage of vbContainerSize leads to inexact results

Hello folks!

I created a activeX-control that, internally, calculates everything in
pixels.
Among other things, it offers ScaleWidth and ScaleHeight properties,
which are supposed to return the control's dimensions in the
container's scale mode. So, if the container uses twips, the result is
returned in twips.

That's the code:

Public Property Get ScaleWidth() As Double
ScaleWidth = ScaleX(UserCont rol.ScaleWidth, UserControl.Sca leMode,
vbContainerSize )
End Property
In my current example. UserControl.Sca leMode is vbPixels, the
container uses twips.
The expected result is 12330, but the actual result is 12330,142587145
How does that happen? If I replace vbContainerSize with vbTwips, I get
the expected result.

Does anyone have an idea what might be wrong?

Robert
Jul 17 '05 #1
0 2177

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3076
by: David Burstin | last post by:
Whenever I run VS.NET 2003, my CPU usage sits on 100%, with total memory usage at 330MB. The CPU stays at 100%, even before any projects are opened (on the start page) and for the rest of the session. This somehow leads to me getting system alarms from my motherboard. Is there something running in the background which takes up all this CPU time? An option which could be turned off? I am running a Pentium IV 2.0 Ghz processor on a...
1
6000
by: David Swift | last post by:
Hello. I'm new to the news group and new to IIS. I'm trying to help a client deal with memory usage issues in IIS. My client is running IIS 5.0 on a Win2K box and is running ASP scripts that both talk to an Active X Control written in C++ as well calls directly into the ADO layer. It seems that basic interaction with the ADO layer and Active X Control causes the dllhost.exe process to use
3
1940
by: Dan | last post by:
First, I'm sorry if this question has been asked too many times. I'm new to this news group. The question has to do with the use of popup windows in a web page. I have heard that popup windows should be avoided; due to use of popup blockers and browser that do not process javascript. Is the use of popup windows bad design? Will it severly reduce the usage of our web page?
8
15948
by: Greg Merideth | last post by:
I've written a basic windows service to provide some helper xml functions for my web methods and even thou the service is only about 1k lines long with 1 timer, its mem usage is 10m and its vm mem usage is 14! The same code written as a program that requires you to click on the menu options to fire off the events takes up 4/9mb. I've seen examples where calling SetProcessWorkingSetSize(hWnd, -1, -1); does the same thing as minimizing a...
2
7235
by: devendra pardeshi | last post by:
hi friends/seniors i am stuck on one problem in VB 6.0 and need solution. see if u can help me. first i describe the problem. Can u imagin the WinZip scenario. we right click on some file and select in context menu add to zip.Now if winzip is not runnig allready new instance of winzip application begins and
3
1281
by: Oliver Block | last post by:
Hi everybody, using the following code leads to unclean result of sum() function: /* va is a nxn array (valarray<int> (0,n*n) ) filled with integers 1 .. 5 */ int sum = 0; for(int i = 0; i < n; i++) { std::valarray<int> col = va;
26
19111
by: Christophe Lohr | last post by:
Hi, Inside a program, I need to get some statistics about memory usage. I actually need figures given by the "ps -o vsr,rss" command. For the moment, I make a popen("ps...") followed of a scanf on what it displays. It is a little complicated, and that distorts measurements. Is there a better way? I have tried "getrusage()". However values returned are not really
6
3658
by: Jeff Kish | last post by:
Greetings. I need to convert some columns of type numeric(12, 0) to hold floating point information scale and precision I can't determine in advance (customer data can vary wildly) so I wanted to use the datatype that offers the maximum scale and precision.. I'm targeting sql server 2005 systems (not 2000). It seems my choices are real and float, and the docs seem to indicate that
2
2457
by: jld | last post by:
Hi, I developed an asp.net based eCommerce Website for a client and it is hosted at discount asp. The site is quite interactive, queries a database a lot and uses ajax.asp.net to spice up interactivity. The service suffers from a lot of restarts since discountasp enforces a 100mb per worker thread limit and when you top it, the service gets restarted. When there is a lot of traffic on the site, this happens
0
8231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8168
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8672
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7153
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6107
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4075
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4167
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2603
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1474
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.