RE: Visual Basic



I don't know if I'm being incredibly thick here but, try this.

Create a rectangle on a form. Ensure that the back style is set to normal
and that the back colour is set to anything other than the form colour.

Create a text box and in the 'After Update' Event Write:

Me.Box54.Width = Me.Text55 * 50 - Box55 and Text55 were the names of my two
controls. Change these to reflect the controls on your form.

To test run the form and enter a number in the text box. This number is
multiplied by 50 twips to increase or decrease the width of the box.
Presumably when you've added all your bits and pieces the number will be
derived from somewhere else.

I'm sure that a 'guru' would put me to shame on this.

Michael K

"AZWM" wrote:

> I have absolutely no experience with Visual Basic so I really have no idea
> how to write this code. I need to write one that creates a timeline - so it
> would create different lengths for rectangles based on how long a project
> lasts. Thanks for any and all help.
.



Relevant Pages

  • Re: Placing Borders on Reports
    ... would only work in the On Print event since the controls' grown height can't ... given by the settings for the CurrentX and CurrentY ... starting point for the line or rectangle. ... the RGB function or QBColor function to specify the color. ...
    (microsoft.public.access.reports)
  • Re: Rectangles w/ LineCap.Round
    ... You need to look at the business of creating controls a bit more closely. ... macro-size graphics commands. ... I've read the previous post on 'Round Borders Rectangles' and viewed ... > replace it with a rectangle button with round ends. ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Problem with custom Panel class
    ... This should draw on top of all controls. ... > selection rectangle is drawn behind the controls on the Panel. ... > private bool isMouseDown = false; ... > private void OnMouseDown ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: two color form
    ... That is to bring all the objects "behind" the rectangle to front. ... the "disappearing" controls, go to the Format menu and choose Bring to Front ... > one label control disappears and the other stays given the environment ...
    (microsoft.public.access.forms)
  • Re: MS Access Forms - Formatting
    ... Is the rectangle on top of the controls? ... "send to bak" from the format menu. ... I've switched the Back Style Property to Normal from ...
    (microsoft.public.access.forms)