|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Add custom button on title barHi all,
I need to add a custom button to title bar on a form in addition of a standard button. (Minimize/Maximize, close etc.) I need also to handle OnClick event of this button. I looked around google but i'm not able to find any example that can help me. Many thanks in advance for your help. Marco Marcolino wrote:
> I need to add a custom button to title bar on a form in addition of a Why?> standard button. (Minimize/Maximize, close etc.) Unless you're doing something very, /very/ specialised, what does this gain you or, more importantly, your users that you /can't/ achieve in a more "standard" Windows way? > I looked around google but i'm not able to find any example that can Which ought to suggest that, perhaps, it's not a very good thing to do...> help me. Regards, Phill W.
Show quote
Hide quote
On 2 Mag, 18:12, "Phill W." <p-.-a-.-w-a-r...@-o-p-e-n-.-a-c-.-u-k> Hi Phil,wrote: > Marcolino wrote: > > I need to add a custom button to title bar on a form in addition of a > > standard button. (Minimize/Maximize, close etc.) > > Why? > > Unless you're doing something very, /very/ specialised, what does this > gain you or, more importantly, your users that you /can't/ achieve in a > more "standard" Windows way? > > > I looked around google but i'm not able to find any example that can > > help me. > > Which ought to suggest that, perhaps, it's not a very good thing to do... > > Regards, > Phill W. I have my reason to do this. In deep I need to change the behavior of Maximize/Restore Button on a form. To make this I subclassed System message to a form and now i'm able to run my custom code. But after this, the Maximize button will not change to minimize. I tried with SetWindowLong and then SetWindowPos, but this change the button but also maximize the form and I do not need this. So I think to disable standard Maximize/restore button and to add a new customized one, so I'll be able to make whatever I want. I hope this is clear for you and the reason for may need. Many thanks for your attention. --Marco Marcolino wrote:
Show quoteHide quote > On 2 Mag, 18:12, "Phill W." <p-.-a-.-w-a-r...@-o-p-e-n-.-a-c-.-u-k> Again, I ask .. why?> wrote: >> Marcolino wrote: >>> I need to add a custom button to title bar on a form in addition of a >>> standard button. (Minimize/Maximize, close etc.) >> Why? >> >> Unless you're doing something very, /very/ specialised, what does this >> gain you or, more importantly, your users that you /can't/ achieve in a >> more "standard" Windows way? >> >>> I looked around google but i'm not able to find any example that can >>> help me. >> Which ought to suggest that, perhaps, it's not a very good thing to do... >> >> Regards, >> Phill W. > > Hi Phil, > I have my reason to do this. In deep I need to change the behavior of > Maximize/Restore Button on a form. *Every* other Windows application that shows these buttons (you /can/ just hide them, BTW) behaves in exactly the same way. They have done for years and (hopefully) will continue to do so for years to come. Users are /familiar/ with this and "expect" [all] their applications to work this way. If you change this behaviour, especially if you are tinkering with an area of the window that is normally /outside/ of an application's control and should be the same for /every/ window shown to the user, then you're going to confuse and alienate your user community. > the Maximize button will not change to minimize. And I should hope not!If I click a Maximise button on any window, I expect that window to maximise itself. Your application is going to do something different? Expect to be flooded with "bug reports" from your users. Take a step back for your current problem and tell us what it is that you want to /achieve/ (not how). Why do you want to change the behaviour of these buttons? We might be able to give you a more "standard" (i.e. more familiar, user-friendly, etc.) alternative. Regards, Phill W.
Show quote
Hide quote
"Phill W." <p-.-a-.-w-a-r-d-@-o-p-e-n-.-a-c-.-u-k> wrote in message Not really Phill. I have used several windows applications that contain news:f1claa$eif$1@south.jnrs.ja.net... > Marcolino wrote: >> On 2 Mag, 18:12, "Phill W." <p-.-a-.-w-a-r...@-o-p-e-n-.-a-c-.-u-k> >> wrote: >>> Marcolino wrote: >>>> I need to add a custom button to title bar on a form in addition of a >>>> standard button. (Minimize/Maximize, close etc.) >>> Why? >>> >>> Unless you're doing something very, /very/ specialised, what does this >>> gain you or, more importantly, your users that you /can't/ achieve in a >>> more "standard" Windows way? >>> >>>> I looked around google but i'm not able to find any example that can >>>> help me. >>> Which ought to suggest that, perhaps, it's not a very good thing to >>> do... >>> >>> Regards, >>> Phill W. >> >> Hi Phil, >> I have my reason to do this. In deep I need to change the behavior of >> Maximize/Restore Button on a form. > > Again, I ask .. why? > > *Every* other Windows application that shows these buttons (you /can/ just > hide them, BTW) behaves in exactly the same way. They have done for years > and (hopefully) will continue to do so for years to come. Users are > /familiar/ with this and "expect" [all] their applications to work this > way. > custom titlebar buttons. Hmm, I believe most of these apps were installed via video card bundled software and they allow you to do many things with the "window" that has nothing to do with the application. Of course, this was a modification to ALL applications installed, and not just it's own application. The button I am remember for 1 case was actually a context menu when you clicked on it and allowed you to change the resolution of the window, size, colors, etc. Pretty nifty for the advanced use... Mythran
Show quote
Hide quote
On May 3, 11:46 am, "Mythran" <kip_pot***@hotmail.com> wrote: I believe Phill was talking about changing the behavior of the> "Phill W." <p-.-a-.-w-a-r...@-o-p-e-n-.-a-c-.-u-k> wrote in message > > news:f1claa$eif$1@south.jnrs.ja.net... > > > > > Marcolino wrote: > >> On 2 Mag, 18:12, "Phill W." <p-.-a-.-w-a-r...@-o-p-e-n-.-a-c-.-u-k> > >> wrote: > >>> Marcolino wrote: > >>>> I need to add a custom button to title bar on a form in addition of a > >>>> standard button. (Minimize/Maximize, close etc.) > >>> Why? > > >>> Unless you're doing something very, /very/ specialised, what does this > >>> gain you or, more importantly, your users that you /can't/ achieve in a > >>> more "standard" Windows way? > > >>>> I looked around google but i'm not able to find any example that can > >>>> help me. > >>> Which ought to suggest that, perhaps, it's not a very good thing to > >>> do... > > >>> Regards, > >>> Phill W. > > >> Hi Phil, > >> I have my reason to do this. In deep I need to change the behavior of > >> Maximize/Restore Button on a form. > > > Again, I ask .. why? > > > *Every* other Windows application that shows these buttons (you /can/ just > > hide them, BTW) behaves in exactly the same way. They have done for years > > and (hopefully) will continue to do so for years to come. Users are > > /familiar/ with this and "expect" [all] their applications to work this > > way. > > Not really Phill. I have used several windows applications that contain > custom titlebar buttons. Hmm, I believe most of these apps were installed > via video card bundled software and they allow you to do many things with > the "window" that has nothing to do with the application. Of course, this > was a modification to ALL applications installed, and not just it's own > application. The button I am remember for 1 case was actually a context > menu when you clicked on it and allowed you to change the resolution of the > window, size, colors, etc. Pretty nifty for the advanced use... > > Mythran "default" buttons (minimize, restore, maximize, close) and not about additional custom buttons (like NVidia's nview titlebar buttons). Thanks, Seth Rowe On 3 Mag, 18:57, rowe_newsgroups <rowe_em***@yahoo.com> wrote:
Show quoteHide quote > On May 3, 11:46 am, "Mythran" <kip_pot***@hotmail.com> wrote: Hi All,> > > > > > > "Phill W." <p-.-a-.-w-a-r...@-o-p-e-n-.-a-c-.-u-k> wrote in message > > >news:f1claa$eif$1@south.jnrs.ja.net... > > > > Marcolino wrote: > > >> On 2 Mag, 18:12, "Phill W." <p-.-a-.-w-a-r...@-o-p-e-n-.-a-c-.-u-k> > > >> wrote: > > >>> Marcolino wrote: > > >>>> I need to add a custom button to title bar on a form in addition of a > > >>>> standard button. (Minimize/Maximize, close etc.) > > >>> Why? > > > >>> Unless you're doing something very, /very/ specialised, what does this > > >>> gain you or, more importantly, your users that you /can't/ achieve in a > > >>> more "standard" Windows way? > > > >>>> I looked around google but i'm not able to find any example that can > > >>>> help me. > > >>> Which ought to suggest that, perhaps, it's not a very good thing to > > >>> do... > > > >>> Regards, > > >>> Phill W. > > > >> Hi Phil, > > >> I have my reason to do this. In deep I need to change the behavior of > > >> Maximize/Restore Button on a form. > > > > Again, I ask .. why? > > > > *Every* other Windows application that shows these buttons (you /can/ just > > > hide them, BTW) behaves in exactly the same way. They have done for years > > > and (hopefully) will continue to do so for years to come. Users are > > > /familiar/ with this and "expect" [all] their applications to work this > > > way. > > > Not really Phill. I have used several windows applications that contain > > custom titlebar buttons. Hmm, I believe most of these apps were installed > > via video card bundled software and they allow you to do many things with > > the "window" that has nothing to do with the application. Of course, this > > was a modification to ALL applications installed, and not just it's own > > application. The button I am remember for 1 case was actually a context > > menu when you clicked on it and allowed you to change the resolution of the > > window, size, colors, etc. Pretty nifty for the advanced use... > > > Mythran > > I believe Phill was talking about changing the behavior of the > "default" buttons (minimize, restore, maximize, close) and not about > additional custom buttons (like NVidia's nview titlebar buttons). > > Thanks, > > Seth Rowe- Nascondi testo tra virgolette - > > - Mostra testo tra virgolette - Phil I'm Italian and I'm not write English very well, but in any way I will try to explain you and all other guys my needs. So, the truth is that the maximize button on my app will operate as Microsoft want, maximizing the form but in a little bit different way. I'm trying to explaing.............. I have an MDI container with a toolbar docked on the top. Inside this MDI I have my child form. With standard behavior, when I'll click on maximize, the child form will be maximized but the Title Bar of my child form will go between the title bar of MDI and the ToolBar Docked on the top of MDI. This is horrible to see for me and final users. In addition all other child form that will open, will be maximized, also if for default the maximize button is disable on their properties. I don't need this. So I modified a little bit the behavior of maximixe button, to adapt my child form, to MDI maximum usable space. With this operation, my child will seems maximized, but its title bar remain on its top and all other child that will be open mantain their original ratio and position. The user of this app, agree with me from this point of view. The only thing that miss to my "Little Bit Modified Maximize" is to change the Maximize Button to Restore Button after maximized to return the child form to its original size. From here was born my request on this Newsgroup. I hope that it's clear. In any way many thanks for your helps. Bye Marco
http://www.codeproject.com/vb/net/transmenuandtitlebuttons.asp
Show quote Hide quote "Marcolino" <marco.pozzu***@gmail.com> wrote in message
news:1178119122.492704.163840@n76g2000hsh.googlegroups.com... > Hi all, > I need to add a custom button to title bar on a form in addition of a > standard button. (Minimize/Maximize, close etc.) > I need also to handle OnClick event of this button. I looked around > google but i'm not able to find any example that can help me. > > Many thanks in advance for your help. > > Marco > |
|||||||||||||||||||||||