Проект «Find Images in MS Word»


Листинг FindImages.frm
форма Visual Basic Aplication for MS Word


Состав формы:
    3 Label {2 Static, 1 Dinamic} (cimg);
    1 TextBox (testimg);
    6 CommandButton (cbOk,cbCansel,cbBegin,cbPrev,cbNext,cbEnd);

  1. |
  2. |
  3. |
  4. |
  5. |
  6. |
  7. |
  8. |
  9. |
  10. |
  11. |
  12. |
  13. |
  14. |
  15. |
  16. |
  17. |
  18. |
  19. |
  20. |
  21. |
  22. |
  23. |
  24. |
  25. |
  26. |
  27. |
  28. |
  29. |
  30. |
  31. |
  32. |
  33. |
  34. |
  35. |
  36. |
  37. |
  38. |
  39. |
  40. |
  41. |
  42. |
  43. |
  44. |
  45. |
  46. |
  47. |
  48. |
  49. |
  50. |
  51. |
  52. |
  53. |
  54. |
  55. |
  56. |
  57. |
  58. |
  59. |
  60. |
  61. |
  62. |
  63. |
  64. |
  65. |
    VERSION 5.00
    Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} FindImages
      Caption = "Find Images"
      ClientHeight = 1710
      ClientLeft = 45
      ClientTop = 330
      ClientWidth = 4710
      OleObjectBlob = "FindImages.frx":0000
      StartUpPosition = 1 'CenterOwner
    End
    Attribute VB_Name = "FindImages"
    Attribute VB_GlobalNameSpace = False
    Attribute VB_Creatable = False
    Attribute VB_PredeclaredId = True
    Attribute VB_Exposed = False
     
    Dim timg As Object
     
    Private Sub UserForm_Activate()
      Set timg = ActiveDocument.InlineShapes
      cimg.Caption = timg.Count
    End Sub
     
    Private Sub UserForm_Initialize()
      Set timg = ActiveDocument.InlineShapes
      cimg.Caption = timg.Count
    End Sub
     
    Private Sub cbOk_Click()
    Dim tempimg As Long
    On Error Resume Next
      tempimg = testimg.Value
      If tempimg > CInt(cimg.Caption) Then tempimg = CInt(cimg.Caption)
      If tempimg < 0 Then tempimg = 0
      testimg.Value = tempimg
      If tempimg > 0 Then timg(tempimg).Select
    End Sub
     
    Private Sub cbCansel_Click()
      FindImages.Hide
    End Sub
     
    Private Sub cbBegin_Click()
      If CInt(cimg.Caption) = 0 Then testimg.Value = 0 Else testimg.Value = 1
    End Sub
     
    Private Sub cbPrev_Click()
    Dim tempimg As Long
      tempimg = testimg.Value
      If tempimg > 1 Then tempimg = tempimg - 1
      If CInt(cimg.Caption) = 0 Then tempimg = 0
      testimg.Value = tempimg
    End Sub
     
    Private Sub cbNext_Click()
    Dim tempimg As Long
      tempimg = testimg.Value
      If tempimg < CInt(cimg.Caption) Then tempimg = tempimg + 1 Else tempimg = CInt(cimg.Caption)
      testimg.Value = tempimg
    End Sub
     
    Private Sub cbEnd_Click()
      testimg.Value = CInt(cimg.Caption)
    End Sub

Made in Terra No Names.

Сайт управляется системой uCoz