home *** CD-ROM | disk | FTP | other *** search
/ TestDrive Super Store 2.3 / TESTDRIVE_2.ISO / truecad / vbtest / tcmacro.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-01-25  |  2.4 KB  |  79 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BackColor       =   &H00FFFF80&
  4.    Caption         =   "Test TrueCAD DDE"
  5.    ClientHeight    =   2580
  6.    ClientLeft      =   1695
  7.    ClientTop       =   1650
  8.    ClientWidth     =   4995
  9.    Height          =   2985
  10.    Left            =   1635
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   2580
  13.    ScaleWidth      =   4995
  14.    Top             =   1305
  15.    Width           =   5115
  16.    Begin Label Label1 
  17.       BackColor       =   &H00FFFF80&
  18.       Caption         =   "Variable Name"
  19.       Height          =   255
  20.       Left            =   240
  21.       TabIndex        =   0
  22.       Top             =   240
  23.       Width           =   1815
  24.    End
  25.    Begin TextBox Text1 
  26.       Height          =   375
  27.       Left            =   240
  28.       TabIndex        =   1
  29.       Text            =   "Text1"
  30.       Top             =   480
  31.       Width           =   1815
  32.    End
  33.    Begin Label Label2 
  34.       BackColor       =   &H00FFFF80&
  35.       Caption         =   "Variable Value"
  36.       Height          =   255
  37.       Left            =   240
  38.       TabIndex        =   2
  39.       Top             =   1080
  40.       Width           =   1815
  41.    End
  42.    Begin TextBox Text2 
  43.       Height          =   495
  44.       Left            =   240
  45.       TabIndex        =   3
  46.       Text            =   "Text2"
  47.       Top             =   1320
  48.       Width           =   1815
  49.    End
  50.    Begin CommandButton Command1 
  51.       Caption         =   "Set Variable"
  52.       Height          =   495
  53.       Left            =   240
  54.       TabIndex        =   4
  55.       Top             =   1920
  56.       Width           =   1575
  57.    End
  58.    Begin CommandButton Resume 
  59.       Caption         =   "ResumeTrueCAD"
  60.       Height          =   615
  61.       Left            =   2640
  62.       TabIndex        =   5
  63.       Top             =   360
  64.       Width           =   1815
  65.    End
  66. Declare Function RegisterWindowMessage Lib "User" (ByVal lpString As String) As Integer
  67. Declare Function PostMessage Lib "User" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As String) As Integer
  68. Sub Command1_Click ()
  69. Call PipeToCad("SETMACVAR " + text1 + " " + text2)
  70. End Sub
  71. Sub PipeToCad (commandstr$)
  72. MessNumber% = RegisterWindowMessage("TCENGEX")
  73. dumm% = PostMessage(-1, MessNumber%, 0, commandstr)
  74. End Sub
  75. Sub Resume_Click ()
  76. MessNumber% = RegisterWindowMessage("TCRESUME")
  77. dumm% = PostMessage(-1, MessNumber%, 0, "")
  78. End Sub
  79.