Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Save Circle,line


I was wondering if it was possible to keep things like Circles, and Lines that you apply with code from dissapearing after you minimize the form, or move another window in front of it.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Line On Circle
Greetings every1,
i want to draw a circle and a line attached to the circle, and with each step, the line must rotate on the circumference of the circle. I think a look at the attachment will make u guyz understand the problem, plz help me. I want to now how to do it mathematically. Thanx

Line On Circle
Greetings every1,
i want to draw a circle and a line attached to the circle, and with each step, the line must rotate on the circumference of the circle. I think a look at the attachment will make u guyz understand the problem, plz help me. I want to know how to do it mathematically. Thanx

Circle Follow Line?
Hellow...

Is there somebody who can help me with next question... How can i let follow a circle on a line? (see attachment)....

tnx MiSKMaN

Draw This Line On The Circle.
i want to draw the top left red line so it touches the edge of the circle.
instead of going to the middle of the circle like the other 3 lines i want it to go from (0,0) like it does, and stop the line when it hits the outside of the circle.
i dunno the maths to do this if anyone can help?

More Intersections: Line And Circle
i've looked around and found the actual formula for determining where a line and a circle cross and its a total nightmare. far to long, and way too slow to use eficiently. besides, i'm not looking for the point(s) where they cross, just if they do.

the only better way i have thought of to do it would be:

project a line out from the center of the circle the length of its radius.
make that line perpendicular to the line i'm testing, keeping one endpoint at the center of the circle.
if those lines intersect then the line i'm testing for is inside the circle, right? sounds pretty solid in theory, but i'd love a check on my logic there. i'm wondering if there is a flaw i'm not seeing. either way, isn't there a more efficient system for doing this? other than that horrible formula?

Circle,line,angle
Hi,

I'm trying to make sort of a pie chart. I have a circle and a line that appear when my form loads. I also have a textbox and a command button. The idea is this: a person enters a number into the textbox, and when they click the command button the figure entered in text1 is given as an angle with the line at Form_Activate, from the centre of the circle:

Private Sub Form_Activate()
Circle (1000, 1000), 1000

'north
Line (1000, 1000)-(1000, 0)
'east
'Line (1000, 1000)-(2000, 1000)
'west
'Line (1000, 1000)-(0, 1000)
'south
'Line (1000, 1000)-(1000, 2000)
End Sub

'and when they click command button:

Private Sub Command1_Click()
Line (1000, 1000)-(1000 + Text1 * 11.11, 0 + Text1 * 11.11)

End Sub


The way I had planned was by getting the X2 and Y2 coordinates of two lines, both of length 1000, for 0 degress and for 90 degress, from the centre of the circle.

These coordinates are:

0 degrees: (1000,0)
90 degrees: (2000,1000)

Then I divided 1000 by 90, which is 11.11 (Let this equal 1 degree). So if someone enters 10 in text1, the X2 coordinates of the line will move 1000 + 10 times 11.11, and the Y2 coordinates will move 10 times 11.11.

But it doesn't work. It works fine for 90 degrees, exactly, but the lines are all different lengths for different angles, apart from that.

So in a nutshell, how can I draw lines at an angle (whose size is specified in text1) with the line at Form_Activate, from the centre of the circle?

Thanks for any help!

Drawing Circle,arc, Or Line
Can anybody show me or provide links on some tutorial that explain how to draw circle, arc, or line in picturebox using VB6, including explain how or what these codes is defined. Perhaps you could explain me on next post if you can help. You help is appreicated

Can Be Draw A Curve Line From A Circle?
Hi all. I want to make a curve line, and I have think that a curve can be considerated as a part visible of a ellipse. So I have tried to create a procedure that draws an ellipse.


Code:
dim radius as double
dim bucle as long
dim x as double
dim y as double

radius = 2500
Picture1.Cls

For bucle = 1 To radius
X = Sin(bucle) * radius
Y = Cos(bucle) * radius

Picture1.PSet (((Picture1.Width / 2) + (X + radius)) - radius, ((Y + radius) + Picture1.Height / 2) - radius)
Next bucle

with this. I can draw a perfect circle in the middle of a picturebox ...
but If I only want to display a cuadrant ... how I can know what are the pixels that I want to show, and the pixels that i don't have to draw.

ah ... if there is other methods to draw curve lines, please tell me

Thanks in advance

.circle And .line Drawing In Excel
Hi,

I'm normally not a Excel VBA coder. I looked up Drawing, Circle, and Line in the repository and found mostly references to Shape objects being used on a worksheet. Is that my only drawing option in Excel? I was hoping for someway to put a standard picturebox on my Excel Userform.

I'm looking for the basic Circle and Line drawing methods I'm familiar with.

~T

Line, Circle + With..end With = Deadly Combination?
I read in VB help on line and circle method and it showed a warning now to put them inside a with..end with.

Well i did that alot and found no error with that.

Interestingly, I looked up "with... end with" topic and there is no warning whatsoever regarding it's usage with line and circle method.

Can anyone explain what's happening? thanx! Just wanna put my curious mind to rest. :P

Move A Circle Along A Straight Line.
Hello everybody,

I'm playing around a bit and trying to do this, but I'm not quite getting there the way I'd like.

I'll explain. I draw a line on a picturebox. Now I want a circle to start moveing from the startpoint of the line to the end of the line at a constant speed. Now my math and physics skills are not very good.

Right now I can get it to work by defining the function of the line (f(x)=ax+b) and then incrementing either x or y but of course this way the speed at which the circle moves depends on the angle of the line.

I hope someone of you can explain in a simple way how to do it.

Thanks in advance for any feedback,
pebtos

Drawing A Semi-Circle Line
Well here I am again, stumped. I've looked through API viewer and didn't even find an API that I thought would help. I need to draw a semi-circle line. It needs to be able to change the distance it goes, how high it goes, etc. Like the starting point would be the X1, the ending point would be the X2, and the highest point of the line would be the Y. Also, I need to be able to draw it ontop of a window of an external application (not anything at all todo with my project). Thank you for your time

Calculating The Angle Of A Line In A Circle
Hi all,

I've got some complicated physics equations I need to use in VB, and I need to figure out the angle of a line, from 0 to 180...


Here is a screen shot of the line:

Draw Line Or Circle In A Picture Box
Hi!
I trying to pass some code in VB6 to VBA but I can find a way to access PictureBox control features like drawing a circle or a line in VBA. Is it possible? I probably need to import a reference like msvbvm60.dll (when I do it, it conflicts with the default object library loaded). Is there another way of doing this?
Thanks in advance, any help is welcome!
Best regards,
Luis Fernandes




Edited by - luisfernandes on 10/14/2003 11:09:28 AM

Delete Circle And Line From Piccturebox
i have drawn some circles and lines in a picturebox using line and circle method of picturebox control now i want to delete few of them,please help me how to dothat with source code ,its urgent please

Making A Circle SHAPE Follow A Line
ok - i've got it set so that when i press a button a line locks onto a specific part of the form - and the other locks onto where the puck(circle) is (which could be anywhere)

now i'm wondering how i could make the puck then follow that line until the end of the line

right now i have it set so that the line Begins at the specific part of the form - and the end (X2,Y2) start at the puck - but i could easily change it around if it's easier

How To Select A Line Or Circle Or Curve At Runtime
Hi. I have written some graphics code using VB 6.0. I wonder if anyone knows how I can I create codes that allows me to pick or select one of the entity that I have generated during runtime. The program create a line between two end points in the picbox. It also allows user to create a circle around the picbox. Then it allows user to create a curve (points) based equation. Finally, it allows user to generate a line based by specifying
two points using form2.

Form 1 :

Private Sub DrawCvCmd_Click()
Dim n As Single
picbox.DrawWidth = 1
For n = 0 To 100 Step 0.2
picbox.PSet (n, Sqr(n)), vbMagenta
picbox.CurrentX = 55
picbox.CurrentY = 12
picbox.Print "y = Sqr(X)"
Next n
End Sub

Private Sub drawlinecmd_Click()
picbox.DrawWidth = 1
picbox.Line (0, 0)-(100, 100)
picbox.DrawWidth = 4
picbox.PSet (0, 0), vbBlue
picbox.PSet (100, 100), vbBlue
picbox.CurrentX = 55
picbox.CurrentY = 55
picbox.Print "y = x"
End Sub

Private Sub clrcmd_Click()

picbox.Cls
End Sub

Private Sub DrawCirCmd_Click()
picbox.DrawWidth = 4
picbox.PSet (50, 50), vbBlue
picbox.DrawWidth = 1
picbox.Circle (50, 50), 50, vbRed
picbox.CurrentX = 50
picbox.CurrentY = 50
picbox.Print "Centre of Circle (50,50)"
End Sub

Private Sub EndCmd_Click()
End

End Sub

Private Sub Form_Load()

picbox.Scale (0, 100)-(100, 0)
picbox.DrawWidth = 2
picbox.Line (0, 0)-(0, 100), vbBlue
picbox.Line (0, 0)-(100, 0), vbBlue





End Sub

Private Sub GPt_Click()
form3.Show
End Sub

Private Sub SpdrwCmd_Click()
Form2.Show
End Sub


Form 2:


Private Sub OKCmd_Click()
Form1.picbox.DrawWidth = 1
Form1.picbox.Line (x1, y1)-(x2, y2), vbBlack
Form1.picbox.CurrentX = x1
Form1.picbox.CurrentY = y1
Form1.picbox.Print "(" & x1 & "," & y1 & ")"
Form1.picbox.CurrentX = x2
Form1.picbox.CurrentY = y2
Form1.picbox.Print "(" & x2 & "," & y2 & ")"
Form2.Hide

End Sub

Problem: Assigning Name To Shape/circle/line
I am new to Vb6 but need to create lines/circles rectangles on a form.
I want to be able to reference each these lines/circles later so I can
change dimensions relative to textbox entries. I am at a loss as to how

to set a name for each line create after creating it eg.with.circle
(x,y) r . how do I define this as eg: "circle1"
Any help would be appreciated ..thanks Stevebriz

Drawing A Line From Centre Of Circle To Circumference?
Hi,

Say i've got a circle. Is there a formula i could use to draw a line from the centre of the circle to any point of its circumference? What i am doing is simulating the dashboard of a car, and this is for speedometers and stuff.

Thanks in advance

Line, Circle, Scale And PSet Methods
I'm Making a Controll similar to the Picturebox Control but with more stuff, I'm trying to add the line circle, scale etc methods to it.

The Line Method Works if you use this code


Code:
Public Sub Line(ByVal Flags As Integer, ByVal X1 As Single, ByVal Y1 As Single, ByVal X2 As Single, ByVal Y2 As Single, ByVal Color As Long)
Picture1.Line (X1, Y1)-(X2, Y2), Color
End Sub
Meaning you can call it like this
Code:
usrExtendedPctBox.Line(0,0)-(100,100),vbWhite
or using any other method that works with the standard line method

Does anyone know how I can do this for the PSet, Scale and Circle Methods?

Thanks

[Edited by Sam Finch on 06-21-2000 at 11:55 AM]

How To Move Drawing Objects(line,circle,rectangl)
Hi

how to move,resize drawing objects(line,circle,rectangle etc.)in run time using mouse.

plz help

Save To Last Line
I'm fairly familiar with EOF, but I'm not quite sure how to go about setting it up with my routine. Here is the code i'm working with: (it's executed when CmdSave is clicked)

Code:
Function Save()
Open App.Path & "employees.dat" For Output As #1
Write #1, TxtUserID, TxtPW2
Close #1
End Function

As of now, when I click save it rewrites employees.dat and places the contents of TxtUserID and TxtPW2... I need it to save to the last line each time so that it won't rewrite over my other save's.

Save Me A Line Of Code Please.....
Hi everyone, what I am doing is copying data, say in range A1:A5 which hold formulae, and pasting into A1 of the same page, as values...currently I'm using:


Code:
Sheets("Results").Range("A1:A5").Copy
Range("A1").PasteSpecial xlPasteValues
is it possible to reduce this to one line of code, something along the lines of:


Code:
Sheets("Results").Range("A1:A5").Copy Destination:=Range("A1") .PasteSpecial xlPastevalues
which of course doesn't work...but I think shows you what I'm trying to do. Let's assume that worksheet "Results" isn't already active...any ideas out there??? Can someone save me 1 whole line of code?? :-)

Thanks,

Dave M.

Save File Without Line Break
Open Directory For Output As #1
for counter = 0 to list1.listcount-1
Print #1, List1.list(counter)
next
Close #1


When i use this code (this is a short version of it =) and the listbox contains an comma char ( , ) it will break the row... how can i avoid this?

example list item (0) contains this string

"Hello this is a test"

will be

"Hello this is a test"

when opening it in notepad...

but if the item is:

"Hello, this is a test"

then when opening i get

"Hello,
this is a test"

Hope someone can help me with this issue... the listbox stores filenames and some filenames contains "," chars... thats why i don't want any row breaks..

Thanks

Save Last Line In Rich Text Box
I have a Rich Text Box in which I load a log file (text file) for viewing & editing purposes. I would like to be able to save the file that is currently displayed as well as write the last line( the last line only, the line that the operator appended with a time stamp of completion), to be appended to the end of another text file file, that will be printed & cleared on a weekly or monthly basis.

To save the currently displayed file I use
rtbWindow.SaveFile "c:log.txt", rtfTEXT

How do I save the last line edited to another file?

VB Line Graph Save As Image
Hi all, this is sort of a 2 part problem...

Part 1: i need a good tutorial on how to make a line graph (chart), simple x - time again y - value sort of stuff. A 3D graph would be preferable, just after a nice and easy to follow tute, for newbies

Part 2: once i get this chart... i need to save it as an image, jpg or gif, so that i can call it into a html page that my program generates as a report. i am really hoping tha this is possible... and if anyone has any ideas... please let me know.

Thanks for your time upto now...

Mojoinst

Save RTF With Line Breaks (RMargin2CrLf)
Hi,
I'm making a RTF editor for my college project. As far as I know RTF files do not save right margins. So, I've added a MS-Word like feature "Save RTF with Line Breaks", which saves each line (as seen on the screen) with a CrLf (if it is not already there).
But the code is pathetically slow. Is there a way to do this faster ?

'=====================================
Public Function InsertNewLineChar(rtf1 As RichTextBox) As Boolean

'Adds a vbNewLine character after every line (as seen on screen)
'---------------
'LineNumber starts from zero
Dim RTFMaxLine As Long
Dim PreviousLine As Long
Dim CurrentLine As Long
Dim TotalChar As Long
Dim i As Long
TotalChar = Len(rtf1.Text)
RTFMaxLine = rtf1.GetLineFromChar(TotalChar)

If RTFMaxLine < 0 Then
InsertNewLineChar = False
Exit Function

Else
rtf1.SelStart = 0
PreviousLine = 0

For i = 0 To TotalChar
DoEvents

If StopNow Then Exit Function
rtf1.SelStart = i
rtf1.SelLength = 0
CurrentLine = rtf1.GetLineFromChar(i)
frmRTF.Caption = "Inserting NewLine Character : Line : " & CurrentLine & " of " & RTFMaxLine & " | Character Index : " & rtf1.SelStart & " of " & TotalChar

If CurrentLine <> PreviousLine Then 'Line changed
rtf1.SelStart = i - 2
rtf1.SelLength = 2

If rtf1.SelText <> vbNewLine And rtf1.SelText <> "" Then 'Insert a new line char
rtf1.SelText = rtf1.SelText & vbCrLf
End If

rtf1.SelStart = i + 2
rtf1.SelLength = 0
i = i + 2
PreviousLine = CurrentLine
CurrentLine = CurrentLine + 1
End If

Next i

InsertNewLineChar = True
End If

End Function
'=====================================

Save PDF File Command Line
in my VB program I have this line:

intTestVar = Shell("C:Program FilesAdobeAcrobat 6.0AcrobatAcrobat.exe " & strFileName)


it works just fine...it opens adobe, then opens the file, then converts it to pdf just fine....all i need for it to do now is save automatically but i don't know how to do this... any ideas?

-B

Selective Line Display/Save
Hello Group,

I am reading a file, line at a time. For example.

17 Carol Vorderman's Summer Detox: the 14 Day Mini Detox
Vorderman Carol Et Al | Adult | Paperback | Virgin | Jun 2003 | $29.95 | 0753507668


18 Total I Ching: Myths for Change
Karcher Stephen | Adult | Hardback | Little, Brown | Jun 2003 | $35.00 | 0316724319


I only want to keep lines that contain the "$" sign.


Private Sub mnuItemOpen_Click()

Wrap$ = Chr$(13) + Chr$(10) 'create wrap character
Open App.Path & "MyFile.txt" For Input As #1

Do Until EOF(1) 'then read lines from file
Line Input #1, LineOfText$

Start% = InStr("$", LineOfText$)

If Start% = 1 Then '$ sign was found so want to keep this line
AllText$ = AllText$ & LineOfText$ & Wrap$
txtFile.Text = AllText$ 'display file
End If
Loop

Close #1 'close file
End Sub


These two lines:

AllText$ = AllText$ & LineOfText$ & Wrap$
txtFile.Text = AllText$

dont work inside of the IF statement.

What am I doing wrong?

Any help most appreciated.

Thanks in advance.

Regards
Jeff

Printing Line Plotting And Save As Jpg
I have a working form with line plotting.
basically its a vector plotting.
I would like to print the plot on a default printer.
how do i do it?

and also how to save the form/plot in to a jpg file.
Thanx

Save A Return Delimeted Line
this is associated with my paragraph indent topic.
Using a rich text box I can get the indention I need. my question is how can I save the contents of the rich text box one line at a time. I would need to convert any indention to spaces.
I need it a line at a time so that I can place a return at the end of each line.


------------------
I am so skeptacle, I can hardly believe it!

Can't Save Multi-line Textbox
For some reason when I try to save/update a form with a multi-line text box on it I get oledb errors. Then I simply change the text box back to NOT multi line and it saves/updates just fine.  The backend database is sql 7 the field is varchar set for 500 characters.  

aspvbwannab

Save To Text File Next Line Easy :)
okie this is my code,


Code:
Private Sub Command1_Click()
Open App.Path & "
icks.txt" For Output As #1
Print #1, Text1.Text
Close #1

End Sub



Private Sub Command2_Click()
Dim nicks As String

Open App.Path & "
icks.txt" For Input As #1
Input #1, nicks
Close #1
Text2.Text = nicks
End Sub


Now i am wondering why, is every time i store a new nick, the other one gets erase I basically want to keep adding nicks to the text file, without erasing the others, and yes i am a newby to saving to text ectt.. any help would be greatly apreciated, or a link to learn better bout saving on text ect.. thanks

How To Get Specific Data From A Line And Save In Excel?
Hi everyone,


My Problem:
How to get only specific data from a whole line?


eg. I got --> "00 1F 00 5D 25 4E 3C 23..." but i only want 00 1F, the next time i will only wan 00 5D...

Anyone got this idea?

p/s:
The data "00 1F 00 5D 25 4E 3C 23.." will keep adding on (update)..

So once it update, i will only take the updated data only..

The "00 1F 00 5D 25 4E 3C 23" are Hex data.. i need to convert 00 1F to decimal than save into excel..

Thanks

SQL Statement Too Long. How To Wrap The Line So I Can Save?
I have an SQL statement that is too long to fit into the window as well as to save (or so vb6 is complaining)
I tried the usual " _" but it tries to do some crazy stuff like put in a "" and then doesn't work/errors etc

What is the correct way to word wrap a SQL statement

Thanks
Statement below

Code:strSQL = "SELECT VehicleMaster.VehicleID, VehicleMaster.StockNumber, VehicleMaster.TradeNumber, VehicleMaster.VehicleStatus, VehicleMaster.VehicleType, VehicleMaster.VehicleTypeID, VehicleMaster.VIN, VehicleMaster.FactorID1, VehicleMaster.FactorID2, VehicleMaster.VehicleYear, VehicleMaster.VehicleMakeID, VehicleMaster.VehicleModelID, VehicleMaster.PreviousOwner, VehicleMaster.VehicleBody, VehicleMaster.VehicleOptions, VehicleMaster.VehicleColor, VehicleMaster.VehicleInterior, VehicleMaster.Package, VehicleMaster.Engine, VehicleMaster.Transmission, VehicleMaster.Drive, VehicleMaster.TOPS, VehicleMaster.PS, VehicleMaster.PB, VehicleMaster.AC, VehicleMaster.Tilt, VehicleMaster.PW, VehicleMaster.PL, VehicleMaster.Stereo, VehicleMaster.CDPlayer, VehicleMaster.TapePlayer, VehicleMaster.Cruise, VehicleMaster.Title, VehicleMaster.TitleNumber, VehicleMaster.VLicense, VehicleMaster.LicenseExpire, VehicleMaster.Miles, VehicleMaster.Damage, VehicleMaster.WarrantyID, VehicleMaster.Weight, VehicleMaster.LastOffer, VehicleMaster.Deposit, VehicleMaster.NoOfTires, VehicleMaster.KeyNumber, VehicleMaster.TradeIn, VehicleMaster.SalePrice, VehicleMaster.InvoicePrice, VehicleMaster.GrossProfit, VehicleMaster.AskPrice, VehicleMaster.MSRP, VehicleMaster.RepairOrderCost, VehicleMaster.RepairOrderRetail, VehicleMaster.OrderNumber, VehicleMaster.OrderDate, VehicleMaster.MakeDate, VehicleMaster.InventoryDate, VehicleMaster.SaleDate, VehicleMaster.CustomerID, VehicleMaster.SalespersonID, VehicleMaster.CustomerDetailID, VehicleMaster.Depreciation, VehicleMaster.FloorPlanAmt, VehicleMaster.FinancingOptions, VehicleMaster.FinanceEndDate, VehicleMaster.FuelType, VehicleMaster.Comment, VehicleMaster.LicenseState, VehicleMaster.HoldBack, VehicleMaster.Incentive, VehicleMaster.DealerPack, VehicleMaster.Advertising, VehicleMaster.Rebate, VehicleMaster.Spiffs, VehicleMaster.VehicleNote, VehicleMaster.LicenseID, VehicleMaster.KeyCode, VehicleMaster.KeylessCode, VehicleMaster.MileageStatus, VehicleMaster.VIN2, VehicleMake.LongDesc AS VehicleMake, VehicleModel.LongDesc AS VehicleModel
FROM (VehicleMaster INNER JOIN VehicleMake ON VehicleMaster.VehicleMakeID = VehicleMake.VehicleMakeID) INNER JOIN VehicleModel ON VehicleMaster.VehicleModelID = VehicleModel.VehicleModelID WHERE VehicleMaster.StockNumber = '" & strStockNumber & "'"

Read, Process && Save Each Line Of A Binary File
Hello I have a file with 10 lines in it.
I want it cut off at 71 characters, because this file is being processed by my FTP server for NEW DIRECTORIES display.

I'm not very good at VB, and what I want to do is this:

Open File

Read each line into a string
tempstring = Left(string,71)

Update line
Next line until EOF
Close File

I tried some different approaches but I'm no hero in file handlers etc.
Any help would be greatly appreciated

Best Way To Manage 3-d Data && How To Read Ith Item In A Line (save Memory)
I have 2 questions actually:

How to effectively manage a 3 dimensional data, like a function f that depends on x, y, z; i.e. f(x,y,z)
I want to output the data to a txt file using comma delimited (most data are numeric)

The structure in a row & column layout would look like this:


Code:
x1:

z1 z2 z3 ...
y1 f111 f112 f113
y2 f121 f122 f123
...

x2:...

...

And then, I want to read from that txt file certain rows and columns only, not all of them. Is there any way to do it without reading the whole thing in to save memory?

TIA

EDIT: I found a way for the second question: using Line Input then Split array, but don't know how to jump to a certain line (Seek is hard to use since my data length is variable in each line).

Line Input #1, Line...how Do I Read Ahead One Line (or Back Up One Line)
I am loading a file line by line using the LIne Input but at one point i need to look ahead at the next line to decided what to do on the current line...how do i look ahead one line? or how do i use the line Input function and then back up? Any help would be greatly appreciated.

Shane Thomas
p.s. please email replys in addition to the reply of post too
shathoma@nmsu.edu

Save Last Line In Rich Text Box To Text File
From previous post - poor description

I have a Rich Text Box in which I load a log file (text file) for viewing & editing purposes. I would like to be able to save the file that is currently displayed as well as write the last line( the last line only, the line that the operator appended with a time stamp of completion), to be appended to the end of another text file file, that will be printed & cleared on a weekly or monthly basis.

Can anyone help me?

Line By Line Text File Read And Correct Each Line
Can anyone help me create a small program or have any pointers
on pieces of code that reads a text file from folder "unfixed" then
fix the contents and then store the corrected contents
in another folder "fixed" and then move the file in folder "unfixed" to folder "old"

Details of contents.
There is a space infront of each line that should be removed.
Between the first group of numbers and the second there should be a zero for every space.
Then after the second group of numbers there should be just one space and the rest trimed off.


011531015222360000500355 3350505212004 50122
011531015222360000500363 5336305212004 6255
011531015222360000503465 2404505212004 50022
011531015222360000503463 1345205212004 50025
02153101522236 13 1503256


The @ symbol represents where a space should be.
I would like to read the file and then correct it and then
place the fixed contents in another folder with the original name.
Below is how I would like it to look.

01153101522236000050035500000003350505212004@
01153101522236000050036300000005336305212004@
01153101522236000050346500000002404505212004@
01153101522236000050346300000001345205212004@
021531015222360000000013@

Replacing A Line Of Text With A Blank Line, Then Delete That Line
The code below works perfect, retrieving the string of text that the user selects from the listview. Then I do bla bla bla. What I want to do is convert this so that the the user selects a string from the listview which corresponse to a string in the file. then click remove. my problem is, how do i remove a line of text from a text file? if i open for reading i cant modify the contents, if i open for writing it erases the data. and i dont want to write the data into a string, parse out the string that i don't want then rewrite the file.... that could be....not so good...

---------------------------------------------------------------------------------
'the line that actually is in the file..
email=gmatteson@myemail.com
i want to remove this line...
---------------------------------------------------------------------------------
Dim strSelected As String
strSelected = lvwAccounts.ListItems(lvwAccounts.SelectedItem.Index)

Dim objFSO As New FileSystemObject
Dim objFile As File
Dim objTS As TextStream
Dim strReadline As String
Dim strFind As String
Dim strData As String
Dim strEmail As String
Dim blnFound As Boolean

Set objFile = objFSO.GetFile(App.Path & "pop3a.txt")
Set objTS = objFile.OpenAsTextStream(ForReading)
Do Until objTS.AtEndOfStream Or blnFound = True
'reads line in file
strReadline = objTS.ReadLine
strFind = "="
strData = (InStr(1, strReadline, strFind) + 1)
strEmail = Mid(strReadline, strData)
If strEmail = lvwAccounts.SelectedItem.Text Then
frmEdit.txtEmail = strEmail
blnFound = True
End If
Loop
---------------------------------------------------------------------------------
Thanks,
- Gabe

API Circle
Dear All,

I am writing a GDI graphically intensive program, which needs to draw about 6000 circles as quickly as possible. The radius is not much, it varies from about two at the most to just .5 (one pixel on the screen). I am currently achieving this using the intrinsic visual basic 6 functions such as "circle" and "pset", however, I feel that they are too slow for my requirements. Does Anyone here know of the fastest GDI way possible without using DirectX or OpenGL.

Finally, I have heard from several sources that many intrinsic visual basic functions are slow compared to there API counterparts. For example, paintpicture is ten times slower than bitblt. And the standard line command is significantly slower than the API lineto. So I was hoping that this would also be the case regarding the circle command, which is not performing as fast as I would have hoped.

I would appreciate assistance greatly, thank you in advance.

Kind Regards,

Steven Jones.

Cut A Circle?
Hi,
I try to make some garphic stuff for my computer controled faceting machine, for cutting gems.

If I have a Vertical scroll to move down a circle(gem) over a line(diamond lap) and then move the circle upp again, I want to have a facet on the circle. Does anyone have som tips on how to do it?

Private Sub VScroll1_Change()
VScroll1.Max = 80
VScroll1.Min = 20
Picture1.Scale (0, 0)-(100, 100)
Picture1.Cls
YY = VScroll1.Value
Picture1.Circle (50, YY), 20
Picture1.Line (100, 80)-(0, 80)
End Sub

The next step is to rotate the circle an make a new facet..... I guess it's tricky.

Thank you,
Sorry for my bad English.

I Know I Can Use Circle() But...
...I would like to do it manually by Cos() and Sin() just to figure it out. (and to draw for instance triangles and octagons)
I think I used something like this on a previous programming language to draw a circle:
(X and Y are coordinates on screen where center of circle should be, R is the size(radius) of the circle,A is the number of angles, for instance for drawing a octagon)

PSet (X + (Cos(0) * R), Y + (Sin(0) * R))
For i = 0 To 360 Step (360 / A)
Line -(X + (Cos(i) * R), Y + (Sin(i) * R))
Next
End If

This does not become a circle though..more like a scrambled mess..
I'd appreciate any suggestions of what I am doing wrong..

Chnottie

Circle Help
I made a circle using the .circle function, and I need to match it with points on a line.
HELP!!

Not as clear as I meant it to be. How do I find every point on a circle in VB?

Circle
Hi

I am using the follwiing code:

degrees = (marks / maxMarks) * 100
degrees = (degrees / 100) * 360

With Me
Pi = 4 * Atn(1)
radius = .Height / 15
centreX = .ScaleLeft + .Width - radius - 500

centreY = .ScaleTop + radius + 400
angleOne = -2 * Pi
angletwo = -degrees * Pi / 180
.FillColor = vbRed
Circle (centreX, centreY), radius, vbBlack, angletwo, angleOne
.FillColor = &H9BF0B
Circle (centreX, centreY), radius, vbBlack, angleOne, angletwo
End With

This produces a chart showing the percentage of correct and incorrect answers on a test. The 2nd circle starts drawing from 90 degrees in the circle. How can I make it start from 0?

Cheers

Circle?
I have no problem drawing a single cicle on a picturebox but how do you draw several circles on a picturebox

I am using the method stated below...
An invisible circle on a picturebox:
On click on the cmd button,it will appear and the shape of the cicle will depend on the mouse down and mouse move event of the picturebox......

Circle
I am trying to make a hangman game.....When a letter is picked and it is incorrect,
I want a circle to appear(like a head) on the lines I have drawn...does anyone
know how to do this?

X,y Of A Circle
Ok here is my problem I need a algorithum or function to plot the x,y coordinates of a circles circumfence when given the radius of the circle, the x,y of the center of the circle, and the percentage around the cirlce from a given starting point. The equation is way over my head I didn't do to well in math and my highest is algebra. as you can see i didn't do to good in english either.

Copyright 2005-08 www.BigResource.com, All rights reserved