Results 1 to 10 of 10

Thread: Windows Menu, Please help

  1. #1

    Thread Starter
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    Question

    Hi,
    I was wondering if any one here know if it is possible to chnage the windows menu using API. I have a friend in Sweden who purchased a PC which comes with Swidish version of Win 2000, naturally all the menus are in Swedish. I was wondering if there is a way i can change the menus to English.

    If its not possibe through VB is there any utility or program that i can use.

    Thanks for your help

    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  2. #2
    Lively Member
    Join Date
    Aug 2000
    Location
    quebec
    Posts
    81
    Sounds dangerous to me!

    To change an applications menus you have to either write
    another app that hooks into the original app's menu system
    and then you'd have to know exactly what menu items
    to change. And still if the original app does any kind of
    menu manipulation at run-time you'll end up messing the whole
    thing up sooner or later unless you designed that app and you know exactly how it works.

    However if the original was compiled and written to use menu and string
    resources in a resource file you simply need a good
    resource editor to open the .exe or a .dll that contains
    those string resources and then change one by one manually.

    Then you save your changes (to a copy) and that should work.

    Still, if it's not your app, I would not recommend this kind of thing.

    You're better off checking for another language version.
    C/C++,Delphi,VB6,Java,PB (blech!),ASP,JSP,SQL...bla bla bla and bla
    I love deadlines. I like the whooshing sound they make as they fly by.
    —Douglas Adams

  3. #3

    Thread Starter
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Hi,

    Thanks for your reply. After reading the reply from u guys i think i will tell my friend to buy a English version of the Windows.

    Thanks again
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  4. #4
    Lively Member
    Join Date
    Aug 2000
    Location
    quebec
    Posts
    81

    Thumbs up

    good idea
    C/C++,Delphi,VB6,Java,PB (blech!),ASP,JSP,SQL...bla bla bla and bla
    I love deadlines. I like the whooshing sound they make as they fly by.
    —Douglas Adams

  5. #5
    Guest
    I would recommend you first return this version (to get your money back) then get the Engligh version.

  6. #6

    Thread Starter
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Hi Megatron,
    He already tried that, the PC comes with Swidish version of Windows 2000 and the PC manufacture wouldnt give him a English version.

    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  7. #7

    Thread Starter
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    Menu at Runtime

    Hi,
    Talking of modifying menu is there any way i can create a full menu structure at run time. I know how to make menu at run time using the control array but this way it is not very flexible. I wanna create menu which can have more then two sub menus. The best example would be IE's Favorite menu. I want to create a similar Favorite menu for my Browser.

    Any sample code will be great help.

    Thanks again
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  8. #8
    Guest
    Use AppendMenu.
    Code:
    Private Declare Function AppendMenu Lib "user32" Alias "AppendMenuA" (ByVal hMenu As Long, ByVal wFlags As Long, ByVal wIDNewItem As Long, ByVal lpNewItem As Any) As Long
    Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long
    Private Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long
    Const MF_BYPOSITION = &H400&
    
    Private Sub Command1_Click()
        Dim hMenu As Integer
        Dim hSubMenu As Integer
        hMenu = GetMenu(hwnd)
        hSubMenu = GetSubMenu(hMenu, 0)
        AppendMenu hSubMenu, MF_BYPOSITION, 1, "New Item"
    End Sub

  9. #9

    Thread Starter
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    ERROR

    Hi Megatron,
    Thanks for your code, but it gives me "Over Flow" error in the line.

    hMenu = GetMenu(hwnd)

    Any ideas why.

    Thanks again

    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  10. #10
    Guest
    Sorry about that. Change the declarations to Long. It should work now.
    Code:
    Private Declare Function AppendMenu Lib "user32" Alias "AppendMenuA" (ByVal hMenu As Long, ByVal wFlags As Long, ByVal wIDNewItem As Long, ByVal lpNewItem As Any) As Long
    Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long
    Private Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long
    Const MF_BYPOSITION = &H400&
    
    Private Sub Command1_Click()
        Dim hMenu As Long
        Dim hSubMenu As Long
        hMenu = GetMenu(hwnd)
        hSubMenu = GetSubMenu(hMenu, 0)
        AppendMenu hSubMenu, MF_BYPOSITION, 1, "New Item"
    End Sub

    [Edited by Megatron on 09-07-2000 at 07:41 PM]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width