AccesSoft - Articles - Call logoes
Main | Articles | Links | Map

Call logoes

In this article we shall consider the idle time an example, what do its exhibit Access more attractive. The Speech certainly will go about spec. effect. In earlier released article Avtolinkovka (автоприсоединение) of the tables at opening of exhibit already appeared spec. effect дефрагментация forms when closing form moldered asunder . In general to when start database instead of standard logo with inscription "Access XXX..." remove any its picture, it is enough to place her(it) in format BMP in the same directory and with the same name, as file database. For instance, the file "C:\MyBase\base.bmp" needs for the base "C:\MyBase\base.mdb". But shall presently consider the process of the opening of application, and shall try his(its) intercept and start the анимированную logo. As last will emerge the presentation PowerPoint.

First создадим logo itself - a presentation PowerPoint. We Open PowerPoint, and choose in menu General patterns liked. I, for instance, has chosen Ocean . We Select Headline of the slide and пишем its text. Similarly Subheading of the slide . Formatting such, either as Word. Now we shall do анимацию - strictly so slide and name the presentation. For this select the text, to which want to use анимацию, and choose Show a slide Adjustment анимации Add the effect. Hereinafter, think, no sense to explain. Remained now only to save all this as presentation (.pps) for instance Zastavka.pps . For start from Access got masterpiece use technology ActiveX.

Technology ActiveX provides the interaction of applications Automation (Automation), under which one application controls functioning other. To begin the work with ActiveX object, it is necessary to declare corresponding to variable, create object itself and variable with object. One of the ways of the execution of this functioning is an use the specificator New in declarer variables:

Dim <name variable> As New <name prilozheniya.imya class>

However more universal way of the creation ActiveX object is a call special function CreateObject and GetObject.
As a rule, call these function fits in shift to the right part of operator Set. The reference returns As a result of his(its) execution object expression to created object, which becomes importance of the variable. Syntax to functions CreateObject:

CreateObject ( Name_Project.Name_Class)

The Function GetObject has an additional parameter way, which will assign the full way to file, containing ActiveX object.
Sozdadim am empty the form frmHide and создадим procedure opening forms in her:

Private Sub Form_Open(Cancel As Integer)
Dim ppApp As Object
     Set ppApp = CreateObject("Powerpoint.Application")
     ppApp.Visible = True
     ppApp.Presentations.Open CurrentProject.Path & "\Заставка.pps"
End Sub

As it is seen, full way to file of the presentations was received with the help of CurrentProject.Path and filename. If now start this procedure, that she will in turn start Powerpoint, but he will show us our logo Zastavka.pps . Since us it is necessary that start occurred at opening of application, that shall start her(its) most simple way through instructions of the name of the start form, in our event this will frmHide: Service Parameters of the start Output of the form/pages frmHide. At the same time we shall take away all marks, except contextual menu by default - this we shall hide nearly all standard menu Access and window of application itself to did not disturb. Napomnyu, who does not know: to most get before the form for editing (display the window Access) it is necessary to start application, holding Schift. This so named fool-tolerance in the most simplest performance. The curious users are meant Under fool , which interesting that inwardly program, but in the same way naive developers, thinking thereby to conduct the users, and close him access to window Access. Schift already long ago not for who not secret, but here is to it is impossible was open with the help of Schift exists protection from Schift special programme modules, preventing this, which of course possible break open other programme module, which most often so and name: Breaking in of protection from Schift . And here already all will depend on level developer: whose module "хитрее", that and has won. However, we отвлеклись, speech that after all beside us was about start the presentations Powerpoint.

The Ithaca, start form has indicated, window Access has rolled up. We Start application. Appears the logo, goes анимация and all. This is because in here comes short one more important moment: so control was sent Powerpoint, that now it is necessary from Powerpoint to start Access! Possible create the similar procedure in Powerpoint, after all there too, either as in all office applications, is supported VBA. But we shall enter on the other: let Access will close Powerpoint and will start the second start form (now already "persisting start"). For this use the characteristic of the form Timer and создадим else one procedure in the form frmHide:

     Private Sub Form_Timer()
     Dim ppApp As Object
          Set ppApp = CreateObject("Powerpoint.Application")
          If ppApp.Visible = True Then
               ppApp.Quit
               DoCmd.Close acForm, Me.Form.Name
               DoCmd.OpenForm "frmStart"
          End If
     End Sub

As it is seen, through she is closed exhibit Powerpoint (ppApp.Quit), is closed form frmHide itself (therefore I her(it) and has named Hide) and is opened present starting form of the exhibit frmStart. The Event Timer comes of given by interval (ms). He is assigned in constructor of the form frmHide Interval of the timer. I have put(deliver)ed 4500. This is enough for running анимации.

The Example, as so much for works, You may below.

Author: Admin Size: 105 kB It Is Added: 07.01.2007

Main | Articles | Links | Map
Интернет. Мебель для ванны valente воронежской фабрики. Все просто | фибра расход

Copyright 2007 - 2008 AccesSoft. All Rights Reserved