Autor Tema: Skins sin OCX L.Ascierto adaptar Excel  (Leído 3743 veces)

0 Usuarios y 1 Visitante están viendo este tema.

Xman2000

  • Bit
  • Mensajes: 3
  • Reputación: +0/-0
    • Ver Perfil
Skins sin OCX L.Ascierto adaptar Excel
« 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"

« última modificación: Junio 02, 2016, 07:05:28 pm por Xman2000 »

LeandroA

  • Administrador
  • Petabyte
  • *****
  • Mensajes: 1128
  • Reputación: +151/-8
    • Ver Perfil
Re:Skins sin OCX L.Ascierto adaptar Excel
« Respuesta #1 en: Junio 02, 2016, 11:39:53 pm »
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.

Xman2000

  • Bit
  • Mensajes: 3
  • Reputación: +0/-0
    • Ver Perfil
Re:Skins sin OCX L.Ascierto adaptar Excel
« Respuesta #2 en: Junio 03, 2016, 01:56:45 am »
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!
« última modificación: Junio 03, 2016, 02:17:41 am por Xman2000 »

LeandroA

  • Administrador
  • Petabyte
  • *****
  • Mensajes: 1128
  • Reputación: +151/-8
    • Ver Perfil
Re:Skins sin OCX L.Ascierto adaptar Excel
« Respuesta #3 en: Junio 03, 2016, 08:50:37 pm »
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.




Xman2000

  • Bit
  • Mensajes: 3
  • Reputación: +0/-0
    • Ver Perfil
Re:Skins sin OCX L.Ascierto adaptar Excel
« Respuesta #4 en: Junio 03, 2016, 10:22:47 pm »
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 !

LeandroA

  • Administrador
  • Petabyte
  • *****
  • Mensajes: 1128
  • Reputación: +151/-8
    • Ver Perfil
Re:Skins sin OCX L.Ascierto adaptar Excel
« Respuesta #5 en: Junio 04, 2016, 10:59:44 am »
is not possible, try to explain but the translation will be difficult

Si usted mira http://www.aboutvb.de/vba/artikel/vbapropbag.htm

Código: [Seleccionar]
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 que le sugerí si es que no quiere depender de DLL o OCX

TheWatcher

  • Bytes
  • *
  • Mensajes: 16
  • Reputación: +2/-0
    • Ver Perfil
Re:Skins sin OCX L.Ascierto adaptar Excel
« Respuesta #6 en: Junio 14, 2016, 05:10:22 am »
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:

Código: [Seleccionar]
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 ... :) )

LeandroA

  • Administrador
  • Petabyte
  • *****
  • Mensajes: 1128
  • Reputación: +151/-8
    • Ver Perfil
Re:Skins sin OCX L.Ascierto adaptar Excel
« Respuesta #7 en: Junio 15, 2016, 06:23:51 am »
Thank you for your clarification, sometimes these things are overlooked