|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
writing custom event for minimise, restore and close buttonsI have an example of code that allows and application to minise to the
notification tray but how can I override the minimise and close buttons to ensure they always go back to the notify tray instead of closing the application or minimising the the taskbar? I am sure this must be simple I just can't find any information about it. smarty wrote:
> I have an example of code that allows and application to minise to the why dont you check the window state in form resize event, if the window > notification tray but how can I override the minimise and close buttons to > ensure they always go back to the notify tray instead of closing the > application or minimising the the taskbar? > > I am sure this must be simple I just can't find any information about it. state is minimized then write code to send your application to the notification area. regards Vilsad Thanks for the replay. I have used the resize event and this works fine for
minimising to the task tray but not sure how to override the X close event to minimise to task tray. Any ideas? Show quoteHide quote "Vilsad" wrote: > smarty wrote: > > I have an example of code that allows and application to minise to the > > notification tray but how can I override the minimise and close buttons to > > ensure they always go back to the notify tray instead of closing the > > application or minimising the the taskbar? > > > > I am sure this must be simple I just can't find any information about it. > why dont you check the window state in form resize event, if the window > state is minimized then write code to send your application to the > notification area. > regards > Vilsad > smarty wrote:
Show quoteHide quote > Thanks for the replay. I have used the resize event and this works fine for you can use the formclosing event to override the closing of your > minimising to the task tray but not sure how to override the X close event to > minimise to task tray. > > Any ideas? > > > "Vilsad" wrote: > > >>smarty wrote: >> >>>I have an example of code that allows and application to minise to the >>>notification tray but how can I override the minimise and close buttons to >>>ensure they always go back to the notify tray instead of closing the >>>application or minimising the the taskbar? >>> >>>I am sure this must be simple I just can't find any information about it. >> >>why dont you check the window state in form resize event, if the window >>state is minimized then write code to send your application to the >>notification area. >>regards >>Vilsad >> window, use e.cancel to cancel the closing and use your code to redirect the window to the notification area regards Vilsad you can use the formclosing event to override the closing of your
window, use e.cancel to cancel the closing and use your code to redirect the window to the notification area regards Vilsad Hi Smarty,
Thanks for your posting! >"but not sure how to override the X close event to minimise to task tray." Overriding the form_onclosing method in VB.NET likes below:Protected Overrides Sub OnClosing(ByVal e As System.ComponentModel.CancelEventArgs) e.Cancel = True Me.Hide() MyBase.OnClosing(e) End Sub Actually, if you want to implement minimize to tray, there is an appropriate article demonstrates how to approach this: http://www.pixvillage.com/blogs/devblog/archive/2005/03/26/174.aspx Unfortunately, the article is for VB.NET version. So, if you have any concerns or issues, please feel you free to let me know. It's my pleasure to be a future assistance! Regards, Yuan Ren [MSFT] Microsoft Online Support ====================================================== PLEASE NOTE the newsgroup SECURE CODE and PASSWORD were updated on February 14, 2006. Please complete a re-registration process by entering the secure code mmpng06 when prompted. Once you have entered the secure code mmpng06, you will be able to update your profile and access the partner newsgroups. ====================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from this issue. ====================================================== This posting is provided "AS IS" with no warranties, and confers no rights. ======================================================
VSTO 2005 - Read Range from excel
Create application to extract data from excel sheet How can we mail some file without mentioning the SMTP server addre OOP / 3-Tier development questions VB.NET 2005 & XML Treeview population directly from MSAccess How to create a Service to Log Application Names Re: "Visual Web Developer does not support creating Web sites on a Macros too slow ! Datagrid with comboboxes |
|||||||||||||||||||||||