Results 1 to 8 of 8

Thread: toolbox

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    toolbox

    umm, it's kind of a hard question, but plz bear with me
    I want to have a toolbox for my program that could attatch itself to the main form OR be used as a separate form. Like in MS-Paint, the drawing toolbox is a part of the main form but you can also take it out and it will look like a separate form


    how do I make such a thing? any ideas?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    Member wej42's Avatar
    Join Date
    May 2002
    Location
    Rhode Island, USA
    Posts
    48
    iv seen a tutorial for doin that on vb-world for vb6, not sure bout .NET
    but, heres the wrong way of doing it (my way)...
    make 2 forms and make the toolbox w/o a border and make it so that
    if tool.left <= tool.width +10 then '(basicall if its on the left) then
    tool.left = tool.width +10 'lock it onto the left
    end if
    or instead of making it be tool.width +10 u could do like frmMain.left + tool.width +10 and thatd snap it to the main forms left

    anyways, thats what i would do.. im 100% sure theres a easier / more efficient way

    hope this helps till you get a real way of doin it
    Visual Basic 6.0, Visual Basic .NET, C#, C++, ASM, HTML

  3. #3
    Member wej42's Avatar
    Join Date
    May 2002
    Location
    Rhode Island, USA
    Posts
    48
    ok i was gonna make an app that did this for you, but it turns out it doesnt work to well.. it works, but when you move it, it looks like there are 1000 forms on ur screen till u mouse_up..so, dont do that unless ur desperate
    Visual Basic 6.0, Visual Basic .NET, C#, C++, ASM, HTML

  4. #4

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    tnx for the effort though

    umm, lets see! hmm...
    So I can make a second form as my toolbox. the only problem is how to do that SNAPPING thing to attach it to the main form?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  5. #5
    hellswraith
    Guest
    You can have a toolbar on the main form that is hidden when the form is showing, and when the form gets within a certain distance, show the toolbar and hide the form at the same time. Also, when the person drags the toolbar away fromt he main form toolbar area the form appears and the toolbar on the main form is set to hidden. It is just a dancing act you have to do to perform it.

  6. #6

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    k, I'll do that
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  7. #7
    Member wej42's Avatar
    Join Date
    May 2002
    Location
    Rhode Island, USA
    Posts
    48
    theres gotta be an easier way... bill gates is just hiding it from us
    Visual Basic 6.0, Visual Basic .NET, C#, C++, ASM, HTML

  8. #8
    Member wej42's Avatar
    Join Date
    May 2002
    Location
    Rhode Island, USA
    Posts
    48
    form2_move
    if form2.left <= form1.left + 10 then
    timer1.enabled = true
    end if
    end sub

    timer1_tick
    form2.left = form1.left + 10
    form2.formborderstyle = none 'not the exact code, dont have vb open right now... change the border to look more like a toolbox
    end sub

    ContextMenuOrButtonOnForm2_click 'some button that undocks the toolbar
    timer1.enabled = false
    form2.borderstyle = fixedtoolwindow 'not the exact code here either, makes it a normal form again, its close tho
    end sub


    try that.. that seems to me like it would work (i havent tested it, this is just what i would do.. maybe instead of timer u could use a loop or somethin)

    *edit* o ya, and u can do something like this for top/bottom/right also

    hope this helps!
    -me
    Visual Basic 6.0, Visual Basic .NET, C#, C++, ASM, HTML

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width