Wednesday, October 30, 2019
Should evolution be taught in the public schools Essay - 1
Should evolution be taught in the public schools - Essay Example While both sides have valid arguments, the argument for teaching evolution in public schools clearly trumps, because parents have a right to ensure that their child gets the best education possible, and a failure to instruct on evolutionary theory in the public schools clearly undermines this basic right. The theory of evolution, which states that species have evolved over time, is a theory which must be taught in public schools. Lerner (2000) states that there are good standards for what school children should know about the theory, depending upon the childââ¬â¢s grade. He states that children from grades kindergarten to third grade should understand that living things reproduce, and that the offspring may not be exactly like their parents. They should also understand that a living things must grow up or change before reproducing. Another fact that they must learn is that the earth is over four billion years old. When children are between the ages of nine and twelve, they should be taught about how evolution results in competition and survival between and within species, and the factors that go into species survival, such as environmental, predatory and temperature factors. They should also learn that species adapt to different environments, and that genetic variation results in mutations that may help species adapt to this environment. Also, the theory of natural selection should be understood. When a child is between middle and high school, they should know about such concepts as genetic drift, sexual selection and the complex interactions of ecosystems (Lerner, 2000). Evolutionary theory should be taught, despite the objections of religious individuals who object to the theory being taught, for a variety of reasons. The first set of these reasons address why the theory should be taught, despite the objections of
Monday, October 28, 2019
The Degrading of Women Essay Example for Free
The Degrading of Women Essay In the 16th century, one of the last things anyone wants to be is a female. Throughout the play, it is evident that the role of a woman is burdensome. There is a set perception of a perfect woman, and only those depicting these characteristics are accepted by society. In The Taming of the Shrew era, a womans opinion is never valued, there is a class gap between males and females men are born with a higher rank -, and women are often seen, and are treated, as pieces of property. A womans opinion is not valued in the least and others always make decisions for her against her will. Throughout the male society, there are mental expectations as to how a woman should behave. These standards, although not written in concrete, are expected of all women. Not only is the male society aware of these expectations, but the females are as well, and they often live to meet these expectations. In the play, Katherina vocalizes the basis of these expectations: they are bound to serve, love, and obey (V, II, 164). In this quote, they refers to women, and bound is a very interesting word to use in this context. This is only one example of the thousands on how a womans opinion is not acknowledged. A woman is not only deprived of making her opinions heard, but they are bound to listen to, accept, and to honour a mans beliefs. In this case, the males viewpoint is that a woman is obliged to love, to serve, and to obey. Men even go as far as to decide a womans future husband. Not only is her voice not heard, she is sold off to the wealthiest bidder by none other than her own father. This is evident in the play as Baptista auctions his daughter off, awaiting the highest bid. Content you gentlemen; I will compound this strife. Tis deeds must win the prize, and be of both That can assure my daughter greatest dower Shall have my Biancas love. (II, I, 333-336) This is a clear indication that a woman is sold off to whomever can offer the most for her. It should be of no surprise that more times than another the woman is not always satisfied with the decision. As Katherina so aptly puts it: No shame but mine, I must, forsooth, be forcd / To give my hand, opposd my heart (III, II, 9). However, the mens reign over a woman does not end with her marriage. During her life after marriage, one could say that a womans mind is controlled more than ever. Not only must she uphold her fathers name, but her husbands as well. A womans husband also takes control of her as she is nothing more than mere slave that he has bought. In the play, Petruchio executes his power over Kate as he starves her (IV, II, 3-35), and refuses to pay heed to her opinions in how she would like to dress (IV, II, 81-103). No matter the circumstances whether it be choosing a husband or just living life a womans mind is always made up for her.
Saturday, October 26, 2019
picking a college Essay -- essays research papers
Picking A College Picking the right college is an important step in contributing to the outcome of a personââ¬â¢s life. But finding the right college to suit the needs and desires of a young individual poses a difficult task. à à à à à Much time and effort must be spent on deciding which college to attend. Avoid making a horrible mistake by rushing a decision and going somewhere not compatible with oneââ¬â¢s aspirations. Visit the college, ask for information, look at the courses offered, and research its reputation for education. Check out the dorm rooms and campus life. Is it a beautiful campus, or just filled with buildings? Find quiet places that time could be spent reading and studying. Also look at its strengths, along with the weaknesses. Meeting with the professors and discussing what is offered are magnificent ways to learn more about the college. By thinking with a broad frame of mind, one doesnââ¬â¢t look just at colleges with the big names. Though these institutions may be wonderful colleges, they might not offer specific courses. Maybe the smaller, private schools -- with their much smaller professor to student ratios -- are more desirable places. à à à à à Next, considering the location of the college is crucial. For instance, interests in outside sports, such as golf, should be concentrated toward the lower half of the country. Texas, Arizona, Louisiana, and Mississippi are prime states regarding golf. A school without a strong go...
Thursday, October 24, 2019
Need for speed Essay
The desire to innovate and to improve is one of the most precious human feelings because it is this very same desire that has paved the road to progress in society. At the outset, the first trains were useful but not efficient enough that people could ride on them: only goods and commodities could be transported. One of the reasons why is because safety and comfort werenââ¬â¢t a top priority for the railroad owner; he or she just wanted to maximize his or her profit. Then, James Watt and his steam engine came about and rocked the world into the Industrial Revolution, a time when railroads were constantly being built all over Europe. Cities grew, economies boomed and busted, and economies and cultures became intertwined so that a small business man who lives in Lille, France or Barcelona, Spain had to travel to Ukraine or Italy for a business deal as quickly as possible (as quickly as possible since now, as opposed to the relaxed and laid back past, time is money). So engineers were needed to devise a train that could travel at very fast speeds while keeping energy consumption as low as possible. The Japanese started the race for faster high speed trains with their ââ¬Å"bullet trainsâ⬠, the French countered with the TGV, and many other companies came out with their own high speed trains: Acela, Eurostar, and the Shinkansen, among others [3]. The increase in competition benefitted the consumer, the individual needing to get across the continent because now he or she had a choice between different trains, each known for a specific accommodation. For example, TGV was an electric train so the energy consumption of the trains is very low. However, it is little noisier than other lines so the trade off is subjective to the personââ¬â¢s taste. Eventually, all the train lines would try to balance energy consumption, safety, speed, and comfort in order to provide the smoothest trip they could possibly offer. [4] In essence, aerodynamics is the interaction of air on an object [7]. In the case of high speed trains, the aerodynamics of the train depends on many factors: ââ¬Å"aerodynamic drag, pressure variations inside train, train-induced ià ¬ow, cross-wind effects, ground effects, pressure waves inside tunnel, impulse waves at the exit of tunnel, noise and vibrationâ⬠. [8] Ultimately, finding solutions to these problems will result in a faster and smoother train ride, so it becomes imperative to identify the factors that affect each of these so one can manipulate them, if possible, to oneââ¬â¢s needs. However, having so many factors that affect the aerodynamics of a train, one can truly begin to see how complex this problem is for engineers since every change made to the train or the tracks could cost the companies owning them a huge amount of money for even the smallest of changes. Specifically, the invention of the high speed train has revolutionized long distance ground transportation since it has provided people with a much faster way to travel, sometimes cutting a seven hour long trip to three hours! However, to reduce such a trip so significantly, the path from city to city (in this place Boston to Washington D. C. ) must be as direct as possible [2]. This means that in some cases a tunnel must be built through a mountain to allow for a high speed train to pass through the mountain and get to its destination as quickly as possible. In terms of high speed trains, there are many different types, each with its advantages and disadvantages. For example, the world renown TGV It has huge advantage in that it can use the same railroad lines as local trains so the cost of making railroad tracks is reduced. However, one of the disadvantages is that using these same train tracks, just the mere fact that the TGV uses the same tracks as local trains means that the TGV limits the size and specifications of local trains because the wake of the TGV causes a wind tunnel that affects the trains behind it. [1] [2] In terms of what the future has in store, trains havenââ¬â¢t even started to reach their limit. From regular train to the high speed train, the speed was increased. The TGV is an obvious example of this transition given that it broke the record for the fasted train, maxing out at 357 mph. The next step is along the lines of the Japanese Maglev; taking friction out of the equation, the Maglev has the ability to greatly reduce the drag and the vibration in the train, thus making the train that much faster. In the foreseeable future, there is a concept that would take the Maglev above and beyond its achievements so far: an ââ¬Å"evacuated tubeâ⬠is a massive vacuum in a tube stretching for miles and miles. Interestingly, if this method is designed and works, it may potentially reap the benefits since the beginning. This occurs because air drag takes such a significant amount of energy out of the system (the system being defined as the train) that minimizing it to a negligible level could immediately save millions upon millions of dollars [8] [9]. On the other hand, there are changes that have been made to the train itself rather than to the environment surrounding it. The Japanese Hayabusaââ¬â¢s nose is angled and sleek so it can eliminate tunnel boom, the sound of a train leaving a tunnel. Tunnel boom is caused by a fast train pressurizing the air in front of it as it goes through a tunnel until it comes out of the tunnel with the pressurized air and makes a very loud sound. Trains in the past had a smaller tunnel boom that occurred right before the train left the tunnel (the sound of a train coming from inside a tunnel); however, now that the trains are that much faster, they catch up to the pressurized air and come out together, creating constructive interference, to make a bigger sound [5]. Furthermore, the French Alstrom developed an upgraded TGV called the AGV. What was interesting about how the French upgraded the TGV is that they took the power system of the TGV and completely transformed it; now it has the capacity of generating higher speeds at a fraction of the original TGV energy consumption. Donââ¬â¢t forget that the TGV was designed as an electric train, so to have a power system that can do more with less energy is a huge advancement! [5] In conclusion, the fact remains that the fast paced society of today has geared people to want to do everything more quickly. Following this train of thought, it makes sense that high speed trains are the future in transportation. Throughout history, people have shown a want, a need for speed. Works Cited [1] Fox News. Associated Press. http://www. foxnews. com/story/0,2933,263542,00.html (accessed July 15th, 2012) [2] Plumer, Brad. The Washington Post. http://www. washingtonpost. com/blogs/ezra-klein/wp/2012/07/16/amtraks-151-billion-high-speed-rail-plan-are-there-cheaper-options/ (accessed July 15th, 2012) [3] European Railway Server. TGVweb. http://www. trainweb. org/tgvpages/history. html(accessed July 17th, 2012) [4] http://www. buzzle. com/articles/advantages-and-disadvantages-of-maglev-trains. html [5] Railway-Technology. com. On Track. http://www. railway-technology. com/features/feature117829/(accessed July 15th, 2012). [6] James, Randy. Time U. S. http://www. time. com/time/nation/article/0,8599,1892463,00. html (accessed July 16th, 2012) [7] Bopp, Rudolf; Hagenah, Bernd. Gruner. http://www. gruner-gmbh. at/aktuelles_gmbh_at/pdf_pool/D_HAB_Porto. pdf [8] Raghunathan, Raghu S. ; Setoguchi, T. Progress in Aerospace Sciences. Aerodynamics of high-speed railway train http://ompldr. org/vMXlsOA/Aerodynamics_HSR02. pdf [9] Hoffman, Carl. Popsci: Trans-Atlantic Maglev. http://www. popsci. com/scitech/article/2004-04/trans-atlantic-maglev.
Wednesday, October 23, 2019
Gulf Real Estates
Case Problem1: Bock investment Services The goal of Bock Investment Services (BJS) is to be the leading money market advisory service in South Carolina. To provide better service for their present clients and to attract new clients, BIS developed a weekly newsletter. BIS is considering adding a new feature to the newsletter that will report the results of a weekly telephone survey of fund managers. To investigate the feasibility of offering this service, and to determine what type of information to include in the newsletter, BIS selected a simple random sample of 45 money market funds.A portion of the data obtained is shown in Table below, which reports fund assets and yields for the past 7 and 30 days. Before calling the money market fund managers to obtain additional data, BIS decided to do some preliminary analysis of the data already collected. Managerial Report 1. Use appropriate descriptive statistics to summarize the data on assets and yields for the money market funds. 2. Dev elop a 95% confidence interval estimate of the mean assets, mean 7-day yield, and mean 30-day yield for the population of money market funds.Provide a managerial interpretation of each interval estimate. 3. Discuss the implication of your findings in terms of how BIS could use this type of information in preparing their weekly newsletter. Data for Bock Investment Services Money Market Fund Assets ($ millions) 7-Day Yield (%) 30-Day Yield (%) Amcore103. 94. 104. 08 Alger156. 74. 794. 73 Arch MM/Trust496. 54. 174. 13 BT Instit Treas197. 84. 374. 32 Benchmark Div2755. 44. 544. 47 Bradford707. 63. 883. 83 Capital Cash1. 74. 294. 22 Cash Mgt. Trust2707. 84. 144. 04 Composite122. 84. 033. 91 Cowen Standby694. 4. 254. 19 Cortland217. 33. 573. 51 Declaration38. 42. 672. 61 Dreyfus4832. 84. 013. 89 Elfun81. 74. 514. 41 FFB Cash506. 24. 174. 11 Federated Master738. 74. 414. 34 Fidelity Cash13272. 84. 514. 42 Flex-fund172. 84. 604. 48 Fortis105. 63. 873. 85 Franklin Money996. 83. 973. 92 Freed om Money1079. 04. 074. 01 Galaxy Money801. 44. 113. 96 Government Cash409. 43. 833. 82 Hanover Cash794. 34. 324. 23 Heritage Cash1008. 34. 084. 00 Infinity/Alpha53. 63. 993. 91 John Hancock226. 43. 933. 87 Landmark Funds481. 34. 284. 26 Liquid Cash388. 94. 614. 64 Market Watch10. 4. 134. 05 Merrill Lynch Money27005. 64. 244. 18 NCC Funds113. 44. 224. 20 Nationwide517. 34. 224. 14 Overland291. 54. 264. 17 Pierpont Money1991. 74. 504. 40 Portico Money161. 64. 284. 20 Prudential Money Mart6835. 14. 204. 16 Reserve Primary1408. 83. 913. 86 Schwab Money10531. 04. 164. 07 Smith Barnery Cash2947. 64. 164. 12 Stagecoach1502. 24. 184. 13 Strong Money470. 24. 374. 29 Transmerica Cash175. 54. 204. 19 United Cash323. 73. 963. 89 Woodward Money1330. 04. 244. 21 Case Problem 2: Gulf Real Estate Properties Gulf Real Estate Properties, Inc. is a real estate firm located in Southwest Florida. The company, which advertises itself as ââ¬Å"expert in the real estate market,â⬠monitors condominium sales by collecting data on location, list price, sale price, and number of days it takes to sell Sales Data for Gulf Real Estate Properties: Give View Condominiums No Gulf View Condominiums List Price Sale Price Days to Sell List Price Sale Price Days to Sell 495. 0475. 0130 217. 0 217. 0 182 379. 0350. 071148. 0135. 5338 529. 0519. 085186. 5179. 0122 552. 5534. 595239. 0230. 0150 334. 9334. 9119279. 0267. 5169 550. 505. 092215. 0214. 058 169. 9165. 0197279. 0259. 0110 210. 0210. 056179. 9176. 5130 975. 0945. 073149. 9144. 9149 314. 0314. 0126235. 0230. 0114 315. 0305. 088199. 8192. 0120 885. 0800. 0282210. 0195. 061 975. 0975. 0100226. 0212. 0146 469. 0445. 056149. 9146. 5137 329. 0305. 049160. 0160. 0281 365. 0330. 048322. 0292. 563 332. 0312. 088187. 5179. 048 520. 0495. 0161247. 0227. 052 425. 0405. 0149 675. 0669. 0142 409. 0400. 028 649. 0649. 029 319. 0305. 0140 425. 0410. 085 359. 0340. 0107 469. 0449. 072 895. 0875. 0129 439. 0430. 0160 435. 0400. 0206 235. 0 227. 91 638. 0 618. 0100 629. 0 600. 097 329. 0 309. 0114 595. 0555. 045 339. 0315. 0150 215. 0200. 048 395. 0375. 0135 449. 0 425. 053 499. 0 465. 086 439. 0 428. 5158 Managerial Report: 1. Use appropriate descriptive statistics to summarize each of the three variables for the 40 Gulf View condominiums. 2. Use appropriate descriptive statistics to summarize each of three variables for the 18 No Gulf View condominiums. 3. Compare your summary results. Discuss any specific statistical results that would help a real estate agent understand the condominium market. 4.Develop a 95% confidence interval estimate of the population mean sales price and population mean number of days to sell for Gulf View condominiums. Interpret your results. 5. Develop a 95% confidence interval estimate of the population mean sales price and population mean number of days to sell for No Gulf View condominiums Interpret your results. 6. Assume the branch manager requested estimates of the mean selling price of Gulf View condominiums with a margin of error of $40,000 and the mean selling price of No Gulf View condominiums with a margin of error of $15,000. Using 95% confidence, how large should the sample sizes be? . Gulf Real Estate Properties just signed contracts for two new listings: a Gulf View condominium with a list price of $589,000 and a No Gulf View condominium with a list price of $285,000. What is your estimate of the final selling price and number of days required to sell each of these units? a: sample mean +/- 1. 96*(st dev/sqrt(n)) 454222. 5 +/- 1. 96*192517. 75/sqrt(40) 394560. 6312 513884. 3688 The 95% CI is ($394,560. 63, $513,884. 37). Using Excel: 59660. 7736 $394,561. 73 $513,883. 27 The 95% CI is ($394,561. 73, $513,883â⬠¦ Case Problem 3 Metropolitan Research, Inc. Metropolitan Research, Inc. a consumer research organization, conducts surveys designed to evaluate a wide variety of products and services available to consumers. In one particular study, Metropolitan looked at consumer satisfaction with the performance of automobiles produced by a major Detroit manufacturer. A questionnaire sent to owners of one of the manufacturerââ¬â¢s full-sized cars revealed several complaints about early transmission problems. To learn more about the transmission failures, Metropolitan used a sample of actual transmission repairs provided by a transmission repair firm in the Detroit area.The following data show the actual number of miles driven for 50 vehicles at the time of transmission failure. 85,092 32,609 59,465 77,437 32,534 64,090 32,464 59,902 39,323 89,641 94,219 116,803 92,857 63,436 65,605 85,861 64,342 61,978 67,998 59,817 101,769 95,774 121,352 69,568 74,276 66,998 40,001 72,069 25,066 77,098 69,922 35,662 74,425 67,202 118,444 53,500 79,294 64,544 86,813 116,269 37,831 89,341 73,341 85,288 138,114 53,402 85,586 82,256 77,539 88,798Managerial Report: 1. Use appropriate descriptive statistics to summarize the transmission failure data. 2. Develop a 95% confidence interval for the mean number of miles driven until transmission failure for the population of automobiles with transmission failure. Provide a managerial interpretation of the interval estimate. 3. Discuss the implication of your statistical finding n terms of the belief that some owners of the automobiles experienced early transmission failures. 4. How many repair records should be sampled if the research firm wants the population mean number of miles driven until transmission failure to be estimated with a margin of error of 5000 miles? Use 95 % confidence 5. What other information would you like to gather to evaluate the transmission failure problem more fully?
Tuesday, October 22, 2019
Free Essays on Gonoreha
Gonorrhea Gonorrhea, also called ââ¬Å"the clap,â⬠is the most commonly reported sexually transmitted disease in the United States, with 1.5 million cases occurring per year. Ninety percent of infections occur in people under 30, with 15-19 year olds reporting the highest infection rates. Gonorrhea is caused by the bacteria Neisseria gonorrhoeae, which infects the mucus membrane of the urethra and genital tract. It can be spread through sexual contact and condoms provide protection against the disease but its not 100 percent effective. An infected woman who is pregnant may give the infection to her infant as the baby passes through the birth canal during delivery. Approximately eighty percent of women and ten percent of men with gonorrhea show no symptoms. If symptoms to occur the happen 2-8 days after transmission. Symptoms experienced by men include a painful urination and a fluid discharge. Women may experience a discharge, painful urination, bleeding, or lower abdominal pain. Ampicillin, amoxicillin, or some type of penicillin used to be recommended for the treatment of gonorrhea. Regardless of what drug is prescribed, it is important that the patient take the full course of medication and that he or she return to the doctor's office or clinic for follow-up. All sex partners of a person with gonorrhea should be tested and treated appropriately even if they do not have symptoms of infection. If gonorrhea is not treated, the bacteria can spread to the bloodstream and infect the joints, heart valves, or the brain. The most common consequence of gonorrhea, however, is PID, a serious infection of the female reproductive organs, that occurs in an estimated 1 million American women each year. PID can scar or damage cells lining the fallopian tubes, resulting in infertility in as many as 10 percent of women affected. Because gonorrhea is highly contagious and yet may cause no symptoms, all men and women who have sexual... Free Essays on Gonoreha Free Essays on Gonoreha Gonorrhea Gonorrhea, also called ââ¬Å"the clap,â⬠is the most commonly reported sexually transmitted disease in the United States, with 1.5 million cases occurring per year. Ninety percent of infections occur in people under 30, with 15-19 year olds reporting the highest infection rates. Gonorrhea is caused by the bacteria Neisseria gonorrhoeae, which infects the mucus membrane of the urethra and genital tract. It can be spread through sexual contact and condoms provide protection against the disease but its not 100 percent effective. An infected woman who is pregnant may give the infection to her infant as the baby passes through the birth canal during delivery. Approximately eighty percent of women and ten percent of men with gonorrhea show no symptoms. If symptoms to occur the happen 2-8 days after transmission. Symptoms experienced by men include a painful urination and a fluid discharge. Women may experience a discharge, painful urination, bleeding, or lower abdominal pain. Ampicillin, amoxicillin, or some type of penicillin used to be recommended for the treatment of gonorrhea. Regardless of what drug is prescribed, it is important that the patient take the full course of medication and that he or she return to the doctor's office or clinic for follow-up. All sex partners of a person with gonorrhea should be tested and treated appropriately even if they do not have symptoms of infection. If gonorrhea is not treated, the bacteria can spread to the bloodstream and infect the joints, heart valves, or the brain. The most common consequence of gonorrhea, however, is PID, a serious infection of the female reproductive organs, that occurs in an estimated 1 million American women each year. PID can scar or damage cells lining the fallopian tubes, resulting in infertility in as many as 10 percent of women affected. Because gonorrhea is highly contagious and yet may cause no symptoms, all men and women who have sexual...
Monday, October 21, 2019
System Tray Delphi Application
System Tray Delphi Application Take a look at your Task Bar. See the area where the time is located? Are there any other icons there? The place is called the Windows System Tray. Would you like to place your Delphi applications icon there? Would you like that icon to be animated - or reflect the state of your application? This would be useful for programs that are left running for long periods of time with no user interaction (background tasks you typically keep running on your PC all day long). What you can do is to make your Delphi applications look as if they are minimizing to the Tray (instead of to the Task Bar, right to the Win Start button) by placing an icon in the tray and simultaneously making your form(s) invisible. Lets Tray It Fortunately, creating an application that runs in the system tray is pretty easy - only one (API) function, Shell_NotifyIcon, is needed to accomplish the task. The function is defined in the ShellAPI unit and requires two parameters. The first is a flag indicating whether the icon is being added, modified, or removed, and the second is a pointer to a TNotifyIconData structure holding the information about the icon. That includes the handle of the icon to show, the text to show asà a tool tip when the mouse is over the icon, the handle of the window that will receive the messages of the icon and the message type the icon will send to this window. First, in your main forms Private section put the line:TrayIconData: TNotifyIconData; type TMainForm class(TForm) procedure FormCreate(Sender: TObject); private TrayIconData: TNotifyIconData; { Private declarations }public{ Public declarations }end; Then, in your main forms OnCreate method, initialize the TrayIconData data structure and call the Shell_NotifyIcon function: with TrayIconData dobegin cbSize : SizeOf(TrayIconData); Wnd : Handle; uID : 0; uFlags : NIF_MESSAGE NIF_ICON NIF_TIP; uCallbackMessage : WM_ICONTRAY; hIcon : Application.Icon.Handle; StrPCopy(szTip, Application.Title); end; Shell_NotifyIcon(NIM_ADD, TrayIconData); The Wnd parameter of the TrayIconData structure points to the window that receives notification messages associated with an icon.à The hIcon points to the icon we want to add to the Tray - in this case, Applications main icon is used.The szTip holds the Tooltip text to display for the icon - in our case the title of the application. The szTip can hold up to 64 characters.The uFlags parameter is set to tell the icon to process application messages, use the applications icon and its tip. The uCallbackMessage points to the application-defined message identifier. The system uses the specified identifier for notification messages that it sends to the window identified by Wnd whenever a mouse event occurs in the bounding rectangle of the icon. This parameter is set to WM_ICONTRAY constant defined in the interface section of the forms unit and equals: WM_USER 1; You add the icon to the Tray by calling the Shell_NotifyIcon API function. The first parameter NIM_ADD adds an icon to the Tray area. The other two possible values, NIM_DELETE and NIM_MODIFY are used to delete or modify an icon in the Tray - well see how later in this article. The second parameter we send to the Shell_NotifyIcon is the initialized TrayIconData structure. Take One If you RUN your project now youll see an icon near the Clock in the Tray. Note three things.à 1) First, nothing happens when you click (or do anything else with the mouse) on the icon placed in the Tray - we havent created a procedure (message handler), yet.2) Second, there is a button on the Task Bar (we obviously dont want it there).3) Third, when you close your application, the icon remains in the Tray. Take Two Lets solve this backward. To have the icon removed from the Tray when you exit the application, you have to call the Shell_NotifyIcon again, but with the NIM_DELETE as the first parameter. You do this in the OnDestroy event handler for the Main form. procedure TMainForm.FormDestroy(Sender: TObject);begin Shell_NotifyIcon(NIM_DELETE, TrayIconData);end; To hide the application (applications button) from the Task Bar well use a simple trick. In the Projects source code add the following line: Application.ShowMainForm : False; before the Application.CreateForm(TMainForm, MainForm); E.g let it look like: ...begin Application.Initialize; Application.ShowMainForm : False; Application.CreateForm(TMainForm, MainForm); Application.Run;end. And finally, to have our Tray icon respond to mouse events, we need to create a message handling procedure. First, we declare a message handling procedure in the public part of the form declaration: procedure TrayMessage(var Msg: TMessage); message WM_ICONTRAY; Second, the definition of this procedure looks like: procedure TMainForm.TrayMessage(var Msg: TMessage);begincase Msg.lParam of WM_LBUTTONDOWN: begin ShowMessage(Left button clicked - lets SHOW the Form!); MainForm.Show; end; WM_RBUTTONDOWN: begin ShowMessage(Right button clicked - lets HIDE the Form!); MainForm.Hide; end; end;end; This procedure is designed to handle only our message, the WM_ICONTRAY. It takes the LParam value from the message structure which can give us the state of the mouse upon the activation of the procedure. For the sake of simplicity well handle only left mouse down (WM_LBUTTONDOWN) and right mouse down (WM_RBUTTONDOWN). When the left mouse button is down on the icon we show the main form, when the right button is pressed we hide it. Of course, there are other mouse input messages you can handle in the procedure, like, button up, button double click etc. Thats it. Quick and easy. Next,à youll see how to animate the icon in the Tray and how to have that icon reflect the state of your application. Even more, youll see how to display a pop-up menu near the icon.
Subscribe to:
Posts (Atom)