hey:)
i created a popup menu in my form
is there a way when i right click it will show me the text from right to left?
now it shows from left right by defualt
tnx for the help
Printable View
hey:)
i created a popup menu in my form
is there a way when i right click it will show me the text from right to left?
now it shows from left right by defualt
tnx for the help
If you mean you want text to appear right aligned then probably NO.
You may instead design your own form and show it on right click instead.
... or you just have to search for the correct words.
Look at Post #3
http://forums.codeguru.com/showthrea...u-to-the-right
Code:private Declare Function GetMenu Lib "user32" (byval hwnd as Long) as Long
private Declare Function ModifyMenu Lib "user32" Alias "ModifyMenuA" (byval hMenu as Long, byval nPosition as Long, byval wFlags as Long, byval wIDNewItem as Long, byval lpString as Any) as Long
private Const MF_BYPOSITION as Long = &H400&
private Const MF_STRING as Long = &H0&
private Const MF_RIGHTJUSTIFY as Long = &H4000
private Sub Form_Load()
Dim hMenu as Long
hMenu = GetMenu(me.hwnd)
' the second parameter in this example is the menu position...
'the first menu is at 0
Call ModifyMenu(hMenu, 3, MF_BYPOSITION Or MF_RIGHTJUSTIFY, MF_STRING, "&Help")
End Sub
it dont work
beacuse i made the rightclick not visible in the form
with a popup menu
Code:Private Sub Form_Load()
Dim hMenu As Long
hMenu = GetMenu(Me.mnuRightClick)
' the second parameter in this example is the menu position...
'the first menu is at 0
Call ModifyMenu(hMenu, 3, MF_BYPOSITION Or MF_RIGHTJUSTIFY, MF_STRING, "&Help")
rhino do you have skype ?
beacuse i cant send you message here
i need to ask you something
Your error is the GetMenu-Line. You have to leave that one as it is in the sample.
I've marked something red in the code. This is where you have to select which menu to change with 0 being the first menu in the menubar (The "3" was just an example)
Code:private Declare Function GetMenu Lib "user32" (byval hwnd as Long) as Long
private Declare Function ModifyMenu Lib "user32" Alias "ModifyMenuA" (byval hMenu as Long, byval nPosition as Long, byval wFlags as Long, byval wIDNewItem as Long, byval lpString as Any) as Long
private Const MF_BYPOSITION as Long = &H400&
private Const MF_STRING as Long = &H0&
private Const MF_RIGHTJUSTIFY as Long = &H4000
private Sub Form_Load()
Dim hMenu as Long
hMenu = GetMenu(me.hwnd)
' the second parameter in this example is the menu position...
'the first menu is at 0
Call ModifyMenu(hMenu, 3, MF_BYPOSITION Or MF_RIGHTJUSTIFY, MF_STRING, "&Help")
End Sub
what is the 3 mean?
It's the position of the menu with 0 being the first, like in this example:
0 - File
1 - Edit
2 - View
3 - Extras
4 - Help
and so on.....
do i put this in a module?
Code:private Declare Function GetMenu Lib "user32" (byval hwnd as Long) as Long
private Declare Function ModifyMenu Lib "user32" Alias "ModifyMenuA" (byval hMenu as Long, byval nPosition as Long, byval wFlags as Long, byval wIDNewItem as Long, byval lpString as Any) as Long
private Const MF_BYPOSITION as Long = &H400&
private Const MF_STRING as Long = &H0&
private Const MF_RIGHTJUSTIFY as Long = &H4000
Yes, but instead of "private" declare it "public"
tnx for the help guys
So the code i found worked?
nope but tnx for the help:)