Borderless form in VB implementation pop-up menu

xiaoxiao2021-03-06  42

Simply simple 1, set the formal property: a, the BorderStyle property is set to 0; B, the ControlBox property is set to false. (This is important, otherwise the border will appear after inserting the menu) 2. Edit the menu to edit the pop-up menu using the menu editor (Example: plus S1 is a first-level menu, its visible properties are invisible, plus S2 is second-level menu) As Figure 3, add a mouseup event, as the following private subform_mouseup (Button AS Integer, Shift As Integer, X as Single, Y as Single) if button = 2 THEN 'If you are right-click, pop-up menu PopupMenu S1 end if End Sub4, Get it, press F5 to run, right click on the form ~~~~~~~~~~~~

转载请注明原文地址:https://www.9cbs.com/read-68032.html

New Post(0)