Hi,
I’m new to MS. How can I write a dialog with only a Memo box to display the contents of a .txt file?
I do not want any “Button” or “Enter” key to trigger the display of the txt file. We want to try to use it with our new employee monitoring software
How can I write a dialog
Moderators: JRL, Dorian (MJT support)
-
- Newbie
- Posts: 1
- Joined: Fri Mar 26, 2021 1:13 pm
How can I write a dialog
Last edited by laurenince525 on Mon Mar 29, 2021 4:58 pm, edited 1 time in total.
"Cleanliness becomes more important when godliness is unlikely."
- Dorian (MJT support)
- Automation Wizard
- Posts: 1414
- Joined: Sun Nov 03, 2002 3:19 am
Re: How can I write a dialog
Have you looked at these yet, just to get the fundamentals?
https://help.mjtnet.com/article/40-an-i ... dal-dialog
https://help.mjtnet.com/article/41-an-i ... t-handlers
This does what you need :
https://help.mjtnet.com/article/40-an-i ... dal-dialog
https://help.mjtnet.com/article/41-an-i ... t-handlers
This does what you need :
Code: Select all
Dialog>Dialog1
object Dialog1: TForm
Left = 2322
Top = 431
HelpContext = 5000
BorderIcons = [biSystemMenu]
Caption = 'CustomDialog'
ClientHeight = 504
ClientWidth = 636
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -28
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
ShowHint = True
OnTaskBar = False
PixelsPerInch = 240
TextHeight = 32
object MSMemo1: tMSMemo
Left = 37
Top = 20
Width = 548
Height = 429
Text = ''
VertScrollBarStyles.ButtonSize = 43
HorzScrollBarStyles.ButtonSize = 43
TabOrder = 8
end
end
EndDialog>Dialog1
//Read a text file
ReadFile>d:\MyFile.txt,FileContents
//Put the file contents in the memo box
SetDialogProperty>Dialog1,MSMemo1,Text,%FileContents%
//Display Dialog
Show>Dialog1,res