Visual Basic Foro
Programación => Visual Basic 6 => Mensaje iniciado por: Xman2000 en Junio 02, 2016, 06:19:46 pm
-
Hello,
i am new in the forum, saludos a todos!
i want adapt Skins without OCX of Leandro Ascierto to Excel (without OCX)
and ocurr error about "Properties Bag, PropBag" no exists in Excel VBA, only VB.
"PropBag" is used to read (leer) properties of ".skin" files.
but i found one sourceCode to adapt "PropBag" to VBA Excel and i need help, please!
transform "PropBag" OCX, DLL in pure VBA-api?
reemplazar (replace) the "PropertyBag" to other function to read properties of files ".skin" ?
thanks!
http://www.mediafire.com/download/12nlz3o133m5226/Skins-LeandroAscierto-SemOCX-PropBag1.rar
"http://www.mediafire.com/download/12nlz3o133m5226/Skins-LeandroAscierto-SemOCX-PropBag1.rar"
-
Hi, sorry but it is impossible, vba not have PropertyBag and is impossible to adapt the code without PropertyBag.
Hola, lo siento pero es imposible, vba no tiene PropertyBag y es imposible adaptar el código sin PropertyBag.
anyway a short time ago I was working with a code to change the color of the form and the caption.
de todas formas hace poco tiempo estuve trabajando con un código para cambiar el color del formulario y el caption.
https://drive.google.com/file/d/0B68MFIa9bP-gOTlmTklTdmpTX0k/view?usp=sharing
tomorrow if I have time I'll pass a code to use an image mask.
mañana si tengo tiempo le pasare un código para utilizar una imagen de mascara.
-
Hi, Leandro.
thanks of you answer.
in this website http://www.aboutvb.de/vba/artikel/vbapropbag.htm
is the one workaround example way using one "DLL" of "VB" avbPropertyBag.dll, and is one sourceCode i think is of "DLL".
is possible simulate "DLL" with a "class" vba? (class PropertyBag.cls) ?
' Declaramos Propbag como la clase PropertyBag.
Dim Propbag As PropertyBag,
or,
Dim PropBag As New PropertyBag (class PropertyBag.cls)
i make one class but not works, not error but not works.
please verify my new atachment files, i put the "DLL" and source code in the atachment.
http://www.mediafire.com/download/icrbxx6umpzgtvt/Skins-SemOCX-PropBag-JP1comClassTeste1.rar
i am poor in programming!
thanks!
-
hello again, if you do not have problems working with dll, then before using avbPropertyBag.dll is better to create DllClsSkinner.dll and that saved us a lot of headaches
hola nuevamente, si usted no tiene problemas de trabjar con dll, entonces antes de utilizar avbPropertyBag.dll es mejor crear DllClsSkinner.dll y con eso nos ahorramos muchos dolores de cabeza.
http://www.mediafire.com/download/f6fedc9a4d66kdu/DLLSkinnerVBA.zip
you must register the dll remove it from the References and add.
usted deberá registrar la dll quitarla agregarla desde el menú Referencias del ide.
in winx32 it works well but in Winx64 I could not do walk.
en winx32 funciona bien pero en Winx64 no lo pude hacer andar.
(http://s33.postimg.org/9qmmk4fu3/Image2.jpg) (http://postimg.org/image/9qmmk4fu3/)
-
Hi, Leandro Ascierto!
i want not use DLL or OCX, i want load ".skin", ".skn" files without DLL or components to install.
is possible simulate "DLL" with a "class" vba? (class PropertyBag.cls) ?
is possible put the source code of DLL into "propertyBag.cls ?
is possible use ADO or DAO conection to extract data of ".skin" files?
please, see my atachment files!
http://www.mediafire.com/download/icrbxx6umpzgtvt/Skins-SemOCX-PropBag-JP1comClassTeste1.rar
http://www.aboutvb.de/vba/artikel/vbapropbag.htm
thank you !
-
is not possible, try to explain but the translation will be difficult
Si usted mira http://www.aboutvb.de/vba/artikel/vbapropbag.htm
Private mPropBag As VBRUN.PropertyBag
VBRUN no puede utilizarse en VBA supongo que es una librería de VB6 por lo tanto si no se compila el código dentro de una dll no va a funcionar desde vba. por lo tanto no puede utilizarse la classe PropertyBag.cls desde vba
por otro lado, hay que cambiar otras cosas como el método de subclasificación que utiliza la case ClsSkinner ya que a como esta, no funciona en VBA y no se que otras trabas más se pueda encontrar.
no depender de PropertyBag seria volver a reescribir todos los archivos .Skin
le recomiendo que utilice el primer enlace (https://drive.google.com/file/d/0B68MFIa9bP-gOTlmTklTdmpTX0k/view?usp=sharing) que le sugerí si es que no quiere depender de DLL o OCX
-
Hi Leandro,
While we're at it, are you aware that your declaration of Type LOGFONT in your ClsSkinner.cls isn't exactly correct and causes misalignment of derivative UDTs throughout the module:
Private Type LOGFONT
lfHeight As Long
lfWidth As Long
lfEscapement As Long
lfOrientation As Long
lfWeight As Long
lfItalic As Byte
lfUnderline As Byte
lfStrikeOut As Byte
lfCharSet As Byte
lfOutPrecision As Byte
lfClipPrecision As Byte
lfQuality As Byte
lfPitchAndFamily As Byte
lfFacename(LF_FACESIZE) As Byte ' That's not correct!
End Type
Such a declaration makes LOGFONT exactly one byte longer than necessary as lfFacename(LF_FACESIZE) where Const LF_FACESIZE As Long = 32 effectively produces a 33-byte long array: lfFacename(LF_FACESIZE) = lfFacename(32) = lfFacename(0 To 32) = 33 bytes long.
IMO the declaration should be corrected to lfFacename(LF_FACESIZE - 1) to make sure the skin files are compatible with, and usable in, other languages and applications.
(Actually, I noticed this bug a couple years ago when fixing/porting your code to FBSL but was too lazy to notify y'all in due time. Anyway, as they say Better late than never ... :) )
-
Thank you for your clarification, sometimes these things are overlooked