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

Home Posts Topics Members FAQ

How to remove the space occupied by a control when it is hidden in c# windows form?

Prathap
37 New Member
Could someone please tell me how to remove the space occupied by a control when it is hidden.
Feb 22 '12 #1
3 8713
GaryTexmo
1,501 Recognized Expert Top Contributor
What do you mean, exactly... like, you want to hide a control and have everything else shift up to fill in?

I think you're going to have to give us more information about what you're doing... like, are your controls directly on the form or are they in a panel. Is the panel a FlowLayoutPanel or just a regular panel?

Anyway, unless it's a FlowLayoutPanel and it automatically does this, I think you'll have to handle this manually. If a FlowLayoutPanel doesn't do this, you can always remove your control from the panel when you hide it, then re-add it in the correct place when you show it.

Play around, and if you need some help feel free to ask but give us more information about what you're trying to do.
Feb 22 '12 #2
Prathap
37 New Member
Suppose, i placed 3 buttons directly in a form(button1 button2 button3)and i changed the visibility of button2 as hidden.When we run the form a blank space will be there between button1 and button2.I dont know how to remove that blank space.Please help
Feb 23 '12 #3
GaryTexmo
1,501 Recognized Expert Top Contributor
Please see the second part of my post above.
Feb 23 '12 #4

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

Similar topics

1
1962
by: Gilad | last post by:
Hi, I'm trying to use ActiveX control with more than one interface into my window form. any way i'm trying to do it (through the IDE or through AxImp.exe) the only interface exposed is the default interface. till now the only way i found for doing this is to use the AxImp.exe and generate a .cs file and then to edit it:
0
2068
by: Bassem | last post by:
Hi All, I had problem when using Crystal Report in C# windows application. I create report depend upon dataset using table from SQL 2000 and add it in a C# windows application. NP: The application had 2 forms, one with preview button which will call the report from the other form and the other hold the crystal report. The time I get to run the application and preview the report by clicking the preview button from the first form I get...
1
1331
by: Ed Mundorf | last post by:
I want to create a .NET windows user control that I can use in a Visual Basic 6.0 or Power Builder 9 application. I created a new Windows Control Library, set the property "Register for COM Interop" = True, and created a strong name and set the "Wrapper Assembly Key File" file to it. When I try to add the control to my VB 6.0 or PB app, I get an error stating that the component "was not registerable as an ActiveX compoent". I know I'm...
1
1906
by: Richard | last post by:
I think I'm going brain dead on this one. Can someone give me an idea on how to do this? Some sample code would be helpful.
0
1047
by: James J. Foster | last post by:
Is there a way to instruct visual studio to give each instance of a user control a unique attribute value, by specifying a pattern for an incremental index? Similar to how visual studio automatically determines a unique ID value. For example, if my control has an attribute panelnumber, as in: <my:panel panelnumber="pan1" runat="server" id="panel1" /> I want to establish a pattern placeholder, eg "pan##", whereby VS.NET will
4
1457
by: A Traveler | last post by:
Hello all, I have a control i wrote which inherits from asp:label. It worked fine. It extends asp:label with a "For" property which implements the "for" attribute of an html label tag (yes i know the latest framework vers. added this, but i want ot get mine right as a learning exp.). I added a designer class which turns the For property into a dropdown list of the names of all the controls so you can simply pick one. When i added the...
9
1962
by: Justin Engelman | last post by:
Hi, I have a website that uses an ISAPI filter that will redirect anyone going to any page on the site to an SSL login page (on a different website with the same root domain) if they do not have the appropriate session cookie already. After logging in on that page successfully they are given the cookie and redirected back to the page they initially tried to go to. I would like to create a Windows application that gets data from that...
2
3144
by: Vish | last post by:
Hi, I am trying to move controls around in a form based on user selection on a combo-box. So i hard coded the location and distances of where and how much to move controls by in my program. Everything works fine on my machine. But when i run my program on another machine which has a diferent DPI setting on the monitor(mine was 120 and the other machine was 96) the control position and the distances were bad. I am assuming that it because...
1
2754
by: Kots | last post by:
Hi, I have an excel sheet, and have a column called Customer Name. This column contains data that is in different languages.. english, chinese, Japanese and Korean names. I need to import this column data into SQL Server 2000 table called Customer. This table has a Customer Name column and it is nvarchar type. I trird this to import using the SQL standard "Import Data..." option but in the SQL Server column it shows ??? symbol or small...
2
1687
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I think if the object type of the control is not System.Windows.Forms.xxx, then it is a user-defined control. But how to tell the type of the user-defined control: Composite(User), Extended, and Custom?
0
9722
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
10643
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...
0
10378
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10391
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
9200
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7664
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
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...
1
4333
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
3862
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.