Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    378
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Modifying the pixels in a control (Word97 (NT))

    This is a bit of a long shot.

    I've been told that it's possible to write VBA code to modify a control's appearance, pixel by pixel.

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Modifying the pixels in a control (Word97 (NT))

    Something like this:
    Attached Images Attached Images
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    378
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Modifying the pixels in a control (Word97 (NT))

    That's it, exactly.

  4. #4
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Modifying the pixels in a control (Word97 (NT))

    Dale,

    Try this:

    1 picture control, backstyle: transparent
    1 textbox control (same size as picture control), backstyle: transparent
    Select textbox, Format>Order>Bring to Front
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    378
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Modifying the pixels in a control (Word97 (NT))

    Thanks, Kevin. Works well.

    The only problem I struck relates to trying to do it programmatically.

  6. #6
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Modifying the pixels in a control (Word97 (NT))

    Just curious, what does your "background" image look like? Is it the same image for all controls?
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  7. #7
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    378
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Modifying the pixels in a control (Word97 (NT))

    Hi Kevin

    I've attached a sample.

    Notice that the text disappears under the picture.
    Attached Images Attached Images

  8. #8
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Modifying the pixels in a control (Word97 (NT))

    You'll just have to widen the control to keep the text in view, I guess. I'm sure you checked google groups. If not try a search there.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  9. #9
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Modifying the pixels in a control (Word97 (NT))

    I seem to be able to get it to work...
    Attached Images Attached Images
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  10. #10
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Modifying the pixels in a control (Word97 (NT))

    And do it in code with:

    With Me
    .TextBox1.Height = 20
    .TextBox1.Left = 30
    .TextBox1.Top = 166
    .TextBox1.Width = 112
    .TextBox1.BackStyle = fmBackStyleTransparent
    .TextBox1.ZOrder (0)
    .Image2.Height = 20
    .Image2.Left = 30
    .Image2.Top = 166
    .Image2.Width = 112
    .Image2.BackStyle = fmBackStyleTransparent ' I don't think is even necessary
    End With
    Attached Images Attached Images
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  11. #11
    Star Lounger
    Join Date
    Aug 2001
    Location
    GA
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Modifying the pixels in a control (Word97 (NT))

    How about flipping your triangle up. Then make your textbox background sold. Then have the image peek out the upper right side of the text box. this would take care of your multi line text box issue and also your disconcerted users.
    Attached Images Attached Images

  12. #12
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    378
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Modifying the pixels in a control (Word97 (NT))

    That's great, Kevin.

    The only fish hook I can see is with multi-line text boxes, in which case I presume the red triangle will grow (and distort).
    Attached Images Attached Images

  13. #13
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    378
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Modifying the pixels in a control (Word97 (NT))

    Thanks, Bruce

    I like it!

  14. #14
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    378
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Modifying the pixels in a control (Word97 (NT))

    Hi Kevin
    What is "google groups"?
    Dale

  15. #15
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Modifying the pixels in a control (Word97 (NT))

    I'll take that one. http://groups.google.com is the successor to DejaNews, a web-based archive of and interface to Usenet newsgroups.

Page 1 of 2 12 LastLast

Posting Permissions

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