473,809 Members | 2,620 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FormBorderStyle .None & Taskbar Click

3 New Member
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
4 5123
RhysW
70 New Member
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 New Member
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 New Member
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 New Member
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
19875
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: 1. Does the screen resolution comply to the minimum resolution? 2. What's the height of the taskbar?
0
1537
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 look closely you can see that the title bar is drawn, then disappears making the entire form seem to shift. Is there a way around this behavior? A related question: Is there a way I can allow the parent form's background image to show through...
4
16246
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 email, but please do not. www.ilopia.com - FAQ and Tutorials for Windows Server 2003
4
6363
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 position(after the mouse is at the edge of the form and starts to move out of the form with the mouse button down) Any ideas anybody? There's got to be an easier and more effective way right?
2
2472
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 pixel of the menu, i have got a line drawn. This line divide the menu and the rest of the form. How can I make the line disappear? Thanks Rafi
4
2480
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 = window.open("logon2.aspx", "remote", windowprops); But the code that removes its borders is in c#???: this.FormBorderStyle = FormBorderStyle.None; this.MaximizeBox = false; this.MinimizeBox = false;
5
2878
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 right clicks the application in the taskbar. How can i do this?
0
1665
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 FormBorderStyle = Sizeable, for instance, the icon will display again. This problem only occurs in Win2k. The icon works fine in WinXP. Anyone seen this before? Any suggestion? Thanx, -- J Siems
5
10349
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 right click on the form button in the taskbar, (i guess that's because there is no titlebar or control button). Is there any way to display it, or better yet can i catch the right click on the taskbar button and display my own app menu?
3
4686
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
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10640
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10387
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5689
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.