Sunday, February 13, 2011

how to load one form in to another form c#


Introduction
In this article, I will explain basics of Multiple Document Interface (MDI) applications. MDI applications let you to show multiple documents at the same time, with every document displayed in its individual window.
Creating MDI Parent FormsThe base of a Multiple Document Interface (MDI) is the MDI parent form. This is the form that holds the MDI child windows, which are all the "sub-windows" in which the client work together with the MDI application.
To Create MDI Parent Forms:
Create a new form and add the code.

this.IsMDIContainer = true;

This assign the form as an MDI container for child windows.
Creating MDI Child FormsAn vital constituent of Multiple Document Interface (MDI) Applications is the MDI child forms, as these are the main windows for client interaction.
To Create MDI Child Forms:
Form frmchild=new Form();
frmchild.MDIParent=
this;
frmchild.Show();
Determining the Active MDI Child:
In a number of circumstance, we desire to give a command that operates on the control with the focus on the at present active child form.

For the reason that an application can have many instances of the same child form, the process wants to be acquainted with which form to use. To specify this, use the ActiveForm property of an MDI Form, which returns the child form that has the focus.

In any case one MDI child form must be loaded and visible when you access the ActiveForm property, or an error is returned.
Arranging Child Forms:
Frequently, applications will have menu commands for actions such as Tile, Cascade, and Arrange, with concerning to the open MDI child forms. One can use the LayoutMDI method with the MDILayout enumeration to rearrange the child forms in an MDI parent form.
The MDILayout enumeration can be set to four different values, which will display child forms as cascading, as horizontally or vertically. Often, these methods are used as the event handlers called by a menu item's Click event. In this way, a menu item with the text "Cascade Windows" can have the desired effect on the MDI child windows.
In the example below, the event handler for the Click event for the Cascade menu item sets the MDILayout enumeration to Cascade for the child windows of the MDI Parent form.
Example:

 using System; 
using System.ComponentModel;                                                                                    using System.WinForms;                                                                                               using System.Drawing;
 public class MDI :Form
{

 private MainMenu mainMenu;private int Count=0; 
public MDI()
{
 

this.IsMDIContainer=true;this.Text="MDI Demo";
mainMenu =
new MainMenu();
MenuItem File = mainMenu.MenuItems.Add("&File");
File.MenuItems.Add(
new MenuItem("&New",new EventHandler this.FileNew_clicked),Shortcut.CtrlN));
File.MenuItems.Add(
new MenuItem("&Active Child",new EventHandler this.FindActive_clicked),Shortcut.CtrlA));
File.MenuItems.Add(
new MenuItem("-"));
File.MenuItems.Add(
new MenuItem("&Exit",new EventHandler this.FileExit_clicked),Shortcut.CtrlX));
MenuItem Arrange = mainMenu.MenuItems.Add("&Arrange");
Arrange.MenuItems.Add(
new MenuItem("&Cascade",new EventHandler this.Cascade_clicked),Shortcut.F1));
Arrange.MenuItems.Add(
new MenuItem("&Horizontal",new EventHandler this.Horizontal_clicked),Shortcut.F2));
Arrange.MenuItems.Add(
new MenuItem("&Vertical",new EventHandler this.Vertical_clicked),Shortcut.F3));this.Menu=mainMenu;
mainMenu.GetForm().BackColor = Color.Indigo ;
}
 

private void FileExit_clicked(object sender, EventArgs e)
{
 

this.Close();
}
 

private void FindActive_clicked(object sender, EventArgs e)
{
MessageBox.Show(
this.ActiveMDIChild.Text,"MDI FORM",MessageBox.IconInformation);
}

 private void FileNew_clicked(object sender, EventArgs e)
{
Form frmchild=
new Form();
frmchild.MDIParent=
this;
frmchild.Show();
frmchild.Text="Child Form" + Count.ToString();
Count++;
}
 

private void pop_Clicked(object sender, EventArgs e)
{
MessageBox.Show("Popupmenu","MENU_CREATION",MessageBox.IconInformation);
}

 private void Cascade_clicked(object sender, EventArgs e){this.LayoutMDI(MDILayout.Cascade );
}
 

private void Horizontal_clicked(object sender, EventArgs e)
{

 this.LayoutMDI(MDILayout.TileHorizontal);
}
 

private void Vertical_clicked(object sender, EventArgs e)
{
 

this.LayoutMDI(MDILayout.TileVertical);
}
 

public static void Main(string[] args)
{
Application.Run(
new MDI());
}
}

How Does Facebook Make Money?

Facebook revenues reached $500 million in 2009, up from $300 million in 2008, according to Fortune editor David Kirkpatrick, who cites "well-informed sources" in his upcoming book, The Facebook Effect. Facebook expects revenues to reach $800 million in 2010.
Where did 2009's $500 million come from?
Self-service ads, which appear on the right side of the screen on Facebook, accounted for about $250 million to $300 million. They look like this:

How to Get a Girl to Like You

Every girl is different; if they were all alike, you wouldn't be interested in this one in particular, now would you? There are as many different ways to get a girl as there are girls, so let's go over some basic rules that will win over any girl worth getting.

1. Have your own life. If you tend to fall into the "friend zone", this is especially important. Girls don't like guys who have no lives, and who cling to them like plastic wrap. Some girls do like that, but for all the wrong reasons—either they are insecure and needy for attention, or they're control freaks who have a need for dominating guys. Unless you want to sign up for either of those scenarios, focus filling your time with your own friendships, interest, hobbies and goals.

  1. 2
    Make an impression. There's no one-size-fits-all solution here. What impresses one girl might make another roll her eyes. Your best bet is to be yourself. Demonstrate a unique skill, talent or something difficult to do that you're proud of like playing guitar and singing in tune at the same time, something that sets you apart from the crowd. Not only will this make her feel good about you, but it can boost your confidence, too. Impress her, but do not boast too much about your great achievements and plans.
  2. 3
    Be her friend. Girls don't just fall for random strangers. (Well, some do, but the relationship never goes very far!) If you're in the same Geometry class as her, learn her name. Every time she walks into class, smile at her. Sometimes this is all it takes for a girl to notice you. At the same time though, don't do this too often! It will just end up looking like you're obsessed with her. But if you talk to other girls too, like friends of yours, then she'll see that you're all there. If she doesn't seem to see you, when she walks by, just say "Hi _______." In a friendly way. This way she'll know you exist. If she's shy, she might just smile back, so don't take this as a sign that she doesn't like you! However, if you want your relationship to move ahead, don't get stuck in the quicksand - that is the 'Friend Zone'. Sometimes a girl won't go out with you because she's afraid if the relationship ends badly, she'll lose your friendship! To start moving things along, be a little flirty! A woman will only be intimate with a man she knows, trusts and cares about; and this can only be achieved with time and friendly chat.
  3. 4
    Flirt. When you see or meet a girl you like, make brief eye contact and smile. Strike up a casual conversation. Most importantly, relax. The more you talk to girls, the more relaxed you'll become. Don't think of her as the girl of your dreams; don't worry about what will happen if you make a bad joke, or if you have something stuck to your teeth. She may be just as nervous, and small mistakes will likely go unnoticed or be ignored. Enjoy interacting with this attractive, friendly girl whose path crossed yours. Live in the moment. Just be careful that you don't get so caught up in the moment that you say or do something you might regret later.
  4. 5
    Talk to her. Tell her what you really enjoy in life, what gets you excited and what gets her excited. Be positive. If you had a bad day, still greet her pleasantly with a big smile. Most importantly, listen to everything she says. Whether she talks about herself, her family, hobbies or anything, pay attention. Some things could be useful or important to know later in the relationship. Nod to show that you're listening, and also respond to what she says so she knows that you really are listening. Girls are very appreciative of guys who demonstrate sincere interest in what they say.
  5. 6
    Be romantic. The stereotypical icons of romance (roses, candles, chocolate and teddy bears) can only go so far. Think about what really gets that special someone excited. Recognize what makes her unique; find and do things that only she would appreciate. What are her quirky (perhaps secret) interests, obsessions and fantasies? Whenever she's shopping, talking, or watching a movie, what makes her eyes light up? Pay attention! Girls easily notice if you still remember things they told you a long while ago. Being romantic means acknowledging how special a person is, and that means demonstrating that you know—better than anyone else in the world—what makes her unique.
  6. 7
    Break the touch barrier. There are several ways to touch a girl without being sleazy. Hold her coat while she puts it on. Offer her your hand when she's stepping on an uneven surface. Hold out your hand so you can lead her through a crowd. If she's worried, put your hand lightly on her shoulder to comfort her. These are all polite ways to get a little closer to a girl without being creepy. Girls are delicate, even if they put up a tough front, so make sure the touching is light; for example, don't slap her on the back. If you see any signs of discomfort, stop! Otherwise, she'll probably enjoy the affection.
  7. 8
    Compliment her. If you really like the girl, you probably appreciate a lot of things about her. Why not let her know? If anything is different or new (her hairstyle, nail polish color, shirt) make note of it. The more unique the compliment, the better received it will be, unless she's shallow. Most girls like being complimented on something that makes them distinct, not something that plenty of other girls have. If you compliment her appearance, try to be original, perhaps by specifying a particular feature. Better yet, compliment her personality or skills. If you're not sure what's good or bad complimenting, read How to Compliment Girls.
  8. 9
    Make her laugh. Telling jokes or funny stories is a classic way to make a person laugh, but not the only one. Find out which are her favorite comedians, funny movies, or sitcoms. Watch them with her. Be bold and think of some antics that will make her laugh. Tell her to dare you to do something, then do it (as long as it's not illegal, of course). Laughter will come by itself if both of you are relaxed and enjoying each other's company.
  9. 10
    Ask her out. Invite her to go somewhere or do something with you. Make sure it's something that you're both interested in. If you want, show her your world. Bring her somewhere that you feel comfortable and preferably, where you have or do something you're proud of. Alternatively, you can express interest in seeing her world. Is she a musician? Ask if you can see her perform. Is she a mathematician? Ask to read her report or thesis. If you aren't yet ready or comfortable with the idea of sharing your personal lives to that extent, just go out for lunch or do something simple together, maybe with a small group of friends, where you can get to know her better.
  10. 11
    Look Good. Work out run a mile or two, do some sit ups, get a six pack, etc. Also get a tan, so when you go to the pool and she is there, she will be like, "wow". Girls like a guy with a tan and some muscles, but don't overdo it; girls don't like it when you have too much muscles. That just shows that you love your muscles too much. Older people usually look better with normal facial and neck fat content range.
  11. 12
    Give her high value. Women want to feel important and valued; do not pay only two pennies for her when she knows she is worth fifty pennies, figuratively speaking; use only the most difficult contact method that you got that require the greatest effort; do not use a short cheap email note to ask her for her personal information or a date, but ask in person preferably at her home. Not doing this probably leads to no response or rejection of you.
  12. 13
    After there’s a bit of mutual attraction , start throwing out low-level “bait” to see if she bites. A good baiting statement should be light and playful, and usually ambiguous. There’s a certain look a woman will give you if you do that right (and if she’s the right girl to begin with). It’s like you gave her the secret handshake. She’ll look back at you for a couple of seconds, wondering if you “get it” or if you just accidentally stumbled on the right words. When she does this, hold eye contact, and don’t react. Wait for her to say the next thing. “Baiting” is how women flirt too, so be on the lookout for things she might be “joking” about or things that could have a double meaning.

How to Find Free Kindle Books

  • Want to learn where to download free books on your Amazon Kindle? There are several websites that offer free books to those who have the Kindle e-book reader and other e-readers. This page contains information and tips on how to find free Kindle books online.
  • Tips

How to improve my general knowledge?

A lot depends on in what areas your general knowledge is weak- and WHY you want to improve it.

If, for example, you are feeling left out of casual conversations about current events- a good way to improve knowledge in that area would be to either start reading the newspaper, or subscribe to an e-service that brings news to your desktop.


If you are trying to gain- all over knowledge- for a trivia contest- or to impress someone, you might want to try the Don't Know Much About series of books. There are ones written for kids, middle schoolers, and adults.

If there is a specific area you want to know more about- you can look for books in that area at your library, or take a life-long learning or continuing education course in the subject.

You can also use the internet to help brush up some of your learning deficits- but be aware that not everything that makes it to the world wide web is fact. Check your sources- and use services like Google Scholar, and Ask an Expert to help sort the grain from the chaff.

No matter HOW you decide to increase your knowledge, you are a step ahead of many. Many people don't even realize how much they don't know.

Good luck and Good Learning!

Source(s):

How To improve communication skills

Have you been wondering how to put together an impressively-phrased Powerpoint presentation?

Have you been wondering how to compose an e-mail that captures your strategies and goals effectively?
It is time you did something about it.
As a young professional in today's global business world, it is imperative that you are competent in both oral as well as written communication.

Important forms of oral communication at the workplace include:

  • Building interpersonal relationships.
  • Giving presentations and debating viewpoints effectively.
You need to master oral skills for both in-person and over-the-phone interactions.

Similarly, important written communication includes:

  • Writing professional e-mails (sans SMS slang).
  • Putting together concise reports.
  • Creating visually powerful Powerpoint presentations.
And the key to acing oral and written communication is to spruce up your communication skills. And it is a lot easier than you think.
Here are some easy tips to do it on your own:
1. Improve pronunciation and diction
There are a few tricks to making a vernacular accent more globally understandable.
~ Try making sure that 'air' comes out of your mouth when saying the letters, 'T, P, K' and the sound 'Ch'.
~ Focus on elongating your vowel sounds. This will also automatically slow down your rate of speech.
~ Sing English songs out loud!
~ Watch news shows on channels like CNN and BBC.
~ The web site www.m-w.com is great for pronunciation help.
~ I would also suggest buying books on pronunciation and language that come with audio cassettes.
A good book that I found really useful was Better English Pronunciation by J D O'Connor. It is part of the Cambridge series, and some of those books come with cassettes.
2. Spruce up your writing skills
~ Believe it or not, you have to Read More!
~ Well-written magazines, like The Economist and India [ Images ] Today, are great to read not only to improve language skills but also to learn more about the world.
~ In terms of books, read what interests you. The basic goal is to read as much as you can.
There are a plethora of good authors who are popular today. Some good writers whose language is easy to follow include Vikram Seth, Jhumpa Lahiri [ Images ], Paulo Coelho, J D Salinger, Albert Camus and Roald Dahl.
~ People tend to forget basic grammar when writing e-mails. An e-mail is nothing more than a letter which is sent electronically.
Make sure salutations and content are professional. Use special phrases when attaching documents. For example, "Please find attached with this e-mail a report on..." This helps you sound professional.
3. Five exercises to practise every day!
i. Pretend you are a newscaster and read out the newspaper to your mirror.
ii. Do not read local newspapers. Focus on national newspapers.
iii. While reading a book, underline all the words you do not know. Look them up in the dictionary.
iv. Make a list of these words, and make sure you use at least five of them in a conversation during the day.
v. Most important, make an effort to speak in English to your friends and family.
Nasha Fitter spoke to Merril Diniz