Saturday, March 21, 2020

Commissioned Officer Essay Example

Commissioned Officer Essay Example Commissioned Officer Essay Commissioned Officer Essay I would like to start by emphasizing that it is my goal to become a Commissioned Officer, and I am determined to face whatever odds to achieve this goal.In my opinion, being a Commissioned Officer is being a Leader, in its truest essence, and in the tradition of the U.S. Coast Guard. I believe that if there is any organization where effective leadership must be cultivated and developed, it is in the military. In view of this, I could say that I am up to satisfying what the position requires.I desire to become a Commissioned Officer with Leadership as my battlecry, both as an end, and as a means. As an end, it has always been my passion to become a leader of men. Serving as a Commissioned Officer would become a realization of this passion. Meanwhile, leadership has become a means for me because I exercise the desired leadership traits to get every man on my team to work for the accomplishment of every mission. Leadership is entwined with my values, both as a man in uniform, and as a p erson.In the past, I have exemplified leadership by serving 4 years in the US Marines. There, I have earned the respect, confidence, and loyal cooperation of other Marines by demonstrating leadership traits such as Justice, Judgement, Dependability, Initiative, Decisiveness, Tact, Integrity, Enthusiasm, Bearing, Unselfishness, Courage, Knowledge, Loyalty and Endurance.I have also displayed skills, specifically in communication and information gathering, as a linguist under a DEA contract. This specialty on the field of intelligence adds to my credentials as an Officer Candidate and as a leader. I am fluent in other languages such as Italian and Spanish, and these excellent communication skills would serve as helpful additions to my skills if ever I am able to become an Officer. I believe that it is crucial that a leader knows how to communicate with his men and with other people to whom duty calls him to speak to. With my excellent language skills, along with the leadership traits t hat I have gained from my experience in the US Marines and from the training in the Officer Candidate School, I am positive that I would be able to communicate ideas and intentions well. I believe this ability is rare among other aspiring leaders.With regards to the rudiments of military and leadership skills, I believe that I have enough competence, and my performance will certainly speak of this. However, since people say that nobody is perfect and that there would always be loopholes into the ideal, I commit to keep on striving everyday to become the Leader that I desire to become. This is my passion. And I hope that through this narrative, I have been able to narrate well about my potentials and capabilities, enough to bring me closer to my goals and objectives.References:Marine Corps Leadership Traits. Competencies Skills. Center for Strategic Leadership Studies. Retrieved 07 Nov 2006 at   6mcd.usmc.mil/ftl_site/Handbook/marine_corps_leadership__traits.htm.http://leadership. au.af.mil/sls-skil.htm#marines:legacee.com/Info/Leadership/LeadershipTraits.html

Thursday, March 5, 2020

Display a TopMost System Modal Message Box With Delphi

Display a TopMost System Modal Message Box With Delphi With desktop (Windows) applications, a message (dialog) box is used to alert the user of the application that some action needs to be taken, that some operation was completed or, in general, to get users attention. In Delphi, there are several ways of displaying a message to the user. You can either use any of the ready-made message displaying routines provided in the RTL, like  ShowMessage or InputBox; or you can create your own dialog box (for reuse): CreateMessageDialog. A common problem with all the above dialog boxes is that they require the application to be active to be displayed to the user. Active refers to when your application has the input focus. If you really want to grab the users attention and stop them from doing anything else, you need to be able to display a system-modal topmost message box even when your application is not active. System-Modal Top Most Message Box Even though this might sound complicated, in actuality it really is not. Since Delphi can easily access most of the Windows API calls, executing the MessageBox Windows API function will do the trick. Defined in the windows.pas unit the one included by default in the uses clause of every Delphi form, the MessageBox function creates, displays, and operates a message box. The message box contains an application-defined message and title, along with any combination of predefined icons and push buttons. Heres how the MessageBox is declared: function MessageBox(  Ã‚  hWnd: HWND;  Ã‚  lpText,  Ã‚  lpCaption : PAnsiChar;  Ã‚  uType : Cardinal) : integer; The first parameter, hwnd, is the handle of the owner window of the message box to be created. if you create a message box while a dialog box is present, use a handle to the dialog box as the hWnd parameter. The lpText and lpCaption specify the caption and the message text that is displayed in the message box. Last is the uType parameter  and is the most interesting. This parameter specifies the contents and behavior of the dialog box. This parameter can be a combination of various flags. Example: System Modal Warning Box When the System Date/Time Changes Lets take a look at an example of creating a system modal topmost message box. Youll  handle the Windows message that is dispatched to all the running applications when the system date/time changes- for example using the Date and Time Properties Control Panel applet. The MessageBox function will be called as:   Ã‚  Windows.MessageBox(   Ã‚  Ã‚  Ã‚  handle,   Ã‚  Ã‚  Ã‚  This is a system modal message#13#10from an inactive application,   Ã‚  Ã‚  Ã‚  A message from an inactive application!,   Ã‚  Ã‚  Ã‚  MB_SYSTEMMODAL or MB_SETFOREGROUND or MB_TOPMOST or MB_ICONHAND) ; The most important piece is the last parameter. The MB_SYSTEMMODAL or MB_SETFOREGROUND or MB_TOPMOST ensures the message box is system modal, top most and becomes the foreground window. MB_SYSTEMMODAL flag ensures that the user must respond to the message box before continuing work in the window identified by the hWnd parameter.MB_TOPMOST flag specifies that the message box should be placed above all non-topmost windows and should stay above them, even when the window is deactivated.MB_SETFOREGROUND flag ensures that the message box becomes the foreground window. Here is the full example code (TForm named Form1 defined in unit unit1): unit Unit1;interface ​ uses   Ã‚  Windows, Messages, SysUtils, Variants, Classes,   Ã‚  Graphics, Controls, Forms, Dialogs, ExtCtrls; type   Ã‚  TForm1 class(TForm)  Ã‚  private   Ã‚  Ã‚  Ã‚  procedure WMTimeChange(var Msg: TMessage) ; message WM_TIMECHANGE;  Ã‚  public   Ã‚  Ã‚  Ã‚  { Public declarations }   Ã‚  end;var   Ã‚  Form1: TForm1; implementation{$R *.dfm} procedure TForm1.WMTimeChange(var Msg: TMessage) ;begin   Ã‚  Windows.MessageBox(   Ã‚  Ã‚  Ã‚  handle,   Ã‚  Ã‚  Ã‚  This is a system modal message#13#10from an inactive application,   Ã‚  Ã‚  Ã‚  A message from an inactive application!,   Ã‚  Ã‚  Ã‚  MB_SYSTEMMODAL or MB_SETFOREGROUND or MB_TOPMOST or MB_ICONHAND) ;end;end. Try running this simple application. Make sure the application is minimized or at least that some other application is active. Run the Date and Time Properties Control Panel applet and change the system time. As soon as you hit the Ok button (on the applet) the system modal topmost message box from your inactive application will be displayed.