tyy8
asked on
UI Design
I want to draw out a few lines on a form at design time (like being in MS Paint or something). But the toolbox doesn't seem to have such an object in it, is there a com object I can import? if not that, can you draw an HTML table on a form object (that would achieve the same thing that I'm after)
Concerning your question about HTML forms, I don't think you can draw an HTML form on the VB form object itself, although you can create a Windows webpage object and open a predefined HTML form in it:
>> Just right-click in your Toolbox when in design view and click "Add/Remove Items..."
>> Next, click the "COM Components" tab in the window that pops up. (It'll take a while to load...)
>> Then scroll down and check the "Microsoft Web Browser" box and click OK
Now you'll have a new "Microsoft Web Browser" object available in your toolbox. With it, you can add any size browser object to your form and tell it to load a certain HTML page which contains your HTML form.
-FIIS
>> Just right-click in your Toolbox when in design view and click "Add/Remove Items..."
>> Next, click the "COM Components" tab in the window that pops up. (It'll take a while to load...)
>> Then scroll down and check the "Microsoft Web Browser" box and click OK
Now you'll have a new "Microsoft Web Browser" object available in your toolbox. With it, you can add any size browser object to your form and tell it to load a certain HTML page which contains your HTML form.
-FIIS
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In my opinion a custom line control would be most appropriate here. A quick guide on how to do it..
Add a few properties to hold the values for the different colors, i.e gradients etc
You can go as wild as you like with properties, and i guarentee that your new line control will be vastly more flexible than the old vb6 one
Ovveride the onpaint event.
And put something like this...
Dim P1 as new pen(color.black,1)
e.graphics.drawline(me.lef t,me.heigh t/2,me.rig ht,me.heig ht/2)
p1.dispose
Add a few properties to hold the values for the different colors, i.e gradients etc
You can go as wild as you like with properties, and i guarentee that your new line control will be vastly more flexible than the old vb6 one
Ovveride the onpaint event.
And put something like this...
Dim P1 as new pen(color.black,1)
e.graphics.drawline(me.lef
p1.dispose
ASKER
Thanks everyone. The line control is in the VB6.0 toolbox - I just can't imagine why they got rid of it in .NET
--------------------------
>> In order to use the built in drawing features, first create a graphics object:
Dim yourGraphicObj As Graphics = CreateGraphics()
>> You can then use that object to draw several shapes:
yourGraphicObj.DrawLine(Ne
>> Play around with the functions and settings...
Hope that helps!
-FIIS