473,385 Members | 1,661 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

FormBorderStyle.None & Taskbar Click

3
Hi,

I changed FormBorderStyle to FormBorderStyle.None, now when I click on taskbar nothing happen, but window should minimalized/back to normal state.

Any ideas how to solve it?

I'm using Win XP.

- kaem86
Apr 12 '12 #1

✓ answered by RhysW

Ok so i searched about for a bit and found this, it might be of use to you its doing pretty much what you're asking for something to do!

It's for someone else's code but hopefully you will be able to transfer the knowledge into your own code the following
Link should point you in the right direction!

4 5094
RhysW
70
this isnt a problem with your system its the way its set up to work, it wont minimise or anything when you have its border style set to none, can i ask why you are trying to do this?
presumeably because you dont want the user to be able to close the form?
i don't suggest ever trying to stop it but there is a work around, use a fixeddialog state in the borderstyle to keep it to its set size and in the formclosing event you can set the code to e.cancel = true and it should stop the form from closing but again, i dont suggest you ever try to restrict the user

Maybe a little more explanation on what you want to be able achieve would be nice :)
Apr 12 '12 #2
kaem86
3
Sure :)

I wan't use own buttons (min, max, exit, more), so i set FormBorderStyle to FormBorderStyle.None and writed my code to paint window on my way (with my buttons). Buttons are working fine (min, max), but only this effect is annoying. I need something like that (or this code to run automatic):

Expand|Select|Wrap|Line Numbers
  1. void TaskBarClick()
  2. {
  3.     if(this.WindowState != FormWindowState.Minimized)
  4.     {
  5.         prevstate = this.WindowState;
  6.         this.WindowState = FormWindowState.Minimized;
  7.     }
  8.     else this.WindowState = prevstate;
  9. }
For example photoshop have own window style and for this it works fine (clicking on taskbar).
Apr 12 '12 #3
RhysW
70
Ok so i searched about for a bit and found this, it might be of use to you its doing pretty much what you're asking for something to do!

It's for someone else's code but hopefully you will be able to transfer the knowledge into your own code the following
Link should point you in the right direction!
Apr 13 '12 #4
kaem86
3
It's exacly what i needed, thank you :)
Apr 13 '12 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Maurice Mertens | last post by:
Hi, I'm building an application in VB.NET that can only be started if the available desktop space is sufficient. This means that when the user starts the application it has to check 2 things: ...
0
by: Byron | last post by:
I have an MDI chcild form that has a bitmap background image and has its ForborderStyle set to None. Wen the form is shown the entire form seems to shift down and back up as it comes in. If you...
4
by: Kristofer Gafvert | last post by:
What would be the best way to resize a window (form) when FormBorderStyle is set to None? -- Regards, Kristofer Gafvert - IIS MVP Reply to newsgroup only. Remove NEWS if you must reply by...
4
by: harrylmh | last post by:
Hi, I've really been struggling with this. How do I make a form resizable with FormBorderStyle = None? I've had problems trying to get the form to start resizing by following the mouse...
2
by: Rafi Zisman | last post by:
Hi I have a problem with menu and FormBorderStyle = None: I opened new C# project and set the property FormBorderStyle = None , And added main menu. When I run the application and on the last...
4
by: trint | last post by:
Ok, I received info that this will work as a means of removing the border around a window that I create (which also loads an aspx file) in the firing file (aspx using javascript): OpenWindow =...
5
by: Mark Ingram | last post by:
Hi, ive got a form with FormBorderStyle set to None (i am using custom regions to determine the shape of the form). But i would like to be able to display the standard system menu when the user...
0
by: siemsje | last post by:
I've created an app in win2k with a winform using FormBorderStyle = none. With this setting, the app icon is not displayed in the button in the taskbar when the app is running. If I change the...
5
by: Salem | last post by:
Hi! I have a problem. When i set FormBorderStyle property of a form to None i can't get the system menu (that windows menu with close, maximize, minimize and other options) to show up when i...
3
mahboobeh
by: mahboobeh | last post by:
Hi every body I'm tring to handle a mouse click event for the form is minimized to system Task bar(when minimized form in taskbar click). Does any one know how to do that? Thanks
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.