Brutus
Думаю многие знают, что такое splash-картинка, но все же поясню: это картинка, которая предшествует запуску основной программы и обычно отображается во время загрузки программы, что бы пользователю было не так скучно ждать, пока загрузится программа. Подобную splash-картинку можно наблюдать во время запуска Delphi, TheBat!, Dreamveawer и др. Сейчас мы займемся созданием красивой splash-заставки для вашей программы.
Зачем?
Как я уже говорил, заставка может скрасить ожидание запуска программы. К тому же на заставке можно показывать какие ни будь полезные данные или информацию о степени загрузки программы. Да и это просто красиво. Так же обращю ваше внимание, что заставка должна хорошо выглядеть, поскольку именно она оставляет первое впечатление о программе (надеюсь все знают силу первого впечатления, которое потом тяжело изменить). Так же нужно дать пользователю отключать заставку в настройках, поскольку заставка может просто не понравиться или раздражать пользователя, и он удалит программу только из-за злополучной заставки.
Как?
Очень просто. Нужно найти подходящюю картинку, разместить необходимые компоненты (если вы хотите что ни будь отображать на заставке) на форме и написать несколько строк кода.
Итак, приступим. Создайте новую форму и расположите на ней картинки и компоненты. Эта форма и будет отображаться во время загрузки программы. Допустим эта форма называется Form2. Рекомендую её свойство BorderStyle установить в bsNone - в этом режиме заголовок окна не будет отображаться, к тому же нельзя будет изменить размер окна. Так же рекомендую изменить свойство этой формы Position и установить как poScreenCenter - в этом случае окно появится в центре экрана. Далее в событии главной формы (обычно Form1) onShow пропишите Form2.ShowModal. Это откроет окно Form2 в модальном режиме. Теперь нужно сделать так, что бы заставка закрылась. Это можно сделать, добавив на форму заставки таймер, который закроет программу, или же добавив код закрытия заставки после инициализационных действий в главной форме, загрузки параметров и т.п.
Теперь давайте попробуем как ни будь удивить пользователя. Самый простейший способ, это показать некоторые данные о компьютере в заставке. Расположите несколько label'ов на форме-заставке или прямо на картинке (в этом случае нужно установить свойство Label.Transparent := true). Следующий код записывает в Label1 информацию о пользователе, на которого зарегистрирована ОС. Этот код нужно расположит в обработчике события OnCreate формы-заставки, так же не забудьте поместить модуль TRegistry в раздел Uses все той же формы-заставки:
var Reg : TRegistry;
begin
Reg := TRegistry.Create;
Reg.RootKey:=HKEY_LOCAL_MACHINE;
Reg.OpenKey('SOFTWAREMicrosoftWindowsCurrentVersion', False);
Label1.Caption:=Reg.ReadString('RegisteredOwner');
Reg.CloseKey;
Reg.Free;
end;
Если вы уловили идею, то сможете превратить из заставки настоящюю SysInfo :). Следующий способ должен впечатлить пользователя больше, чем предыдущий. При активации форма будет плавно появляться и исчезать. Я уже писал статью 'Анимация без лишних усилий', там рассказывается об анимации окон стандартными winapi функциями и анимации путем манипулирования свойствами формы. Прочитайте обьязательно! В той статье были описаны свойства формы AlphaBlend и AlphaBlendValue. Манипулируя с ними в обыкновенном цикле можно достичь очень неплохих результатов. Если вы прочтете ту статью, то ваша заставка может впечатлить даже искушенного пользователя. Я не буду пихать в эту статью материал, изложенный в другой статье, но добавлю, что если вы хотите, что бы заставка при закрытии также плавно исчезала, то подставьте в цикле вместо слова to слово downto и поменяйте местами начальные и конечные значения (100 и 255 в примере статьи).
Вместо заключения
Хочу сказать, что не нужно бояться эксперементировать, и в этих эксперементах потерять драгоценное время, ведь именно в подобных эксперементах рождаются потрясающие результаты. К тому же цель этой статьи дать не готовые примеры для использования, а дать пищу для мозгов, натолкнуть программиста на интересные факты. Представьте, что вы на уроке химии: смешивайте примеры, добавляйте что ни будь свое, исправляйте и будьте уверены, что вы не будете жалеть о потраченном времени.
Другие работы по теме:
Особенности рекламы в Интернет, ее цели
Понятие, задачи и преимущества Интернет-рекламы. Основные технологии сайтпромоутинга. Основной принцип действия рекламы в Интернет. Виды рекламы и типы ее размещения в Интернет. Текстовые ссылки и splash-заставки. Этапы продвижения Интернет-рекламы.
Извлечение из компьютера системного времени и даты
На стартовой форме разместите два уже знакомых вам компонента: поле вывода текста Label1 и таймер Timer1. В окне свойств объектов Object Inspector для компонента Timer1 его свойству Interval установите значение 1000 миллисекунд.
Настройка рабочего стола в Windows
Башкирский Экономико-юридический техникум Реферат По дисциплине: Опереционные системы и среды Тема: Настройка рабочего стола в Windows Выполнил: Кирсанов А.
Особенности разработки программы KURS.EXE
C++ как универсальный язык программирования, его сущность, назначение, классы и возможности. Блок-схема и листинг программы KURS.EXE, ее принцип работы, системные требования, возможные неполадки и способы их устранения. Листинг заставки VOVA777.EXE.
Настройка рабочего стола в Windows
Башкирский Экономико-юридический техникум Реферат По дисциплине: Опереционные системы и среды Тема: Настройка рабочего стола в Windows Выполнил: Кирсанов А.
Many Aspects Of The Boundary Waters Essay
, Research Paper Many Aspects of The Boundary Waters Some people like to go out for walks. Others just like to go out and shoot clay pigeons. There are some that like swimming, because it gives you carte blanch. There are so many things that people can do for fun. Sailing is another thing that people may have fun doing.
Challenge Essay Research Paper James KislaEnglish 023024Professor
Challenge Essay, Research Paper James Kisla English 023-024 Professor Pope Page 1 02/21/01 THE CHALLENGE It was August 12, during the summer of 1988. It was around 7:30 in the morning when I woke up, but this morning was different. I smelt the fresh air of a summer morning enter the room. Therefore, I went into the shower just like every other morning, still feeling that this day would be different.
Six Flags Of Ohio Essay Research Paper
After my speech, the class will be informed about the new theme park to hit Ohio, the new Six Flags of Ohio. I. Introduction Before this year there were currently twenty-six parks that are in the Six Flags family theme park. This year they are adding a new one that is not far from your own backyard.
The Last Splash Essay Research Paper The
The Last Splash Essay, Research Paper The Last Splash My mother made me take swimming lessons every spring so that I would be able to enjoy my summer by the pool safely. There was always a fear inside of me because I knew that after some point, my feet would no longer be able to reach the bottom. No matter how much I resisted attending the lessons and getting in the water, my mother and my instructor always pushed me in.
The Waterfall Essay Research Paper It was
The Waterfall Essay, Research Paper It was in June. I was on a School Geography Field Trip to Thailand.I was separated from my teachers and classmates while we were visiting a rice farm in the ouskirts of Bangkok. Soon I found myself alone in a strange foreign land.
No One Can Turn Back Time Essay
, Research Paper A light breeze blew across my face, my feet were on the soft sandy beach. I was standing there turning towards the ocean the sun was setting, walking closer to the water….. a shiver went down my spine. Quite scared, I stepped into the cold, freezing night water. I looked down to see my reflection, I was totally screwed, and as I walk in more I felt like living a freezer.
Disney Land Essay Research Paper Welcome to
Disney Land Essay, Research Paper Welcome to the number one vacation destination on earth! There’s enough magic here to fill your entire vacation. In this wonderful kingdom timeless tales of fantasy and your favorite Disney Characters come to life in seven magical lands. A quick flip through these pages, and you’ll discover why you won’t want to go anywhere else.
Under The Moon Lit Night Essay Research
Paper It was a magnificent night. The stars where glittering over us. We even saw a falling star. The moon was bright and full. For us it was the first time that we walked together under the full moon by the sea shore.
Hidden Behind Closed Doors Essay Research Paper
Michaela Daugherty Writing 121 Assignment # 1 M-W-F 2:00pm HIDDEN BEHIND CLOSED DOORS Every day of their hectic week, women all over the world are being summoned to a dark dreary dungeon. Women of all ages, race, creed or economic status are not immune to this fear. We as women must all endure this torture. Where would you find this dungeon, women descend to virtually 365 days a year? The answer will surprise you, since the majority of women find these dungeons in their own homes.
Feeling Essay Essay Research Paper The final
Feeling Essay Essay, Research Paper The final whistle blew. The game was tied, and the winner was yet to be decided. We all knew that the fate of the game was to be determined by penalties, a
Archetypes In The Lion King Essay Research
Paper John Berry Edwards Per. 2 4/18/96 The Lion King is a story containing many archetypes. Archetypes are patterns or models of literature that reoccur in many stories. In this paper I will discuss three of these archetypes. They are the hero, death & rebirth of the hero, and the symbolism and associations of water vs. desert.
Musee Des Beaux Arts Essay Research Paper
“The Old Master’s; how well they understood it’s human position”. In Musee des Beaux Arts by W.H. Auden, the “Old Master’s” understood that people often turned a blind eye to one another’s suffering. It uses an analysis of one art form (paintings) by another (poetry) to make the statement about people’s lack of interest in the suffering of others.
Physics On The Internet Essay Research Paper
Physics on the Internet (1) Internet web sites: *ecw.virtualave/avis/ This site has some spectacular aerial wrestling movies. This part of the site is dedicated to death defying wrestling moves. Most of these moves are from the top rope, cage, or cell.
Poem Life
’s A Beach Essay, Research Paper Life’s a Beach I turned off the car and took a deep breath. Looking slowly up into the pink sky, I began to watch the golden sun go to sleep. The beach seemed deserted, quiet, but peaceful. I opened my door and put my feet out on the soft sand. I started taking my shoes off, then my socks.
Storm And Calm In Wuthering Heights Essay
, Research Paper One of the more popular books by Emily Bronte is Wuthering Heights. It is simply about two houses, Wuthering Heights and Thrushcross Grange, and the relationships between their inhabitants. Because of this well-known piece of literature, many scholars have commented on it. For example, Sarah Tegge wrote:
Isnt It Ironic The Subject Is English
! Essay, Research Paper David Harris 10S 14/02/97 ?ISN?T IT IRONIC? An imaginative response to the song ?Ironic? by Alanis Morisette. ?An old man turned 98, he won the lottery and died the next day?
Kings County Calif Essay Research Paper Kings
Kings County, Calif Essay, Research Paper Kings County, Calif. West Hills Community CollegePOP ARTArt Appreciation 52CONTENTSI.POP ART 4II.ANDY WARHOL 5III.DAVID HOCKNEY 7LIST OF ILLUSTRATIONS1.Illustration 1 :Roy Lichtenstrin, Whamm!, Cover2.Illustration 2 :Andy Warhol, Cambell Soup Can 63.Illustration 3 David Hockney, A Bigger Splash 7 POP ART Art in which everyday objects and subjects are depicted with theflat naturalism of advertising or comic strips. 1.
Film Review The Money Pit Essay Research
Paper Film Review (The Money Pit) The Money Pit is a love comedy directed by Richard Benjamin in 1986. This movie was performed humorously by Tom Hanks who usually perform comedy. The movies he has performed before were The Man with One Red Shoe, Splash, Bachlor and etc.
Song Of Solomon Essay Research Paper The
Song Of Solomon Essay, Research Paper The Icarus Myth in Toni Morrison’s Song of Solomon Throughout literature it has been common for authors to use allusions to complement recurrent motifs in their work. In Toni Morrison’s Song Of Solomon, Milkman learns that his desire to fly has been passed down to him from his ancestor Solomon.
History Of Drums Essay Research Paper History
History Of Drums Essay, Research Paper History of Drums OutlineA) The history of the drumset. -General purpose. My general purpose is to explain where the different parts of the drumset have originated and evolved over the years. -Specific purpose. To show all of the different parts and where they come from. -Central idea.
Drown Essay Research Paper
“Drown” Since I missed class on Friday, these are some thoughts on the questions posed, as well as some others things that I thought were worth noting. In general, I think that the title and the meaning or saying yes or no go together. The story seems to revolve around the question of whether or not to do certain things, with often times one choice leaning towards disaster, or drowning.
Poem One True Love Essay Research Paper
One True Love I stand quietly, silently contemplating the sky Watching the clouds move Completely unaware Of tears Dripping from my chin My gaze shifts down
Pop Art Essay Research Paper West Hills
Pop Art Essay, Research Paper West Hills Community College POP ART Art Appreciation 52 CONTENTS I. POP ART 4 II. ANDY WARHOL 5 III. DAVID HOCKNEY 7 LIST OF ILLUSTRATIONS