|
-
Sep 25th, 2000, 07:33 PM
#1
Thread Starter
Addicted Member
If I use me.print and printed 5 lines. How do I clear out only the 3rd line?
-
Sep 25th, 2000, 08:33 PM
#2
_______
<?>
I don't think you can but you could add your 5 lines to an array and then print them.
Then with an if statement you could remove it.
ie
Code:
'whatever event
Me.cls
Dim i as integer
for i = lBound(myArr) to uBound(myArr)
if myArr(i) <> 3 then
me.print myArr(i)
endif
next i
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Sep 25th, 2000, 11:46 PM
#3
Fanatic Member
Drop a command button on your form and try this one Shark!
Tell me if this is what you are looking for.
Code:
Option Explicit
Private Sub Form_Load()
Command1.Visible = False
End Sub
Private Sub Form_Click()
'PITFALL: When dealing with LINE, the "-" does not mean minus or subtraction
'********************Very Important Concepts***********************************
'The values on the left of the hyphen is the UPPER LEFT of the rectangle
'The values on the right of the hyphen is the LOWER RIGHT of the rectangle
'The first values in each parenthesis is the X coordinates
'The second values in each parenthesis is the Y coordinates
'(X1,Y1)-(X2,Y2)
'B - stands for box
'F - stands for fill
'Me.Line (Command1.Left, Command1.Top)-(Command1.Width, Command1.Height), vbRed, BF
'The only difference in this example is the STEP. It is RELATIVE to the first set
'of coordinates (Command1.Left, Command1.Top). In this case, to get the LOWER RIGHT
'coordinates, it adds Command1.Left + Command1.Width and same goes for the Y coordinates
Me.Line (Command1.Left, Command1.Top)-Step(Command1.Width, Command1.Height), vbRed, BF
'This example have another STEP infront of the first set of coordinates
'In this case, to get the UPPER LEFT coordinates, it adds
'Me.CurrentX + Command1.Width from the first set of coordinates
'and same goes for the Y coordinates
Me.CurrentX = Command1.Left
Me.CurrentY = Command1.Top
Me.Line Step(Command1.Width, Command1.Height)-Step(Command1.Width / 2, Command1.Height), vbYellow, BF
' 'Another Example
Dim str_File As String
str_File = "Testing"
Me.CurrentX = (Me.ScaleWidth - Me.TextWidth(str_File)) / 2 'CurrentX controls the left and the right
Me.CurrentY = 0 'CurrentY controls the up and the down
Me.Line Step(0, 0)-Step(Me.TextWidth(str_File), Me.TextHeight(str_File)), vbBlue, BF
'PITFALL: When STEP is present, it is just ADDING
End Sub
Chemically Formulated As:
Dr. Nitro
-
Sep 25th, 2000, 11:46 PM
#4
Fanatic Member
Also, if you want to blank out a certain line, just change the color to me.backcolor.
Chemically Formulated As:
Dr. Nitro
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|