dcsimg

Search:

Type: Posts; User: JAAFAR

Page 1 of 5 1 2 3 4

Search: Search took 0.33 seconds.

  1. Replies
    4
    Views
    323

    Re: IActiveScript interface error

    Bump!

    I am still stuck on this ... Can Anyone help?

    Thanks
  2. Replies
    4
    Views
    323

    Re: IActiveScript interface error

    Thanks Olaf,

    Yes I had already downloaded that typelib . In fact, the code I posted was an attempt to adapt the typelib code via the use of the more dynamic CallFunction_COM so that I don't need...
  3. Replies
    4
    Views
    323

    IActiveScript interface error

    Hi all,

    I am trying to get the IActiveSript interface but when I make a call to CoCreateInstance to start the inproc script engine, I get "No such interface supported" error.


    Option Explicit...
  4. Re: Has anyone had any success implementing IDispatch / IDispatchEx?

    Thank you very much.

    The second option sounds interesting... I'll look into it and see if I can make it work for me.

    Regards.
  5. Re: Has anyone had any success implementing IDispatch / IDispatchEx?

    I know I am not supposed to ask questions related to vba in this forum but the truth is I hardly ever get any answers when I post in the Office Developent section.... Despite me not using vb6, most...
  6. Re: Has anyone had any success implementing IDispatch / IDispatchEx?

    Sorry, I meant to say 64bit process not 64 OS.
  7. Re: Has anyone had any success implementing IDispatch / IDispatchEx?

    Hi Olaf,

    I am trying to use your code in x64bit windows but the ScriptControl no longer works in x64bit.

    Do you have any suggestions ?

    Regards.
  8. Thread: IExtractImage

    by JAAFAR
    Replies
    6
    Views
    1,681

    Re: IExtractImage

    Bump!

    In other words, is the IExtractImage interface not working on Win7 and Win10 ?

    Any assistance ?

    Regards.
  9. Thread: IExtractImage

    by JAAFAR
    Replies
    6
    Views
    1,681

    Re: IExtractImage

    Hi all,

    I am running the first code posted by LeandroA on windows 10 and the code seems to work only for rendering thumbnails of folders.

    It doesn't work for rendering file thumbnails... when I...
  10. Replies
    10
    Views
    906

    Re: Call VB6 module function dynamically

    Have you looked at AddressOf and CallWindowProc ?

    Or better Addressof and DispCallFunc.
  11. Replies
    29
    Views
    1,385

    Re: AddressOf Function in a Class Module

    Bump
  12. Replies
    55
    Views
    1,989

    Re: Create and load Cursor from byte array.

    Very useful info in that tutorial !

    Anyways, Thank you very much indeed for all your guidance and assistance with my questions and for all the detailed explanations.

    I have come out of this...
  13. Replies
    55
    Views
    1,989

    Re: Create and load Cursor from byte array.

    LaVolpe,

    Thanks for the explanation.



    I'll have a read through that.

    Regards
  14. Replies
    55
    Views
    1,989

    Re: Create and load Cursor from byte array.

    *
    makes sense when you think in terms of windows allocating\deallocating memory for resources which I never really properly understood or paid much attention to... So thanks for clarifying.


    ...
  15. Replies
    55
    Views
    1,989

    Re: Create and load Cursor from byte array.

    Hi,

    How would storing the icon\cursor handle in a stdPicture prevent a resource leak ? Is that a mechanism behind the scenes ? And is there a way to verify it?

    BTW, calling DestroyICon or...
  16. Replies
    55
    Views
    1,989

    Re: Create and load Cursor from byte array.

    Thanks .

    To prevent leaks,as a precaution, I tend to store the resource handles in the application window Property using SetProp API so I can recover the resource handle in case there is a loss of...
  17. Replies
    55
    Views
    1,989

    Re: Create and load Cursor from byte array.

    Thank you. DestroyIcon is the propper API ... That said, I read somewhere that DeleObject can just as well be used for destroying resources such as DCs,Brushes etc - Is that correct ?

    What I...
  18. Replies
    55
    Views
    1,989

    Re: Create and load Cursor from byte array.

    Thanks .

    Yes I use DeleteObject upon unloading the form.

    Now that you mention the flag parameter, this is waht the MSDN doc says about the LR_SHARED flag:
    "When you use this flag, the system...
  19. Replies
    29
    Views
    1,385

    Re: AddressOf Function in a Class Module

    Hi The trick,

    I have given the code a quick test but the timer event routine never gets called .

    In the ThisWorkbook Module :

    Option Explicit

    Private WithEvents x As class1
  20. Replies
    29
    Views
    1,385

    Re: AddressOf Function in a Class Module

    Hi the trick,

    I have just seen this and downloded the vba class code from the link and I don't see the actual timer callback function .

    Thanks.

    EDIT:
    Sorry just saw it
  21. Replies
    55
    Views
    1,989

    Re: Create and load Cursor from byte array.

    Thanks LaVolpe,

    1- I have just converted a 32x32 True color ICO file to a CUR based on your suggestion and apparently it works as expected.

    This is how I set up the Long array (image data +...
  22. Replies
    55
    Views
    1,989

    Re: Create and load Cursor from byte array.

    Yes the 23rd byte is where the actual image data starts for both .CUR and .ICO - ie: no need now to reserve 4 bytes before for the hotspot byte.

    Yes I would use the value of the vbResTypeIcon...
  23. Replies
    55
    Views
    1,989

    Re: Create and load Cursor from byte array.

    LaVolpe,

    Brilliant ! I got it working with the bytes array with the adjustement you suggested and I can now better visualize the cursor memory layout .. now makes sense to me :)

    Since the...
  24. Replies
    55
    Views
    1,989

    Re: Create and load Cursor from byte array.

    LaVolpe,

    That's brilliant ! I now I think I understand- You already had the byte extraction code well commented but having no idea about the internal memory layout of the cursor file, I didn't pay...
  25. Replies
    55
    Views
    1,989

    Re: Create and load Cursor from byte array.

    Hi LaVolpe,

    I followed your instructions and this is the output I got from the text file :


    Private Function GetCurHandle() As LongPtr

    ReDim longs(0 To 186)
    longs(0) = 0: longs(1)...
  26. Replies
    55
    Views
    1,989

    Re: Create and load Cursor from byte array.

    Yes your assumption is correct.

    I haven't tried your code yet but I will do later on as I am logging off now .

    I will post back with the result I get later on.

    Regards.
  27. Replies
    55
    Views
    1,989

    Re: Create and load Cursor from byte array.

    Thanks LaVolpe,

    That is cool but unless I am missing something, doesn't that defeat my purpose as there will be a need for a text file along the project ?

    I might just as well have the cur file...
  28. Replies
    55
    Views
    1,989

    Re: Create and load Cursor from byte array.

    I'll look into that when I feel more confortable with handling memory parts of image files - But first, I will need to roll up my sleeves and do some studying :)

    Regards.
  29. Replies
    55
    Views
    1,989

    Re: Create and load Cursor from byte array.

    Yes- That's what I thought as well. However, the last byte happens to be 255 not 0 unless the API starts in reverse order beginning from the last element in the array.

    Anyway, I have edited the...
  30. Replies
    55
    Views
    1,989

    Re: Create and load Cursor from byte array.

    Yes If I understand you correctly ,you are right. It should be UBound(bytes)+1 to include all the bytes as I am using the default Optiion Base 0.

    However, the cursor is still created without...
  31. Replies
    55
    Views
    1,989

    Re: Create and load Cursor from byte array.

    Yes I would normally use a file that has 1 image for the moment until I get a grasp of the memory layout internals of Cursors, Icons and bitmaps which I am still trying properly understand.

    As for...
  32. Replies
    55
    Views
    1,989

    Re: Create and load Cursor from byte array.

    Ok - I seem to have managed to make this work for x32 and x64 bit.

    workbook test

    This the code I used in the excel userform module

    Option Explicit

    #If VBA7 Then
    Private Declare...
  33. Replies
    55
    Views
    1,989

    Re: Create and load Cursor from byte array.

    That sounds great... I never knew about this handy CreateIconFromResourceEx API function !

    I'll give this a try and will post back what the result I get.

    Thank you very much for your guidance.
  34. Replies
    55
    Views
    1,989

    Re: Create and load Cursor from byte array.

    Thank you for investigating this further.

    With the help of a bitmap/cursor editor, I created a simple (32x32 pix) bitmap (16 colors) (file size 630 bytes ) ... This is just a small Red drag...
  35. Replies
    55
    Views
    1,989

    Re: Create and load Cursor from byte array.

    This is new territory to me.

    Is the CreateDIBSection API the right way to create the bitmap ?

    And if so, I don't know how to determine the correct Width and Height in the bitmap header based...
  36. Replies
    55
    Views
    1,989

    Re: Create and load Cursor from byte array.

    Thanks The trick.

    I never knew about this handy CreateIconFromResourceEx API function.

    However, this seems to works only for PNG files not for .ICO or .CUR files

    Also, as opposed to what...
  37. Replies
    55
    Views
    1,989

    Create and load Cursor from byte array.

    Hi all,

    Below is a byte dump of .cur file .

    I want to store those dump bytes in an array and from the bytes, re-create the cursor and get its handle so I can pass the handle to the SetCursor...
  38. Replies
    20
    Views
    24,424

    Re: [VB] stdPicture Render (How To)

    True for VB6 not for VBA where the AutoRedraw Property doesn't exist.

    The only vba fix I can think of is to subclass the vba form and handle the WM_PAINT msg.

    Regards.
  39. Re: Lock Popup Window momevent to a specific rectangular area on the screen

    @Lavolpe.

    Hi,

    Thsnks for answering .



    Yes I suspected there was no way to do this without subclassing.
  40. Re: Lock Popup Window momevent to a specific rectangular area on the screen

    Any Ideas anybody ?

    Regards.
Results 1 to 40 of 180
Page 1 of 5 1 2 3 4



Featured


Click Here to Expand Forum to Full Width