home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / no_move / nomove.frm (.txt) next >
Visual Basic Form  |  1993-09-06  |  9KB  |  114 lines

  1. Form1
  2. Form11
  3. Image1
  4. Image1
  5. Label1
  6. Label1
  7. MS Sans Serif
  8. Image1
  9. CloseMain_Click
  10.     Form_Load<
  11.     CloseMain
  12. Visible
  13. Image1_Click
  14. popup
  15. CloseSub3
  16. Image1
  17. Height+
  18. CloseSub_Click
  19. CaptionX
  20. Form2
  21. Loadr
  22. mnuClose
  23. Form1
  24. mnuMain
  25. ACTIVE_TITLE_BAR
  26. TITLE_BAR_TEXT{
  27. Label1
  28.     ForeColor
  29.     BackColor
  30. Label1_Click
  31. Widthq
  32. ScaleWidth^
  33.     Alignment
  34. FontName
  35. FontSize
  36. Screen    
  37. TwipsPerPixelX
  38. TwipsPerPixelY
  39. Form_Resize
  40. Form_Click
  41. WindowStateh
  42. Image1_DblClick
  43. shown
  44. Image1_MouseDown
  45. Indexv
  46. Button
  47. Shift
  48. Picture
  49. Form_KeyPress
  50. keyAscii
  51. Form_GotFocus5
  52. SavedHeight
  53. SavedTop
  54. Image1_MouseUpA
  55. MouseX
  56. MouseY
  57. resizing
  58. KeyPreview(
  59. Form_KeyUpK
  60. KeyCode
  61. ALT_MASK
  62. KEY_F4
  63.     KEY_SPACE
  64. Value
  65.  required to re-adjust form height
  66.  after caption is added or removed
  67.  required to re-adjust form toph
  68. evaluates mouse coordinates to determine if popup should pop up.    
  69. Form_KeyUp
  70. this sub allows the user to access the system menu 
  71. by keying Alt+Space, or to close the form by keying Alt+F4..
  72. Form_Load
  73. This project is in response to a question posed by another MSBASICS
  74. forum member: "How can I create a nonmovable window which still has
  75. a control box, title bar and minimize button?"
  76. This project demonstrates the creation of a form which cannote
  77. be moved by the user, even though it has a control menu and 
  78. title bar.  This is achieved by simulating the control menu and
  79. title bar with an image and a label.  I didn't address the minimize
  80. button since that can be faked with a bitmap.  I simply added thez
  81. minimize option to the popup menu.
  82. There are two forms in this project; Form1 is visible with no menu,a
  83. while the invisible Form2 contains a menu for popup use by Form1.u
  84. Form_Load sets up the visible form, which contains
  85. Image1 to hold the control menu bitmap, and label1, whichn
  86. simulates the title bar.  When the user clicks Image1, a e
  87. popup menu is shown using a menu from the hidden Form2..
  88. After Form1 is minimized there is no control menu which appears when
  89. the icon is clicked, but a double-click still restores it.
  90. THIS IS A BIG KLUGE JOB and I don't guarantee that it's the best
  91. solution. I merely got bitten by the 'figure it out if you can' bug.
  92. I hope this is helpful and informative, at the least.  If you have any  
  93. questions, please feel free to email me!
  94.  Barry Seymour
  95.  Marquette Computer Consultantse
  96.  CIS 70413,3405u
  97. setup Form1...
  98. position Image1 
  99. position, setup Label1
  100. System
  101. centered
  102. Unmovable Form Demo
  103.  form-level var 
  104.  form-level varm
  105.  don't show it.t
  106. Form_Resize
  107. form was just restored.  Clear it's caption and ensure
  108. it's correctly sized and positioned. (Required because
  109. form height & Top change when caption is removed)c
  110. Image1_Click
  111. Yields the popup menun
  112. Image1_DblClick
  113. closes the program
  114.