![]() ![]() This event is called when it is appropriate to display a contextual menu for the control. In a single window interface, the Activate event fires when the window is activated, e.g., when the app first displays the window.ĬonstructContextualMenu(Base As DesktopMenuItem, x As Integer, y As Integer) As Boolean The Deactivate event fires when another window becomes active. This can be because the app is launched or a window belonging to another app is no longer frontmost (active). See the DesktopApplication and DesktopWindow Activate events. In a single window interface, the Activate event fires when the parent window is activated. ![]() In the Keydown event of the window, the following code calls the Scroll method whenever the Up, Down, Left, or Right arrow keys are pressed. The picture is scrolled 8 points at a time. The properties XScroll and YScroll have been added to the window to hold the amounts the picture has been scrolled. The following example scrolls a picture that was added to the project. This allows the implementation of a scrolling pane of controls. If the moveControls parameter is True, any controls on top of the DesktopCanvas control will also be scrolled. This can be done by adding properties to the window that contains the DesktopCanvas control or by creating a new class based on the Canvas control that contains properties to hold the last X scroll amount and last Y scroll amount. To use the Scroll method to scroll the contents of a DesktopCanvas control, you need to store the last scroll value for the axis you are scrolling so you can use this to calculate the amount to scroll. moveControls indicates whether controls positioned on top of the DesktopCanvas control should be scrolled as well. If these are not passed, the entire picture will be scrolled. The x, y, width, and height parameters specify the portion of the picture to be scrolled. Positive values scroll right and down while negative values scroll left and up. Scrolls the Canvas contents according to the passed parameters.ĭx and dy are the number of points to scroll horizontally and vertically relative to the current position of the picture in the DesktopCanvas control. Scroll(dx As Integer, dy As Integer, x As Integer = 0, y As Integer = 0, width As Integer = -10000, height As Integer = -10000, moveControls As Boolean = True) System Requirements for previous releases.System requirements for current release.Reporting bugs and making feature requests. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |