Re: Need help with modify notify windowstate and sysmenu
Thanks, this is awesome :D Hopefully we can find a way how to place the icon next to the text. Can you help if I can change the font type of bold to Regular text style??
Hopefully I can make the look better ;)
Thanks,
Mark
Re: Need help with modify notify windowstate and sysmenu
I would try out the SetMenuItemBitmaps() on monday. Haven't VB2005 here for the weekend.
Have you got an icon you want to use?
1 Attachment(s)
Re: Need help with modify notify windowstate and sysmenu
Mark,
a little more research has revealed a solution which makes SetMenuItemBitmaps() obsolete.
It was a mistake in using the MENUITEMINFO.fMask value which killed away the icons and the fontbold.
I have attached a new Module3.vb code which leaves font and icon untouched when changing the text.
Another thing:
In Module2, in Function ReadCompleteFile you better put an On Error Resume Next as very first Line, like:
Code:
Function ReadCompleteFile() As Boolean
On Error Resume Next
Dim sr As New StreamReader(IniFile)
....
Otherwise you get an error when changing the folder or folder name of the project.
The On Error Resume Next lets you step into the error handler instead and assume the default language to english. This only ever can happen the first time the program is run from a different folder, but it CAN happen. So this prevents the program from crashing then.
Re: Need help with modify notify windowstate and sysmenu
Thanks for your help WoF! This is awesome and I'd love this work you have given me. But hey, I wondering how I could change the font style, E.G change the style for 'Close' and 'Restore' which I would like to change from Bold to Regular. How I can do that, what's the proper way to do??
Thanks for the help, you have been awesome :D
Thanks,
Mark
Re: Need help with modify notify windowstate and sysmenu
Thanks for the flowers. :)
I haven't yet researched to a deeper extend, but there exists an API call ModifyMenu. If I find time tonight I shall take a look how it could be accomplished to change an item's font. Should be possible but I don't know many details about menu structures. I would have expected the font to be specified in the MENUITEMINFO struct, but it isn't...
I see what I can find out.
Re: Need help with modify notify windowstate and sysmenu
No problem WoF :)
Let me know when you have found situations.
It would be useful when someone see this and then post.
Thanks,
Mark
2 Attachment(s)
Re: Need help with modify notify windowstate and sysmenu
I reply here to your PM, where we have resolved the MenuItem changing meanwhile.
I can't experience your problem with menu size changing at my place.
I'm attaching 2 images to show the french and english system menus.
The sizes are still the same even after me changing 20 times from french to english.
There is no choice as to attach the project again, cause mine seems to be different then. :)
Re: Need help with modify notify windowstate and sysmenu
Seems like you're doing things the hard way. Look at this thread:
http://www.codeguru.com/forum/showth...03#post1698503
Re: Need help with modify notify windowstate and sysmenu
Thanks for your advise my dear friends WoF and dglienna. Following on dglienna's earlier post on my previous thread, I did not awake that resource file is actually the better place for me to use with more support on it. I found the code which it would be much useful to get access to the resource:
Code:
Imports System.Globalization
Imports System.ComponentModel
Imports System.Resources
Imports System.Threading
Private Sub Text1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Text1.Click
Me.Text1.Text = (My.Resources.RuntimeStrings_fr.text1)
End Sub
Private Function MenuItems(ByVal locale_name As String, ByVal checked_button As ToolStripMenuItem, ByVal unchecked_button As ToolStripMenuItem) As Frm1
If Not Me.Created Then Return Nothing
' Make a CultureInfo.
Dim culture_info As New CultureInfo(locale_name)
' Make the thread use this locale.
Thread.CurrentThread.CurrentUICulture = culture_info
Thread.CurrentThread.CurrentCulture = culture_info
Dim frm As New Frm1
frm.Location = Me.Location
Return frm
End Function
How do I write on Private Function to grab the system menu info and replace the texts that come on resource file??
It bit the same as the old work on my project that WoF have already post it. So sorry about changing it again but I didn't realised it what I want.
Thanks,
Mark
Re: Need help with modify notify windowstate and sysmenu
Found the proper code as it works but how I could read each of different system menu items, E.G Restore, Move Size, Minimize, Maximum and Close.
The working code is:
Code:
a = (My.Resources.RuntimeStrings_en1.English)
The code on above shows that it grab the system menu items and display the info from the resource to replace all of the system menu items texts.
What way I could grab each of those system menu items from grab the info on resource and replace the texts instead??
Something would be like this:
Code:
a = MenuItems1(My.Resources.RuntimeStrings_en1.English)
a = MenuItems2(My.Resources.RuntimeStrings_en1.English)
a = MenuItems3(My.Resources.RuntimeStrings_en1.English)
a = MenuItems4(My.Resources.RuntimeStrings_en1.English)
a = MenuItems5(My.Resources.RuntimeStrings_en1.English)
a = MenuItems6(My.Resources.RuntimeStrings_en1.English)
Hope you guys can help me with this and it will be resolve :)
Thanks,
Mark
Re: Need help with modify notify windowstate and sysmenu
Any luck yet if the system menu can be possibly to change the font which also to support unicode character sets??
Thanks,
Mark
Re: Need help with modify notify windowstate and sysmenu
You have never helped anyone with anything. In 3 years, you should be able to help someone, don't you think?
You said before that you 'found the code' that solved your problem. That is not what programming is!
If you are waiting for someone ELSE to post the same question to get it answered, then I guess the answer is NO.
I don't have any reason to do it, though.
Re: Need help with modify notify windowstate and sysmenu
is it possible to change the font for system menu??
Any info to post will be welcome :)
Thanks,
Mark
Re: Need help with modify notify windowstate and sysmenu