home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / Form_Creat52213212002.psc / Form1.frm (.txt) next >
Encoding:
Visual Basic Form  |  2002-02-01  |  14.8 KB  |  447 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    BackColor       =   &H80000013&
  4.    Caption         =   "Form1"
  5.    ClientHeight    =   6225
  6.    ClientLeft      =   60
  7.    ClientTop       =   360
  8.    ClientWidth     =   8505
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   6225
  11.    ScaleWidth      =   8505
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.CommandButton Command1 
  14.       Height          =   315
  15.       Left            =   420
  16.       Picture         =   "Form1.frx":0000
  17.       Style           =   1  'Graphical
  18.       TabIndex        =   11
  19.       Top             =   30
  20.       Width           =   345
  21.    End
  22.    Begin VB.CommandButton cmd 
  23.       Caption         =   "Komut Butonu"
  24.       Height          =   405
  25.       Index           =   0
  26.       Left            =   3360
  27.       TabIndex        =   10
  28.       Top             =   90
  29.       Visible         =   0   'False
  30.       Width           =   1395
  31.    End
  32.    Begin VB.TextBox txt 
  33.       Appearance      =   0  'Flat
  34.       Height          =   285
  35.       Index           =   0
  36.       Left            =   1980
  37.       TabIndex        =   8
  38.       Text            =   "Text1"
  39.       Top             =   60
  40.       Visible         =   0   'False
  41.       Width           =   1065
  42.    End
  43.    Begin VB.CheckBox chk 
  44.       Caption         =   "Check1"
  45.       Height          =   225
  46.       Index           =   0
  47.       Left            =   60
  48.       TabIndex        =   7
  49.       Top             =   780
  50.       Visible         =   0   'False
  51.       Width           =   1035
  52.    End
  53.    Begin VB.OptionButton opt 
  54.       Caption         =   "Option1"
  55.       Height          =   285
  56.       Index           =   0
  57.       Left            =   1260
  58.       TabIndex        =   6
  59.       Top             =   780
  60.       Visible         =   0   'False
  61.       Width           =   975
  62.    End
  63.    Begin VB.ComboBox cmb 
  64.       Height          =   315
  65.       Index           =   0
  66.       Left            =   3660
  67.       TabIndex        =   5
  68.       Text            =   "Combo1"
  69.       Top             =   780
  70.       Visible         =   0   'False
  71.       Width           =   1320
  72.    End
  73.    Begin VB.ListBox lst 
  74.       Height          =   1425
  75.       Index           =   0
  76.       Left            =   3660
  77.       TabIndex        =   4
  78.       Top             =   1140
  79.       Visible         =   0   'False
  80.       Width           =   1335
  81.    End
  82.    Begin VB.HScrollBar hscr 
  83.       Height          =   255
  84.       Index           =   0
  85.       Left            =   3630
  86.       TabIndex        =   3
  87.       Top             =   2640
  88.       Visible         =   0   'False
  89.       Width           =   1395
  90.    End
  91.    Begin VB.VScrollBar vscr 
  92.       Height          =   1455
  93.       Index           =   0
  94.       Left            =   5070
  95.       TabIndex        =   2
  96.       Top             =   1140
  97.       Visible         =   0   'False
  98.       Width           =   285
  99.    End
  100.    Begin VB.PictureBox pic 
  101.       Height          =   795
  102.       Index           =   0
  103.       Left            =   2340
  104.       ScaleHeight     =   735
  105.       ScaleWidth      =   1095
  106.       TabIndex        =   1
  107.       Top             =   780
  108.       Visible         =   0   'False
  109.       Width           =   1155
  110.    End
  111.    Begin VB.CommandButton Command2 
  112.       Height          =   315
  113.       Left            =   30
  114.       Picture         =   "Form1.frx":030A
  115.       Style           =   1  'Graphical
  116.       TabIndex        =   0
  117.       Top             =   30
  118.       Width           =   345
  119.    End
  120.    Begin VB.Label lbl 
  121.       BorderStyle     =   1  'Fixed Single
  122.       Caption         =   "Label1"
  123.       Height          =   255
  124.       Index           =   0
  125.       Left            =   1140
  126.       TabIndex        =   9
  127.       Top             =   60
  128.       Visible         =   0   'False
  129.       Width           =   795
  130.    End
  131.    Begin VB.Line lin 
  132.       Index           =   0
  133.       Visible         =   0   'False
  134.       X1              =   1110
  135.       X2              =   1650
  136.       Y1              =   1200
  137.       Y2              =   1770
  138.    End
  139. Attribute VB_Name = "Form1"
  140. Attribute VB_GlobalNameSpace = False
  141. Attribute VB_Creatable = False
  142. Attribute VB_PredeclaredId = True
  143. Attribute VB_Exposed = False
  144. Dim X1 As Single
  145. Dim Y1 As Single
  146. Private Sub cmb_GotFocus(Index As Integer)
  147.     Set xobj = cmb(Index)
  148. End Sub
  149. Private Sub Command1_Click()
  150.         '<EhHeader>
  151.         On Error GoTo Command1_Click_Err
  152.         '</EhHeader>
  153. 100     frmsec.Show vbModeless, Me
  154.         '<EhFooter>
  155.         Exit Sub
  156. Command1_Click_Err:
  157.         MsgBox err.Description & vbCrLf & _
  158.            "in Project1.Form1.Command1_Click " & _
  159.            "at line " & Erl
  160.         Resume Next
  161.         '</EhFooter>
  162. End Sub
  163. Private Sub Form_Activate()
  164.     mysel = False
  165. End Sub
  166. Private Sub Form_Load()
  167.         '<EhHeader>
  168.         On Error GoTo Form_Load_Err
  169.         '</EhHeader>
  170. 100     Set myobject = Form1
  171.         'myobject.Name = Form1.Name
  172. 102     start2 = True
  173.         '<EhFooter>
  174.         Exit Sub
  175. Form_Load_Err:
  176.         MsgBox err.Description & vbCrLf & _
  177.            "in Project1.Form1.Form_Load " & _
  178.            "at line " & Erl
  179.         Resume Next
  180.         '</EhFooter>
  181. End Sub
  182. Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  183.         Set xobj = Nothing
  184.         'If Button <> 1 Then start2 = False
  185.         '<EhHeader>
  186.         On Error GoTo Form_MouseDown_Err
  187.         '</EhHeader>
  188.         Dim nParam As Long
  189. 100     If Button = 1 And mymod > 0 And duz_dev_ediyor = False Then
  190.             'shp1.Picture = txt(0)
  191. 102         myx = X: myy = Y
  192. 104         nesne_yap
  193.             'shp1.Visible = True
  194. 106         GoTo a
  195. 108         shp1.Top = Y
  196. 110         shp1.Left = X
  197. 112         shp1.Width = 50
  198. 114         shp1.Height = 50
  199. 116         duz_dev_ediyor = True
  200. 118         MOV = True
  201. 120         start = True
  202. 122         Form1.MousePointer = vbNormal
  203. 124         myobject.MousePointer = 8
  204.             Exit Sub
  205. 126         nParam = 17
  206. 128         If Mid(myobject.Name, 1, 3) = "lbl" Then Exit Sub
  207. 130         Call ReleaseCapture
  208. 132         Call SendMessage(myobject.hwnd, WM_NCLBUTTONDOWN, nParam, 0)
  209.         End If
  210.         '<EhFooter>
  211.         Exit Sub
  212. Form_MouseDown_Err:
  213.         MsgBox err.Description & vbCrLf & _
  214.            "in Project1.Form1.Form_MouseDown " & _
  215.            "at line " & Erl
  216.         Resume Next
  217.         '</EhFooter>
  218. End Sub
  219. Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  220.         '<EhHeader>
  221.         On Error GoTo Form_MouseMove_Err
  222.         '</EhHeader>
  223. 100     Me.MousePointer = vbNormal
  224.         '<EhFooter>
  225.         Exit Sub
  226. Form_MouseMove_Err:
  227.         MsgBox err.Description & vbCrLf & _
  228.            "in Project1.Form1.Form_MouseMove " & _
  229.            "at line " & Erl
  230.         Resume Next
  231.         '</EhFooter>
  232. End Sub
  233. Private Sub nesne_yap()
  234.         '<EhHeader>
  235.         On Error GoTo nesne_yap_Err
  236.         '</EhHeader>
  237. 100     Select Case mymod
  238.             Case 1
  239. 102             Load lbl(MaxId(mymod) + 1)
  240. 104             lbl(MaxId(mymod) + 1).Top = myy
  241. 106             lbl(MaxId(mymod) + 1).Left = myx
  242.                 'lbl(MaxId(mymod) + 1).Height = -300
  243.                 'lbl(MaxId(mymod) + 1).Width = -800
  244. 108             lbl(MaxId(mymod) + 1).Visible = True
  245. 110             lbl(MaxId(mymod) + 1).Caption = "Etiket_" & MaxId(mymod)
  246. 112             Set myobject = lbl(MaxId(mymod) + 1)
  247. 114             MaxId(mymod) = MaxId(mymod) + 1
  248. 116         Case 2
  249. 118             Load txt(MaxId(mymod) + 1)
  250. 120             txt(MaxId(mymod) + 1).Top = myy
  251. 122             txt(MaxId(mymod) + 1).Left = myx
  252.                 'txt(MaxId(mymod) + 1).Height = 50
  253.                 'txt(MaxId(mymod) + 1).Width = 50
  254. 124             txt(MaxId(mymod) + 1).Visible = True: ' shp1.Visible = False
  255. 126             txt(MaxId(mymod) + 1).Text = "Tekst_" & MaxId(mymod)
  256. 128             Set myobject = txt(MaxId(mymod) + 1)
  257. 130             Set xobj = txt(MaxId(mymod) + 1)
  258.                 MaxId(mymod) = MaxId(mymod) + 1
  259.                 frmsec.txtyukle
  260. 132         Case 3
  261. 134         Case Else
  262.         End Select
  263.         '<EhFooter>
  264.         Exit Sub
  265. nesne_yap_Err:
  266.         MsgBox err.Description & vbCrLf & _
  267.            "in Project1.Form1.nesne_yap " & _
  268.            "at line " & Erl
  269.         Resume Next
  270.         '</EhFooter>
  271. End Sub
  272. Private Sub Command2_Click()
  273.         '<EhHeader>
  274.         On Error GoTo Command2_Click_Err
  275.         '</EhHeader>
  276. 100     frmOptions.Show vbModeless, Me
  277.         '<EhFooter>
  278.         Exit Sub
  279. Command2_Click_Err:
  280.         MsgBox err.Description & vbCrLf & _
  281.            "in Project1.Form1.Command2_Click " & _
  282.            "at line " & Erl
  283.         Resume Next
  284.         '</EhFooter>
  285. End Sub
  286. Private Sub lbl_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  287.         Form1.Tag = lbl(Index)
  288.         Set xobj = lbl(Index)
  289.         '<EhHeader>
  290.         On Error GoTo lbl_MouseDown_Err
  291.         '</EhHeader>
  292.         If MOV = False And start2 = False Then lbl(Index).MousePointer = vbNormal: Exit Sub
  293. 100     setmyobject = lbl(Index)
  294. 102     X1 = X
  295. 104     Y1 = Y
  296. 106     start = True
  297.         '<EhFooter>
  298.         Exit Sub
  299. lbl_MouseDown_Err:
  300.         MsgBox err.Description & vbCrLf & _
  301.            "in Project1.Form1.lbl_MouseDown " & _
  302.            "at line " & Erl
  303.         Resume Next
  304.         '</EhFooter>
  305. End Sub
  306. Private Sub lbl_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  307.         '<EhHeader>
  308.         On Error GoTo lbl_MouseMove_Err
  309.         '</EhHeader>
  310. 100     If start2 = False Then Exit Sub
  311. 102     If myobject.Name <> lbl(Index).Name And myobject.Name <> Form1.Name Then Exit Sub
  312.         'If Button = 0 Then MOV = False: lbl(Index).MousePointer = vbNormal
  313. 104     Set myobject = lbl(Index)
  314.         Dim X2, Y2 As Single
  315.         On Error GoTo hell:
  316. 112     If ((Y < lbl(Index).Height + 150 And Y > lbl(Index).Height - 150) And (X < lbl(Index).Width + 150 And X > lbl(Index).Width - 150)) Or MOV = True Then
  317.             'If ((Y > lbl(Index).Height - 150) And (X > lbl(Index).Width - 150)) Or MOV = True Then
  318. 114         lbl(Index).MousePointer = 8
  319.         Else
  320. 116         lbl(Index).MousePointer = 5
  321.         End If
  322. 118     If Button = 1 Then
  323. 120         X2 = X
  324. 122         Y2 = Y
  325. 124         If lbl(Index).MousePointer = 8 Then
  326.                 '  lbl(Index).Appearance = 0
  327. 126             MOV = True
  328. 128             lbl(Index).Width = X2: lbl(Index).Height = Y2
  329. 130         ElseIf lbl(Index).MousePointer = 5 Then
  330. 132             With lbl(Index)
  331. 134                 .Move lbl(Index).Left - X1 + X2, lbl(Index).Top - Y1 + Y2
  332.                 End With
  333.                 'MOV = False
  334.             End If
  335.         End If
  336. hell:
  337.         Exit Sub
  338.         '<EhFooter>
  339.         Exit Sub
  340. lbl_MouseMove_Err:
  341.         MsgBox err.Description & vbCrLf & _
  342.            "in Project1.Form1.lbl_MouseMove " & _
  343.            "at line " & Erl
  344.         Resume Next
  345.         '</EhFooter>
  346. End Sub
  347. Private Sub lbl_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  348.         '<EhHeader>
  349.         On Error GoTo lbl_MouseUp_Err
  350.         '</EhHeader>
  351. 100     If start2 = False Then Exit Sub
  352. 102     start = False: MOV = False: lbl(Index).MousePointer = vbNormal: Set myobject = Form1
  353. 104     duz_dev_ediyor = False: mymod = 0: ' txt(Index).Appearance = 1
  354.         '<EhFooter>
  355.         Exit Sub
  356. lbl_MouseUp_Err:
  357.         MsgBox err.Description & vbCrLf & _
  358.            "in Project1.Form1.lbl_MouseUp " & _
  359.            "at line " & Erl
  360.         Resume Next
  361.         '</EhFooter>
  362. End Sub
  363. Private Sub txt_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  364.         '<EhHeader>
  365.         On Error GoTo txt_MouseDown_Err
  366.         '</EhHeader>
  367.         On Error Resume Next
  368.         If frmsec.Visible = True And (xobj <> txt(Index)) Then
  369.             On Error GoTo txt_MouseDown_Err
  370.             Set xobj = txt(Index)
  371.             frmsec.txtyukle
  372.         End If
  373. 100     If start2 = False Then Exit Sub
  374. 102     Set myobject = txt(Index)
  375.         Set xobj = txt(Index)
  376. 104     X1 = X
  377. 106     Y1 = Y
  378. 108     start = True
  379.         '<EhFooter>
  380.         Exit Sub
  381. txt_MouseDown_Err:
  382.         MsgBox err.Description & vbCrLf & _
  383.            "in Project1.Form1.txt_MouseDown " & _
  384.            "at line " & Erl
  385.         Resume Next
  386.         '</EhFooter>
  387. End Sub
  388. Private Sub txt_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  389.         If MOV = False And start2 = False Then txt(Index).MousePointer = vbNormal: Exit Sub
  390.         '<EhHeader>
  391.         On Error GoTo txt_MouseMove_Err
  392.         '</EhHeader>
  393. 100     If start2 = False Then Exit Sub
  394. 102     If myobject.Name <> txt(Index).Name And myobject.Name <> Form1.Name Then Exit Sub
  395.         'If Button = 0 Then MOV = False: txt(Index).MousePointer = vbNormal
  396. 104     Set myobject = txt(Index)
  397.         
  398.         Dim X2, Y2 As Single
  399.         On Error GoTo hell:
  400. 112     If ((Y < txt(Index).Height + 150 And Y > txt(Index).Height - 150) And (X < txt(Index).Width + 150 And X > txt(Index).Width - 150)) Or MOV = True Then
  401.             'If ((Y > txt(Index).Height - 150) And (X > txt(Index).Width - 150)) Or MOV = True Then
  402. 114         txt(Index).MousePointer = 8
  403.         Else
  404. 116         txt(Index).MousePointer = 5
  405.         End If
  406. 118     If Button = 1 Then
  407. 120         X2 = X
  408. 122         Y2 = Y
  409. 124         If txt(Index).MousePointer = 8 Then
  410.                 '  txt(Index).Appearance = 0
  411. 126             MOV = True
  412. 128             txt(Index).Width = X2: txt(Index).Height = Y2
  413. 130         ElseIf txt(Index).MousePointer = 5 Then
  414. 132             With txt(Index)
  415. 134                 .Move txt(Index).Left - X1 + X2, txt(Index).Top - Y1 + Y2
  416.                 End With
  417.                 'MOV = False
  418.             End If
  419.         End If
  420. hell:
  421.         Exit Sub
  422.         '<EhFooter>
  423.         Exit Sub
  424. txt_MouseMove_Err:
  425.         MsgBox err.Description & vbCrLf & _
  426.            "in Project1.Form1.txt_MouseMove " & _
  427.            "at line " & Erl
  428.         Resume Next
  429.         '</EhFooter>
  430. End Sub
  431. Private Sub txt_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  432.         '<EhHeader>
  433.         On Error GoTo txt_MouseUp_Err
  434.         '</EhHeader>
  435. 100     If start2 = False Then Exit Sub
  436. 102     start = False: MOV = False: txt(Index).MousePointer = vbNormal: Set myobject = Form1
  437. 104     duz_dev_ediyor = False: mymod = 0: ' txt(Index).Appearance = 1
  438.         '<EhFooter>
  439.         Exit Sub
  440. txt_MouseUp_Err:
  441.         MsgBox err.Description & vbCrLf & _
  442.            "in Project1.Form1.txt_MouseUp " & _
  443.            "at line " & Erl
  444.         Resume Next
  445.         '</EhFooter>
  446. End Sub
  447.