Hi! I got two Pictureboxes on my form. In one of the Pictureboxes i got a Label. Then I wan't to move the label from the first Picturebox to the other. How do I do this??
Carl Odin
Put your label within a frame (BorderStyle = None) in Picture1, then do this VB Code: Option Explicit Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long Private Sub Form_Load() SetParent Frame1.hWnd, Picture2.hWnd
Option Explicit Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long Private Sub Form_Load() SetParent Frame1.hWnd, Picture2.hWnd
Tips, Examples & Tutorials: A valuable forum tool • Generate unique TreeView keys • TreeView with "open" and "closed folder" icons • Time code using GetTickCount • How to trap the Tab key • Scroll a form • NumberBox ActiveX control • Color a ListView row • An InputBox form • How to use SaveSetting and GetSetting • A program registration scheme • Spellcheck a Textbox • Resize controls • Open Windows Explorer at Last Visited Path • A Blackjack Game • Count lines of code • Private Message Viewer • Copy/Paste VB Code • Paste VB Code Add-In • Insert Procedure Names Add-In • A calculator for the game of Spider • My review of REALbasic 2008 • VB6 Debug Tutorial • Picture/Video Viewer • VBF Photo Contest Winners 2009 - 2016
Or Set Label1.Container = Picture2 No need for Frames.
Originally posted by brucevde Or Set Label1.Container = Picture2 No need for Frames. You're right.
Forum Rules