Welcome to Dream.In.Code
Become a C# Expert!

Join 150,393 C# Programmers for FREE! Get instant access to thousands of C# experts, tutorials, code snippets, and more! There are 1,040 people online right now. Registration is fast and FREE... Join Now!




sidebar

 
Reply to this topicStart new topic

sidebar

access2reality
5 Mar, 2008 - 12:23 PM
Post #1

New D.I.C Head
*

Joined: 10 Feb, 2008
Posts: 24


My Contributions
Hi,
I was busy whit this project in last 2 days but i can get what i want .
as you can see it is just a form and if you click on "?" bottom you get a effect which i mead whit
tableLayoutPanel and tow panel .
as you can see it work on the form but what i want is doing same thing whit my form not just tabellayoutpanel.
i try to attach the project but here i don't have permasion so i upload in some free host here is link of project :

http://www.youshare.com/view.php?file=sidebar.rar

thanks

User is offlineProfile CardPM
+Quote Post

Sonic88
RE: Sidebar
5 Mar, 2008 - 01:39 PM
Post #2

D.I.C Head
**

Joined: 19 Feb, 2008
Posts: 166



Thanked: 2 times
My Contributions
You should check your posts before submitting them. That is hardly legible.
User is offlineProfile CardPM
+Quote Post

BenignDesign
RE: Sidebar
5 Mar, 2008 - 02:28 PM
Post #3

You say "People are Dumb" like it's a bad thing.
Group Icon

Joined: 28 Sep, 2007
Posts: 1,038



Thanked: 3 times
Dream Kudos: 150
My Contributions
I would be willing wager access2 is not a native english speaker and tried to explain himself as best he could. unfortunately, I have never used C# so I cannot offer assistance with the problem sad.gif
User is offlineProfile CardPM
+Quote Post

Nykc
RE: Sidebar
5 Mar, 2008 - 02:36 PM
Post #4

That Just Happened!
Group Icon

Joined: 14 Sep, 2007
Posts: 4,509



Thanked: 18 times
Dream Kudos: 275
My Contributions
If you can attach the code.gif it might be easier for us to assist you.
User is online!Profile CardPM
+Quote Post

access2reality
RE: Sidebar
5 Mar, 2008 - 02:49 PM
Post #5

New D.I.C Head
*

Joined: 10 Feb, 2008
Posts: 24


My Contributions
QUOTE(BenignDesign @ 5 Mar, 2008 - 03:28 PM) *

I would be willing wager access2 is not a native english speaker and tried to explain himself as best he could. unfortunately, I have never used C# so I cannot offer assistance with the problem sad.gif


Hi,
Yes ,english is not my mother langu... and i am sorry if i can't explane well. but i must try smile.gif
ok i try to explane better.
i have a form (you can say like PM form in a msn messanger or yahoo messanger) i want the main things like text chat - font size - color and ... be in a form and also if user push a buttom she/he get addational page for voice and video things .
for this i try to make a project which i linked in first post . if you check that project you can see that you have a form and some buttom's and if you try "?" you can see a effect .
what i did in this project you can see it in project file but what i need is i want do same thing wht 2 form . it means if i push "?" i open a new form but whit this type of effect which is in this project .

i will copy the code here for pepole who don't trust my link :

this is code :

CODE

if (panel2.Width > 0)
            {


                while (panel2.Width > 0)
                {
                    panel2.Width -= 2;
                    //Console.Beep(1700,5);
                    Application.DoEvents();

                }
            }
            else
            {
                while (panel2.Width < 272)
                {
                    panel2.Width += 2;
                    // Console.Beep(100, 5);
                    Application.DoEvents();
                }


            }

thanks for your help and your patience and agine sorry for my english .


User is offlineProfile CardPM
+Quote Post

Martyr2
RE: Sidebar
5 Mar, 2008 - 03:08 PM
Post #6

Programming Theoretician
Group Icon

Joined: 18 Apr, 2007
Posts: 5,660



Thanked: 314 times
Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions
What version of .NET are you using for this? For some reason I can't run your project in debugging mode, only non debugging. What you have to do is simply get the width of the panel2 before your loop and make sure that your tablelayoutpanel.ColumnStyles[1].Width property also contracts as well as your form width which you specify as this.Width. If you adjust those three so that when panel2 is zero, the column width is also 0 and the form width has been contracted by the width of panel2 (before its resizing).

(Hint: Your form width will decrement at the same rate as your panel2. However your column will have to 1) Be set to something like AutoSize and 2) Decrement at a faster rate governed by the panel2 width divided by the decrement amount of your panel and form).

Hope that helps you. smile.gif

Oh and btw, I think you kind of did yourself an inservice by using the tablelayoutpanel for something like this. You should have probably just placed the controls on the form. There is a reason that the tablelayoutcontrol is buried in the additional addons and is not default in your toolbox.

smile.gif
User is offlineProfile CardPM
+Quote Post

access2reality
RE: Sidebar
7 Mar, 2008 - 02:32 AM
Post #7

New D.I.C Head
*

Joined: 10 Feb, 2008
Posts: 24


My Contributions
QUOTE(Martyr2 @ 5 Mar, 2008 - 04:08 PM) *

What version of .NET are you using for this? For some reason I can't run your project in debugging mode, only non debugging. What you have to do is simply get the width of the panel2 before your loop and make sure that your tablelayoutpanel.ColumnStyles[1].Width property also contracts as well as your form width which you specify as this.Width. If you adjust those three so that when panel2 is zero, the column width is also 0 and the form width has been contracted by the width of panel2 (before its resizing).

(Hint: Your form width will decrement at the same rate as your panel2. However your column will have to 1) Be set to something like AutoSize and 2) Decrement at a faster rate governed by the panel2 width divided by the decrement amount of your panel and form).

Hope that helps you. smile.gif

Oh and btw, I think you kind of did yourself an inservice by using the tablelayoutpanel for something like this. You should have probably just placed the controls on the form. There is a reason that the tablelayoutcontrol is buried in the additional addons and is not default in your toolbox.

smile.gif



Hi,
Thanks man i did what you told me and it work .

thanks agine


User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 06:02PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live C# Help!

C# Tutorials

Reference Sheets

C# Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month