o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

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 that , but I was wondering how to set the default property for a StdFont Object using the property bag?

Basically All I can do is insert a value for the property bag...

Everything is referenced correctly since i'm using a tool, but here's the syntax of what I need to change:

Set m_ObjectFont = Propbag.ReadProperties("ObjectFont", "WHAT I CAN EDIT")

*Where m_ObjectFont is a StdFont Object

basically what is the syntax? i just need to set the name size and bold flag, I have googled several sources and this would be so much easier if i could actually edit the code and say m_ObjectFont.Name = "Tahoma", but I HAVE to use this propertybag.

for example i've tried:

Set m_ObjectFont = Propbag.ReadProperties("ObjectFont", ".Name='Arial'")
Set m_ObjectFont = Propbag.ReadProperties("ObjectFont", "Arial")
Set m_ObjectFont = Propbag.ReadProperties("ObjectFont", "Name=Arial")

Can this be used in this way? or does the propbag have to read a X.font?

 

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


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


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


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


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


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


Getting an object refererence -
I am attempting to use a Get Property to return a reference to an object. In the Get property code section. the code looks something like the following public Property Get A() as object set A = an object end property Now I am wondering since I am using a Set do I need to so


StdFont -
isnt possible to store text to word.(i.e word="Hello").thanks Code: Dim word As New StdFont Private Sub Command1_Click() With word .Bold = True .Italic = True .Size = 20 End With Set Label1.Font = word End Sub


Call C++ DLL Property By Names from VB -
Should I be able to use the CallByName Function in VB to access a propoerties value in an Object written in C++. Basically I want to Use a string parameter to return or set the value of an objects property. I want to map range names in Excel to Object properties. I can then read and


Question about property declaration -
I am trying to create and Indexed property that acts similarly to the Selected and Checked properties of the Listbox control included with VB. Basically, my question is how do I declare the property routines? It will be accessed like this: object.property(index) = value varia


object as property value -
Can a property of an activex control be an object. my code contains : Public Property Get MessageBuddy() As Object Set MessageBuddy = messagebuddy_value End Property Public Property Let MessageBuddy(ByVal vNewValue As Object) Set messagebuddy_value = vNewValue Proper


Pen and Pens object dilemma -
Hi everyone, I hope some one can give me some light on this. I have my CustomPaintEventArgs class that has “Pen” property so that it can be assigned with Pen or Pens object. Now here is the dilemma, I should dispose the pen object as soon as I finish with it but when the CustomPain


Get Title from file properties. -
I found this: 'From WSH\FSO, this is what you get: 'GetFileVersion method for file version 'and the file object that gives you: 'Attributes Property | DateCreated Property | 'DateLastAccessed Property | DateLastModified Property | 'Drive Property | Name Property | ParentFolder


Serializing Internal Properties -
I have an object that will basically be exposed in an API. This object contains a password as a property. What we want to do is restrict someone calling the object from outside the assembly from setting the password without first encrypting it, so we make the property internal and forc


Treeview.Tag property -
I am reading through a datatable and setting the text property of the node to a name, and the tag property to a Guid. I want to get both values but I keep getting an error (Object Reference not set to an instance of an object) on the tag property. What is the proper way to get the va


Associating an object to the TAG property -
I would like to know if it's possible to associate an object (in my specific case a class) to the tag property of a VB6 object (for example a listview). Thanks a lot.


Dictionary Object TypeName -
Hi, I am passing a dictionary object to the Set function of a class. Before setting the private object to this external Dictionary object, I am first using an if statement to make sure it is really a Dictionary object. Can some one please point out what TypeName should I use fo


[2005] Set Value of a PropertyGrid GridItem -
I have a property grid and when I toggle the value of a particular property, I want to automatically set the value of another. For example, if they set a custom color, I want to update the "Enable Custom Color" property that I have. I am able to set a reference to the prope


Property Page COM Object -
Hi, I am a SQL Server DBA, I am to create a Property Page COM object for Active Directory GUI extension. It is said that I will have to create a Property Page COM object in VB which would support IShellExitInit and IShellPropSheetExt interfaces. Can somebody tell me how can I do th


HowTo: For each Loop on an Object -
Ok I have an Object. Internet explorer Control. I need to basically do the following For Each property In WebBrowser1 Debug.Print property Next But it does not work and I can not find an answer on the M$ support Site. Any help would be greatly appreciated


How to set CollatingOrder property of a field -
In the Help there is a note "You can set the CollatingOrder property of a new, unappended Field object if you want the setting of the Field object to differ from that of the Database object that contains it." But how should I do it exactly? There is no example and an error


Treeview Key Property alternatives (Half Resolved) -
Is anyone else as fustrated as I am with the removal of the "key" property off of the Node object? What alternatives have you been using? I thought about using the Tag property, but that doesn't really accomplish much because I can not retrieve the node by the Tag propert


OO database design -
Hello all, At the moment I'm trying to create an object oriented database. Where I store objects, properties and relationships into tables. The question I have however is : When does one decide to make an object or a property. For example (this is a real life situation)


A default property was not found for the object -
A default property was not found for the object. I don't know which object is missing a default property and what that property is. Can anybody see it? <% @LANGUAGE = VBScript %> <% Option Explicit dim fso, f, fs, fl, f1, flName set fso = Server.CreateObject("


Property and Object Confusion -
Is it possible that a property of an object become another object???


tooltip - HELP -
ok, after searching the forums.. apartently to have a "caption" or description box on an object when u over over there is now a property on the windows form interface. now to my knowlage this is the tooptip property, however when i have seected my object i cant find toolti


HelpContextID property for Node Object -
I am creating a context sensitive help and I am trying to connect it to my VB application. Here is my question. I am trying to use HelpContextID property to set it to the Context id numbers that I specified in my .chm help file. The problem that I encounter is Node objects in my VB app


Screen object -
Here's the scenario: The main application references a dll which will create an instance of a msagent and allow you to play with it. The activate function in the dll class accepts a parameter variable of type object. The parameter variable is simply the screen object being pa


Binding to an object.property(i as Integer) -
I need to bind the Text property of a Label to the Price property of another object. The Price property is defined as: Public ReadOnly Property Price(type as Integer) as Decimal I have tried the following syntax but they all return an argumentException: Cannot bind to the pro


Array of byte as class property -
With VB6, I want to create a class object possessing a property of type array of byte. With: Option Explicit Private lValue() As Byte Public Property Let RawVal(Val() As Byte) lValue = Val End Property Public Property Get RawVal() As Byte() RawVal = lValue End Prope


[2008] General question about object deserialization -
Hi all, I'm playing around with object serialization and everything works just fine and dandy, but I have a question. Basically, I've created a dummy object with 3 properties, serialized it, deserialized it and the program reconstructs the object in its original form. Everything


cannot Set Property from VBA in VB.NET class -
Hi, I have a comclass defined as follows: Imports System.Runtime.InteropServices <ComClass(cBX_CurveCCV_.ClassId, cBX_CurveCCV_.InterfaceId, cBX_CurveCCV_.EventsId)> _ Public Class cBX_CurveCCV_ End Class With a property: Property DataElement(ByVal Index As CCV__


using mapinfo in VB noob question :( -
Hello I was going through the mapx tutorial and it says to alter Map object properties at design time i can use either the standard VB property dialog window or the custom property window accessby right clicking on a map object and selecting Properties. when i accessed the Property


ADO fields -
Does anybody know what the values for the 'Status' property of the ADO field object mean? There doesn't appear to be any help topic on it (in fact the property list for the field object omitts the 'Status' property) and I don't know what the (integer) values mean. Specifically, I


Property exist -
Hello, Does anyone know how to test the existence of a property for an object. Something that would return a boolean like: If Exist(objObj.property) then msgbox "objObj property exists for this object" else msgbox "property doesn't exist" en


Implements Microsoft.Office.Core.Range Interface (VB.Net) -
I tried to implements Microsoft.Office.Core.Range Interface, but the dot net raise errors : + ' '_Default' cannot implement '_Default' because there is no matching property on interface 'Range'.' + ' 'Item' cannot implement 'Item' because there is no matching property on interface 'R


Accepting multiple datatypes in a class property -
Hello I have a class with a GET property which accepts data. The data I send to this property can be of differing datatypes. I've read that polymorphism isn't possible in VB6. Are there any clean ways of emulating polymorphism in VB6 so that I can accept different datatypes. I


[2005] Reflection and Property Types -
I am using reflection to create a custom serialization class and I have a question. My question is, how can I determine if the property of an object is a simple data type (Integer, String, Boolean, etc)? I want to know how to handle the property. If it is an integer for example, I want


*RESOLVED* Property Get and Let in a class module -
Hi, Apologies up front if my use of terminology is incorrect but ... It is my understanding that when you declare properties in a class module you use Property Get (to read values) and Property Let (to write values) if the property is a standard variable type (boolean, integer et


Get object properties -
Does anyone know who to loop through the properties of an object and print out the property name and value in visual basic 6? For example I would like to get and print out all the properties of the printer object or a common dialog box without know the names of all the properties.