Print Page | Close Window

drawing line in Picturebox on Dockingpane

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=19405
Printed Date: 04 May 2024 at 4:58am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: drawing line in Picturebox on Dockingpane
Posted By: ruschmeier@truncad.d
Subject: drawing line in Picturebox on Dockingpane
Date Posted: 13 January 2012 at 5:03am
Hi once more,
 
I am using Dockingpanes and in each dockingpane I have picturebox. I cannot draw anything on the picturebox. In fact I cannot get contact to the picturebox at all. How do I do that?
 
This is the code I use to create the dockingpane, could someone insert the code to contact the picturebox?
 
*****************************
 
Private Sub DockingPaneManager_GetClientBordersWidth(Left As Long, Top As Long, Right As Long, Bottom As Long)
   
    CommandBars.GetClientRect Left, Top, Right, Bottom
End Sub
Private Sub DockingPaneManager_Resize()
    On Error Resume Next
   
    Dim Left As Long
    Dim Top As Long
    Dim Right As Long
    Dim Bottom As Long
   
    DockingPaneManager.GetClientRect Left, Top, Right, Bottom
    DockingPaneManager.RedrawPanes
    Here I would like to draw the line -------.Line (0, 0)-(1000, 1000), RGB(0, 0, 0)
End Sub
 
Private Sub DockeingPaneInit()
   
    Dim dpViewer As frmViewer
    Dim dpKorpusFront As frmKorpusFront
    Dim dpKorpusOben As frmKorpusOben
   
    Set dpViewer = New frmViewer
    Set dpKorpusFront = New frmKorpusFront
    Set dpKorpusOben = New frmKorpusOben
           
    Dim A As XtremeDockingPane.Pane
    Dim b As XtremeDockingPane.Pane
    Dim c As XtremeDockingPane.Pane
    
    Set A = DockingPaneManager.CreatePane(1, 1000, 520, DockRightOf)
    A.Title = "3D"
   
    Set b = DockingPaneManager.CreatePane(2, 5000, 120, DockLeftOf)
    b.Title = "Frontansicht"
   
    Set c = DockingPaneManager.CreatePane(3, 320, 200, DockTopOf, b)
    c.Title = "Draufsicht"
   
    A.Handle = dpViewer.hwnd
    b.Handle = dpKorpusFront.hwnd
    c.Handle = dpKorpusOben.hwnd
        
    DockingPaneManager.options.HideClient = Not DockingPaneManager.options.HideClient
   
End Sub
 
***************************************
 
Thanks,
Frank



Replies:
Posted By: SuperMario
Date Posted: 13 January 2012 at 11:04am
Use the handle to the picturebox you attached.  where is your attach event code?  whatever you used there should be the handle you use.


Posted By: ruschmeier@truncad.d
Date Posted: 13 January 2012 at 11:12am
Hi,
 
it works now, thank you very much!
 
Regards,
Frank



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net