|
-
May 17th, 2002, 12:51 PM
#1
Thread Starter
Junior Member
VB wordpad for PHP
my task: to design a wordprocessing program for php code in VB. the only part i'm having trouble with is having a function that counts the lines in the text box. any ideas how i could do this?
-
May 20th, 2002, 04:12 PM
#2
Frenzied Member
Count the number of vbCrLf in the text box. Or better yet, split on vbCrLf and get the UBound of the array returned.
-
May 21st, 2002, 10:42 PM
#3
Stuck in the 80s
Originally posted by blindlizard
Count the number of vbCrLf in the text box. Or better yet, split on vbCrLf and get the UBound of the array returned.
1) This isn't a PHP question
2) If there's a wordwrap feature, then counting vbCrLf's wont work
-
May 27th, 2002, 05:39 PM
#4
Fanatic Member
i think it would work with a wordwrap, because if one line goes onto the next, i dont theres a hard newline at the end
it doesnt matter if this isnt a php question, just answer it and tell them to post in the right forum next time
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
-
May 27th, 2002, 09:40 PM
#5
Stuck in the 80s
Originally posted by nabeels786
i think it would work with a wordwrap, because if one line goes onto the next, i dont theres a hard newline at the end
it doesnt matter if this isnt a php question, just answer it and tell them to post in the right forum next time
1) No, it will not work with wordwrap. It will give you the number of actual lines, but not the number of visual lines.
2) If it doesn't matter that it's not a PHP question, then why tell them to post in the right forum?
-
May 27th, 2002, 09:43 PM
#6
Stuck in the 80s
Using API:
VB Code:
Private Declare Function SendMessage Lib "user32" _
Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As _
Long, ByVal wParam As Long, lParam As Any) As Long
Private Const EM_GETLINECOUNT = &HBA
Private Sub Command1_Click()
MsgBox SendMessage(Text1.hwnd, EM_GETLINECOUNT, 0&, 0&)
End Sub
Will retrieve the number of lines in the textbox, not dependant on vbCrLf's.
-
May 28th, 2002, 03:09 PM
#7
Fanatic Member
[i] the number of actual lines, but not the number of visual lines.
2) If it doesn't matter that it's not a PHP question, then why tell them to post in the right forum?
so then next time they will post them in the right forum instead of here..
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
-
May 28th, 2002, 05:30 PM
#8
Stuck in the 80s
But you said it didn't matter, nablees I love you's like a brotha, man. Pe-yece!
-
May 28th, 2002, 07:56 PM
#9
Thread Starter
Junior Member
when i posted this on the vb forum, ppl said "this isn't a vb problem, post elsewhere." so i just posted it in both.
thanx for all suggestions
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
|