Search:

Type: Posts; User: JAAFAR

Page 1 of 13 1 2 3 4

Search: Search took 0.04 seconds.

  1. Re: how to get Windows title bar color set in system (Win 10)

    Ok - I have finally managed to get the inactive caption theme color ... I was mistakenly using BRG instead of RGB.

    I have another question:
    Is there a dwmapi or uxtheme API to query if the theme...
  2. Re: how to get Windows title bar color set in system (Win 10)

    That is exactly the first logical thing I tried but it didn't work. That's why I kept trying with many other constants but no success.

    your code suggestion gives me the color #b9d1ea which is a...
  3. Re: how to get Windows title bar color set in system (Win 10)

    I still can't figrue out the correct Part and State constants\values that are required in the GetThemeColor API for retrieving the current theme color of the title bar in U]inactive[/U] windows
    ...
  4. Re: how to get Windows title bar color set in system (Win 10)

    Hi DEXWERX,

    Thanks for the code. It works well.

    Now Im trying to get the theme color for the inactive caption.
    I have tried the following constantes among many others:

    Theme =...
  5. Replies
    8
    Views
    288

    Re: Adding Animated Icon to Form TitleBar

    I am just curious and thought there would be a more straightforward way of adding an animated icon to the titlebar.
  6. Replies
    8
    Views
    288

    Re: Adding Animated Icon to Form TitleBar

    Thanks guys but the code in that thread does use a windows timer to update the icon frames.


    Public Function PlayAnimation(frm As Form, Optional ByVal IntervalMS As Long = 100, Optional ByVal...
  7. Replies
    8
    Views
    288

    Adding Animated Icon to Form TitleBar

    Hi,

    Is it possible to add an animated icon or ani file on the form titlebar without using a timer that alternates the icon frames.

    Sending WM_SETICON only sets a static icon.

    Thanks.
  8. Re: OpenThemeData For Getting Background Color Of Context Menu Item ? (uxtheme.dll)

    Thanks.

    It will be a while before I wrap my mind around these topics.
  9. Re: OpenThemeData For Getting Background Color Of Context Menu Item ? (uxtheme.dll)

    Hi dilettante,
    Thanks for taking the time to help. I will take a look at the example and see if I can adapt it to my needs.
  10. Re: OpenThemeData For Getting Background Color Of Context Menu Item ? (uxtheme.dll)

    Ok, I see ...Thanks for the advice.
    I quick search on this api came up with this old code of yours. I will take a close look at it and see what I can learn from it.

    Thanks.
  11. Re: OpenThemeData For Getting Background Color Of Context Menu Item ? (uxtheme.dll)

    What I have in mind is to make that color as the background color of the menu bitmap in the last argument of the SetMenuItemBitmaps API so that the bitmap background looks transparent when the user...
  12. Re: OpenThemeData For Getting Background Color Of Context Menu Item ? (uxtheme.dll)

    Hi wqweto,

    You nailed it !! :thumb:

    I successfully read the correct color. (Note: This time, passing the menu handle in the OpenThemeData hwnd arg didn't work. I had to pass 0 like you...
  13. Re: OpenThemeData For Getting Background Color Of Context Menu Item ? (uxtheme.dll)

    Thanks Steve ... That is indeed the correct color but I need to get it programmatically as the color varies from one user machine to another depending on the machine color theme currently applied.
  14. Re: OpenThemeData For Getting Background Color Of Context Menu Item ? (uxtheme.dll)

    The following light-blue color is the one I am trying to read programmatically.

    The highlighted menu is the menu that is currently HOT ie:=active ie:= under tthe mouse pointer.

    Obviously, that...
  15. Re: OpenThemeData For Getting Background Color Of Context Menu Item ? (uxtheme.dll)

    @wqweto

    Didn't work for me. I had to pass the menu handle in order for it to work.

    I have tried many constant combinations but none of them give me the exact highlight color.

    @dilettante.
    ...
  16. Re: OpenThemeData For Getting Background Color Of Context Menu Item ? (uxtheme.dll)

    I have just passed the Menu Handle to the OpenThemeData API and have tested the following constants in the GetThemeColor API arguments.

    PartID=> VSCLASS_MENU
    StateID=> MENU_POPUPITEM
    PropID=>...
  17. OpenThemeData For Getting Background Color Of Context Menu Item ? (uxtheme.dll)

    Hi there,

    Windows 10

    I have created a right-click context menu (CreateMenu Win32 API) with 3 menu entries\items. The 3 menu items have all a light-grey background color but, when I point the...
  18. Re: SetMenuItemBitmaps ...LR_CREATEDIBSECTION (Transparent Background)

    How will I paint the background ?
    Will I need to create a temp memory bitmap for that and then use AlphaBlend to blend the 2 bitmaps ?

    Thanks.
  19. Re: SetMenuItemBitmaps ...LR_CREATEDIBSECTION (Transparent Background)

    Thanks.
  20. SetMenuItemBitmaps ...LR_CREATEDIBSECTION (Transparent Background)

    sFile = "C:\Temp\MyBMP.bmp"
    hDib = LoadImage(0, sFile, IMAGE_BITMAP, 16, 16, LR_LOADFROMFILE Or LR_CREATEDIBSECTION)
    Call SetMenuItemBitmaps(hMenu, 1, MF_BYPOSITION, hDib, hDib)


    Hi,

    Trying...
  21. Replies
    0
    Views
    291

    Late binding CUIAutomation

    I have the following code which uses IAUtomation to get me the bounding rects of the tabs in a MultiPage control... The code works fine because it uses early binding.

    I can't seem to make this...
  22. Replies
    8
    Views
    518

    Re: Check if Pointer is valid ?

    I will probably do that (Also, same suggestion offered by wqweto)
    Thanks.
  23. Replies
    8
    Views
    518

    Re: Check if Pointer is valid ?

    Thanks... I thought about that but I wanted to make this foolprof so that if the vba project was reset by accident and there was a state loss and therefore the class Terminate-event wouldn't cleanup...
  24. Replies
    8
    Views
    518

    Re: Check if Pointer is valid ?

    Ok- let me explain what I am trying to do.

    Basically, I have a class and I have some code that is meant to be ran upon initializing the class (ie:- inside the Class_Initialize event).

    The issue...
  25. Replies
    8
    Views
    518

    Check if Pointer is valid ?

    Hi,

    Is there a way of figuring out if an object pointer is valid ? (ie:- points to a valid instanciated object)

    Thanks.
  26. Re: Stuck with this Language Detection Service code

    @wqweto, @dilettante
    Thank you.

    @peterst
    Thanks, I will take a look at the links
  27. Re: Stuck with this Language Detection Service code

    Bump.
  28. Replies
    7
    Views
    482

    Re: CopyMemory ByVal\ByRef confusion

    Thanks Steve Grant.
    Yes. I know that API and have used it before.

    The confusion about my OP is not cleard up yet though.
  29. Replies
    7
    Views
    482

    Re: CopyMemory ByVal\ByRef confusion

    Thanks.

    That doesn't seem to be the case with non-strings

    Example for getting a Long value from its pointer:

    Function ValFromPtr(ByVal Ptr As Long) As Long
    CopyMemory ByVal...
  30. Replies
    7
    Views
    482

    CopyMemory ByVal\ByRef confusion

    Here is this simple StrFromPtr function to get a string from its pointer:



    Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" _
    (Destination As Any, Source As Any, ByVal Length As...
  31. Re: Stuck with this Language Detection Service code

    Ok, here is simpler and much smaller code (for easier reading) that is supposed to get all Els installed services and fill the array of MAPPING_SERVICE_INFO stuctures with corresponding information....
  32. Re: Stuck with this Language Detection Service code

    The MappingGetServices second argument expects the Address of a pointer to an array of MAPPING_SERVICE_INFO udts ... You are wrongly passing a pointer to a MAPPING_ENUM_OPTIONS udt.
  33. Re: Stuck with this Language Detection Service code

    Yes. I noticed that before which seemed dodgy but why does MappingGetServices return S_OK and dwServicesCount returns the count of installed services ?

    I thought that a successful call to...
  34. Re: Stuck with this Language Detection Service code

    Thanks guys for taking a look and offering your suggestions.

    I have already tried every combination I could think of ( ByRef, ByVal ...Regular variable instead of Const ect ...). Nothing seems to...
  35. Stuck with this Language Detection Service code

    Hi,

    I am experimenting with this code which uses the native Elscore.lib (Windows 7 and later versions)

    The following C code excerpt comes from here :...
  36. Replies
    4
    Views
    370

    Re: "As Any" in a UDT ?

    Thanks for the explanation :)
  37. Replies
    4
    Views
    370

    Re: "As Any" in a UDT ?

    Sorry, See late Edit .
  38. Replies
    4
    Views
    370

    "As Any" in a UDT ?

    I am trying to translate some C code into VB.

    There is a C Structure where one of the members is declared "As Any"

    VB doesn't accept "As Any" as a data type for UDT members.

    What is the...
  39. Re: (Excel)____ VarType returning "wrong" result !

    Cool !:)

    Thanks.
  40. Re: (Excel)____ VarType returning "wrong" result !

    Hi wqweto,

    Do those first 2 extracted Bytes correspond to the following ? :

    From the Variant Type Documentation:
    A variable of variant type, for brevity called a "variant", as defined in...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width