home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
pc3270sa.zip
/
vbdde
/
fgsysfmt.frm
< prev
next >
Wrap
Text File
|
2002-02-28
|
5KB
|
160 lines
VERSION 4.00
Begin VB.Form FormGetSysFormats
BorderStyle = 3 'Fixed Dialog
Caption = "Get System Formats"
ClientHeight = 2184
ClientLeft = 3996
ClientTop = 3528
ClientWidth = 3972
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 700
size = 7.8
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 2508
Left = 3948
LinkMode = 1 'Source
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2184
ScaleWidth = 3972
ShowInTaskbar = 0 'False
Top = 3252
Width = 4068
Begin VB.Frame Frame1
Caption = "Supported Windows Clipboard Formats"
Height = 1212
Left = 240
TabIndex = 2
Top = 240
Width = 3492
Begin VB.ListBox FormatList
BackColor = &H00C0FFFF&
Height = 816
ItemData = "FGSYSFMT.frx":0000
Left = 120
List = "FGSYSFMT.frx":0002
Sorted = -1 'True
TabIndex = 3
Top = 240
Width = 3252
End
End
Begin VB.TextBox FormatDataText
ForeColor = &H00FF0000&
Height = 372
Left = 3120
Locked = -1 'True
MultiLine = -1 'True
TabIndex = 1
TabStop = 0 'False
Top = 1680
Visible = 0 'False
Width = 492
End
Begin VB.CommandButton Execute
Cancel = -1 'True
Caption = "&OK"
Default = -1 'True
Height = 372
Left = 1560
TabIndex = 0
Top = 1680
Width = 972
End
End
Attribute VB_Name = "FormGetSysFormats"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Private Sub Execute_Click()
Unload FormGetSysFormats
End Sub
Private Sub ExitDlg_Click()
Hide
End Sub
Private Sub UpdateLogPointer()
LogEnd = LogEnd + 1
If LogEnd = MAXLOGNUM + 1 Then
LogEnd = 0
End If
If LogTop = LogEnd Then
LogTop = LogTop + 1
If LogTop = MAXLOGNUM + 1 Then
LogTop = 0
End If
End If
End Sub
Private Sub Form_Load()
On Error GoTo LoadErrHandler
FunctionComp = True
rc = DoEvents() 'If you use VisualBasic V2.0, call
'DoEvents function each time before
'starting DDE conversation.
FormatDataText.LinkTimeout = -1
FormatDataText.LinkTopic = "IBM327032|System"
FormatDataText.LinkMode = COLD
FormatDataText.LinkItem = "Formats"
FormatDataText.LinkRequest
FormatDataText.LinkMode = NONE
If FunctionComp = True Then
StartPos& = 1
Do While True
EndPos& = InStr(StartPos&, FormatDataText.Text, Chr$(9))
If EndPos& = 0 Then
temp& = LTrim$(RTrim$(Mid$(FormatDataText.Text, StartPos&)))
If temp& = 1 Then
FormatList.AddItem "CF_TEXT"
ElseIf temp& = 129 Then
FormatList.AddItem "CF_DSPTEXT"
Else
FormatList.AddItem temp&
End If
Exit Do
Else
temp& = LTrim$(RTrim$(Mid$(FormatDataText.Text, StartPos&, EndPos& - StartPos&)))
If temp& = 1 Then
FormatList.AddItem "CF_TEXT"
ElseIf temp& = 129 Then
FormatList.AddItem "CF_DSPTEXT"
Else
FormatList.AddItem temp&
End If
End If
StartPos& = EndPos& + 1
Loop
EndStatus$ = MSG_OK
Else
MsgBox MSG_DDE_ERROR, 48, MSG_SAMPLE_PROG
EndStatus$ = MSG_NG
End If
TempLogData$ = Time$ + ":Get System Formats : " + EndStatus$ + Chr$(13) + Chr$(10) + Chr$(9)
TempLogData$ = TempLogData$ + MSG_APPLICATION + APPLICATION_NAME + """" + Chr$(13) + Chr$(10) + Chr$(9)
TempLogData$ = TempLogData$ + MSG_TOPIC + """System""" + Chr$(13) + Chr$(10) + Chr$(9)
TempLogData$ = TempLogData$ + MSG_ITEM + """Formats""" + Chr$(13) + Chr$(10) + Chr$(9)
TempLogData$ = TempLogData$ + "Data =" + """" + FormatDataText.Text + """" + Chr$(13) + Chr$(10)
LogData$(LogEnd) = TempLogData$
UpdateLogPointer
Loged = True
Exit Sub
LoadErrHandler:
FunctionComp = False
Resume Next
End Sub