If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
"Ticker tape" form
I would like to make a form that docks to the bottom of my
screen and has a display of information - idealy as a "ticker tape" streaming right to left, but it could also just be a constant message. How do I make it "dock" to the bottom? How do I make it stream the message? |
#2
|
|||
|
|||
On Sat, 15 Jan 2005 07:35:18 -0800, Gina wrote:
I would like to make a form that docks to the bottom of my screen and has a display of information - idealy as a "ticker tape" streaming right to left, but it could also just be a constant message. How do I make it "dock" to the bottom? How do I make it stream the message? You can create a form with a moving message like this. Create a new form. Name it "frmRollMessage". Navigation buttons No. Divider Lines No. Scroll Bars No. Set it's Pop-Up property to Yes. Add a label. Set it's Caption to a space. Set the Label's TextAlign property to Right. Size the label to a one line height, as wide as you wish it. Size the form to just fit around the label. Set the form Border property to either Thin or None. If you set it to thin, it will include the caption bar as well as the close button. The user will not be able to resize it but will be able to move it. If you set it to none, the user will not be able to resize, move, or close it. You will need code elsewhere to close the form. (See my example code below.) Code it's Load event: DoCmd.MoveSize X * 1440, Y * 1440 (where X is how many inches from the left and Y is how many inches down from the top positions the form where you want it.) Set the Form's Timer interval to 500 (for a one half second interval scroll). Code the form's Timer event: Private Sub Form_Timer() Dim strMsg As String Static I As Integer I = I + 1 strMsg = "Some message here " If I Len(strMsg) Then I = 1 LabelName.Caption = LabelName.Caption & Mid(strMsg, I, 1) End Sub The message will continuously scroll. To open and close this form, you can use code on a command button on a different form. Depending upon your version of Access, use (in Access 2000 or newer): If CurrentProject.AllForms("frmRollMessage").IsLoaded Then DoCmd.Close acForm, "frmRollMessage" Else DoCmd.OpenForm "frmRollMessage" End If In Access 97 or older: If IsLoaded("frmRollMessage") Then DoCmd.Close acForm, "frmRollMessage" Else DoCmd.OpenForm "frmRollMessage" End If In Access 97, copy this function (from the Northwind.mdb sample database) into a Module. Function IsLoaded(ByVal strFormName As String) As Integer ' Returns True if the specified form is open in Form view or Datasheet view. Const conObjStateClosed = 0 Const conDesignView = 0 If SysCmd(acSysCmdGetObjectState, acForm, strFormName) conObjStateClosed Then If Forms(strFormName).CurrentView conDesignView Then IsLoaded = True End If End If End Function -- Fred Please only reply to this newsgroup. I do not reply to personal email. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Link subforms to show active record | Timboo | New Users | 4 | December 23rd, 2004 10:59 AM |
Dates in a listbox connected to a form... | RusCat | Using Forms | 13 | November 25th, 2004 03:31 AM |
modal windows | AT | Using Forms | 3 | November 21st, 2004 06:49 AM |
Strange stLinkCriteria behaviour on command button | Anthony Dowd | Using Forms | 3 | August 21st, 2004 03:01 AM |
auto entry into second table after update | Tony | New Users | 13 | July 9th, 2004 10:42 PM |