Incorrect data stored by StdFont type variable -
Hi All,
In my project, I have declared a variable say X as New StdFont. I am using it to store font properties like size, name, charset, etc. However, when I assign an integer as its size, it stores it the value incorrectly. For example, if I assign 5 to X.FontSize, it stores as 5.25. In order to isolate the cause of the issue, I used this data-type alone in a sample project and checked. The project has one text box (Text1) in one form. Please have a look:
Dim MyFontObj As New StdFont
Private Sub Form_Load()
For i = 1 To 15
MyFontObj.Size = i
Text1.FontSize = MyFontObj.Size
Next i
End Sub
Following is the correct and incorrect values respectively stored by MyFontObj.Size:
1 - 1.5 6 - 6 11 - 11.25
2 - 2.25 7 - 6.75 12 - 12
3 - 3 8 - 8.25 13 - 12.75
4 - 3.75 9 - 9 14 - 14.25
5 - 5.25 10 - 9.75 15 - 15
Also, I noticed that only values that are multiples of 3 are stored correctly. Rest, either 0.25 is added or reduced to the actual values.
I'm wondering whether it is property of StdFont data type.
Any suggestions???
Regards,
MrNiceGuy
Incorrect data stored by StdFont type variable -
Hi All,
In my project, I have declared a variable say X as New StdFont. I am using it to store font properties like size, name, charset, etc. However, when I assign an integer as its size, it stores it the value incorrectly. For example, if I assign 5 to X.FontSize, it stores as
Using StdFont Object with Property Bag -
I'm using VB6 and want my developers to be able to edit properties of a graphic element I made. I added a Input variable called ObjectFont and set the Font property to the new variable.
Now when they use the element it defaults to MS Sans Serif and can be set to another font after
SQL Server 2000 - XML from a text field -
I'm working with SQL server 2000. I've got XML data stored in a text field. The data is too big to store in a varchar data type. My first thought was to us a cursor, but much to my surprise, I can't create a local variable with a data type of text. My next thought was to use a func
data environment/stored procedures -
hi all,
i have created a data environment with a connection object that has an inserted stored procedure.within the properties of the stored procedure is a parameters tab that lets u chose a bunch of criteria related to the parameter, among them being a value box in which u can hard
Custom Control Font Property -
Can anyone tell me how to set the font property of a label control from a propertry on a usercontrol.
so that
public Property get Font() as stdFont
font = label1.font
end ptoperty
public property set Font(obj as stdFont)
label1.font = stdfont
end property
works
stdFont Object -
Has anybody had any fun with this object?
Some fonts it seems to reject (Defaulting to MS Sans Serif) when I attempt to assign it.
i.e.
stdFont.Font = "WingDings"
I know for a fact that it is on the system and I have spelt it correctly.
The problem is, occaisio
Decimal Data Type -
Hello everybody.
I am having a problem passing a variable to a stored procedure. I am calling an MTS object to run the procedure. Everything is working fine, except one SQL field. The field is of type Decimal, length is 9, precision is 10, and scale is 5. If I pass the parameter
Assigning Object to value is not producing compiler error -
comiler is not throwing errorcase1)
=====================
private sub command1_click()
Dim x As new StdFont
x=2
end sub
Note :
====
In the above code i am creating an object for stdfont class & then i am assigning some value/string to that obj
Variable data stored as one record in sql -
Hello, I am hoping someone could help point me in the right direction on part of a project I am working on. The first part of the project is storing info in a sql database. The twist and difficulty I am having is this data comes to me via a dde connection and each item is sent to
variable data type that can display both string and integer -
does anyone know of a variable data type in VB6 that displays both string and number.
In my application, im converting an interger variable to string, but i believe that its costing me about a second extra per iteration. Hence, Im looking to find a data type that can display both,
Activating Control's Property who's name is stored in a variable -
Please let me know if there is any method by which I can activate a control's property who's name is stored in a string type of variable.
For eg. I have a variable named strControl which stores the name of a textbox control. I want to make the control's visibility property true / f
UserControl don't save properties... URGENT! -
found this code somewhere on the web, and it works only in Design Mode. when you play it, the font property return to it's default value.
Code:
Dim WithEvents mFont As StdFont
Private Sub UserControl_Initialize()
Set mFont = New StdFont
Set UserControl.Font = mFont
can't run stored proc -
i made a stored procedure and succefully check its syntax.
problem is when i called it on vb no errors were returned and no records were deleted.
the key of my SP was of CHAR data type. i tried changing the key, using one of the field (w/c is an INT type) and the procedure worked
Data Type Problem -
Hi,
When I multiply a variable of integer data type and a variable of single data type, the result isn't always the right one.
For example - 0.02 * 5 isn't 0.1, but 0.099999994.
Why does this happen? I've tried using double as well, but it's the same problem.
Using a temp table in a stored proc. Help needed -
Hi All,
I use the following stored proc to loop through a set of data, I use a temp table to store the data so that I am able to loop though each transaction and set different values for the selected employee. When I read all the values into the the temp table #testTable I want to i
referencing members of UDTs -
Hi,
I'm having a headache trying to assign a variable that will reference a member of a user defined type, i.e
i've designed the type thus:
public type Details
A as variant
B as variant
......(so on and so forth)
end type
later in the programme I want to ref
stored proc cursors and variables (resolved) -
in a stored proc i've made, i'm building a SQL statement using a variable, which i then need to open a cursor for, but it won't let me declare the cursor using a variable. this is basically what my code looks like now:
Code:
declare @sql varchar(8000)
set @sql = 'select fiel
Check for data type -
Hi,
how to check which type is variable in vb application?
In some function I have variable X and I want to check what type is X (string, integer, single, boolean, datetime ...)
I'm talking only about primitive data types.
thanks j
Access DB and OLE Objects -
I am storing an OLE Object in records within a Table in MS Access 2000. The actual object itself is an icon image file (.ico). How do i load or retrieve the icon from the record and store it in a IPictureDisp variable. No matter what i try, all i get is the actuall Icon binary data
Global variable declare -
How can I declare a public variable in C++ (without MFC) and so that I can share this variable in two different cpp file.
example:
I have 2 variable name ptX and ptY both are double data type.
I need to store a value at runtime into this variable at a.cpp and use this value
Copying a Type from one application instance to another -
Hi
I'm trying to write the code so that you can drag drop a node from one instance of the application to another instance using OLE Drag Drop.
I thought it would be easier so store all the relevant information in a Type variable and then store the variable pointer in the OLE Dat
RESOLVED[Userform1 to userform2] -
I have 2 userforms. In userform1 I entered some data through a combobox and stored it in a variable defined as a string. Then from userform1, once you've finished filling it, you pass to userform2.
How can you bring to userform2 the data from the combobox in userform1 stored in that
Datetime data type in SQL conundrum -
I've built a table in SQL Server 7 with some date fields of datatype 'Datetime'. I've built a stored procedure to have data entered into it from VB.
When I run the procedure using the query analyzer, and pass all the parameters to it manually, it works.
However, when I connect to
string too long for varchar field in stored proc -
Hi All
I am using VB6 and SQL Server 2000. I have a stored procedure which takes in a string of comma separated values using the varchar field type. This works fine normally but when the string goes over 8000 characters, the procedure doesn't work as this is over the maximum allow
Issues with Running a Stored Procedure -
Hi, I am trying to run a stored procedure from within my programme:
Me.Sp_get_call_detailsTableAdapter.Fill(Me.MVCDataSet1.sp_get_call_details, mvccode)
I am getting the following error:
Value of type 'WindowsApplication1.MVCDataSet1.sp_get_call_detailsDataTable' cannot be co
Creating my own Data Type -
Is there anyway i can create my own data type based on an Integer, basicly I want to change the way the bits are stored.
eg)
00000000 00000000 00000001 00001111
Normally this would represent 2^0+2^1+2^2+2^3+2^8 = 135
I want the DataType to Interpert that as this:
000000
Need help With App -
I need some help with this. My app has critical data stored on it, and all changes need to been seen my other user immediaetly. I'm using the adodc control, and I'm not sure of the settings, for example, the cursor type, cursor location, and lock type. Can someone please help me with
Array Type Casting -
I am using the CallByName function with Reflection to return values stored in my classes. The problem is, when I return arrays, I don't want to maintain a variable for every possible type returned so is there a way to do it generically?
For example:
CallByName(oSourceObject, oPrope
Loop Through Items of Type Data -
Hello everyone. I have two questions regarding type data. I have a data type of company data. In that data type I have various items stored such as industry, location, etc.
1) How can i loop through each item and set the value to Null. I have been just doing it manually, but I
variable types -
I am trying to write a vb component, which receives values from an asp page and then makes some calculations before returning the value. However, as I am fairly new to this game, it is coming up with an error saying 'overflow'!
The values I pass into the component are integers. Thes
I've hit a wall in .NET -
Okay, I'll spare all the details because I'm REALLY not good at explaining them, but let's say I have a string of code, such as...
objectName.location = (x, y)
...but I need to take the name of an object, which is stored in a variable, and execute that same line of code using the
Alter Column Help Required -
Hi guys, I have an Access database which I am accessing using ADO...
I want to change a field data type in a table, how do I do it in ADO?
Please note the field already has data stored in it, so I need to change data type without losing the data...
The type is - Date to Text
Very quick question - limitations of String (Plus Timer question) -
Hi all,
Just a quick question - is there a limit as to how much data can be stored in a "String" type? I need to load the contents of a multi-line text box into a variable, and contents could span many pages. Would there be a better 'type' to store this kind of data, rathe
Query regarding adLongVarChar -
I would like to know the data type in VB which is equvivalent to CLOB in DB2 ? CLOB takes about 4000 bytes of data. I have a stored procedure which is selecting CLOB type data and I have to retrieve it from VB (ADO). I am not sure about the data type that can hold so much data. Can I
Data type in SQL -
How to store a Image data type in variable ? i.e I have a field Data and its data type is Image in SQL server. I want to pull out that field from db and store in a variable to insert it in another table. But I get error from this code. Anyone knows how to fix it
Dim imgData as Imag
Getting Last Modified Data using file location stored in a variable -
Hi All,
Am looking for a little help. i pretty much a complete novice when it comes to VB6 so am looking for some help.
What i have is a very large txt file which has a list of file locations of duplicate documents on our system. What i want to do is to read each line of this tex
Variable Type -
Sorry for the dumb question, but I couldn't find it in any previous topics. How do I find out which variable type has been defined? I'm using a Variant and apply a value of 2 to it. However, when I define the variable as a single, double, integer, long or anything else it doesn't work.
How to Check a data type -
I have run into a brain freeze. I know there should be a way to check what data type a variable is.
Problem: I am passing different data types to a function which accepts variants. How do I in the routine check to see what actual data type was passed.
forgot data type -
recently i've been learning c++ and i saw that they have this variable type called float for numbers such as 10.32
i don't think i ever needed to have a data type that accepts numbers with decimals ... what is that type in vb?
Stored Procedure OUTPUT -
Hi Everyone,
I have a stored procedure with an OUTPUT variable in it. The stored procedure is being being executed by using an ADO recordset.
For example, recordset.Open "StoredProcedureName '" & InputVariable & "'"
I have tried to get the OUTPUT v