Jan 29th, 2004, 05:13 PM
#1
Thread Starter
Hyperactive Member
Run html code in vb without controls.
Is anyone know anything about MOSAIC.
Mosaic is a project o an US university. Mosaic is the main source of Internet Explorer(see About box).
Web Control uses it to catch html code.
Do you know how to do it by code?
Just anything, <title> </title> , <div> </div> , <script> </script> etc...............
Please help me.
Jan 29th, 2004, 05:51 PM
#2
well here's a link to MOSAIC's download page, not sure if you can run the stuff in vb , but i'll soon find out
MOSAIC
~
if a post is resolved, please mark it as [Resolved ]
protected string get_Signature(){return Censored;}
[vbcode ][php ] please use code tags when posting any code [/php ][/vbcode ]
Jan 31st, 2004, 07:25 AM
#3
Thread Starter
Hyperactive Member
I know that...
dynamic_sysop , the url you game me, i've visited 3 times before.From there you can download Mosaic 3.0 standalone version, not source code.
I need a example that it will look like mosaic's and Internet Explore's code.
My current project is a custom Browser Control, so I need a code like Mosaic, without using third dll's or some activex.
I you help me i will give you my current project for free as i've done it already to an other user.
Send your reply soon, telling me more about this.
Thank you for answering my thread.
Kostas Botonakis , Greece
(nice twins, yours?) I'm too young for making my family, if are yours you should be very happy about them.
Sorry for my bad english, I'm Greek.
Jan 31st, 2004, 09:41 AM
#4
Hehe, you are very brave to try and make your own Web Browser Control. I have tried (using a picturebox as a base) and have been so close! Formatting text was the hardest part
Something like this?:
VB Code:
Dim TagCount() As String
Dim num_tags As Integer
Dim op As Integer 'holds the <
Dim cl As Integer 'holds the >
'remove new lines..
Function RemoveNewLines(txt As TextBox)
Dim pos As Integer
pos = InStr(pos + 1, txt.Text, vbNewLine, vbBinaryCompare)
While (pos > 0)
txt.selstart = pos - 1
txt.sellength = Len(vbNewLine)
txt.seltext = ""
pos = InStr(pos + 1, txt.Text, vbNewLine)
Wend
End Function
Function ParseHTML(txt As TextBox)
'find the opening <
op = InStr(op + 1, txt.Text, "<", vbBinaryCompare)
While (op > 0)
'we have found it!
cl = InStr(op + 1, txt.Text, ">", vbBinaryCompare)
If (cl > op) Then
'we have a tag!
ReDim TagCount(num_tags)
txt.SelStart = op
txt.SelLength = (cl - 1) - (op)
'store the tag in TagCount()
TagCount(num_tags) = txt.SelText
num_tags = num_tags + 1
End If
'/* redo */
op = InStr(op + 1, txt.Text, "<")
Wend
End Function
Using something like that, I am sure you will be able to figure the rest out.
Hope this helps...
Phreak
End Function
Visual Studio 6, Visual Studio.NET 2005, MASM
Jan 31st, 2004, 10:54 AM
#5
Thread Starter
Hyperactive Member
Run html code in vb without controls
Not so brave, just have the "balls" to create a war to OTHER famous web controls.
Thanks for the code, if you have more send them to me.
When i complete the project i will send it here, just remember to download it for your modifiactions.
Kostas Botonakis
Jan 31st, 2004, 11:14 AM
#6
Thread Starter
Hyperactive Member
Error!!!
Phreak, your code is not totally worked.
Function RemoveNewLines(txt As TextBox) worked great
Function ParseHTML(txt as Textbox) didn't work.
I've seen some ParseHTML source codes before and worked, yours is not working.(not finding and removing tags from text)
I can't find what is the problem but if you can fix it, then do it soon because i need it for making some modifications in the custom browser control functions and features.
Now i am working in browser's history.(back , next , startup page etc).That's registry stuff but some are not so easy as they look.
VERY IMPORTANT:
If you want to take part in my project then send some informations about you and some usefull code for the project.
Also for news:
Did you hear about the new open source WINDOWS?
They look like Microsoft Windows ME, they are free and only 5MB!!!
Download it for free or midify it: http://www.reactos.com/
Send me your replies!
Kostas Botonakis, Greece
Jan 31st, 2004, 11:18 AM
#7
OH!
You are not wanting to format the text yourself? You just want to remove the tags from the source?
Simple simple simple:
VB Code:
Function RemoveTags(txt As TextBox)
'just need to add more tags
Dim pos As Integer
pos = InStr(pos + 1, txt.Text, "<html>", vbTextCompare)
While (pos > 0)
'delete it
txt.SelStart = pos - 1
txt.SelLength = Len("<html>")
txt.SelText = ""
pos = InStr(pos + 1, txt.Text, "<html>")
Wend
End Function
This removes all instances of the <html> tag, no matter if its in upper or lower case.
I would like to participate in such a control, however, I think I deleted what I had of my one
Phreak
Visual Studio 6, Visual Studio.NET 2005, MASM
Jan 31st, 2004, 11:25 AM
#8
Thread Starter
Hyperactive Member
That's OK
That's OK.
Do you know how to make paragraphs if you have a simple text box , not a rich text box?
Or paragraphs with a label!!!
Label is placed in a picture box and is modified like a text box. Is textbox replacement.
I need a code to make paragraphs in simple text boxes and in labels. It is not so simple like other but i know that it is possible.
My email [email protected] so if you want contact me , more private than here.
Kostas Botonakis,Greece
Jan 31st, 2004, 11:28 AM
#9
Do you mean, centering the text and not being able to backspace past a certain point? Or this:
VB Code:
Private Sub TextBox_KeyDown(KeyCode As Integer, Shift As Integer)
TextBox.SelText = vbTab
End Sub
Phreak
Visual Studio 6, Visual Studio.NET 2005, MASM
Jan 31st, 2004, 11:32 AM
#10
Thread Starter
Hyperactive Member
Not like that
MMM, not like that...
Centering text , not one line, but two , three , four...that depends on <div> tag.
And sth important! Not centering all the text in text box, but just the text inside the tag <div>.......</div>
That's why it is difficult.
Kostas Botonakis, Greece
Jan 31st, 2004, 11:40 AM
#11
Guess what I found
My attempt at something like this. It isn't very well done. I never used to indent my code either. But take a look:
Phreak
Attached Files
Visual Studio 6, Visual Studio.NET 2005, MASM
Jan 31st, 2004, 11:50 AM
#12
Thread Starter
Hyperactive Member
No no no
That's not i thought about.
Browser control needs a code to do the following....
If you have an html page with some lines of code,
the browser control should do:
1) find the title (done)
2) split the <html> code from the <body> code (done)
3) Load colors, for text and background (done)
4) Find the paragraphs and text formatting (NOT DONE YET)
5) Load background images (Done)
6) Load other images , like gifs , jpg , bmp , png (NOT DONE YET)
7) Load scripts , VBScripts, JScripts (NOT DONE YET)
8) Password protections feature (Done)
9) Right Click menu and custom right click menu. (Done)
If you know something from the them above then send something soon.
I would prefer source code, not projects, or urls.
Kostas Botonakis, Greece
Jan 31st, 2004, 11:58 AM
#13
For the scripts, you can use the Microsoft Script Control. These will execute the script onto any object you add:
[Highlight=VB]
ScriptControl1.AddObject Picture1, "document"
[Highlight=VB]
Then you could have a script:
Code:
<script>
document.BackColor = RGB(255,255,0)
</script>
As for the rest of them, they might take me a while to do (properly).
You have MSN?
if so, PM me your msn, and we can go into more detail, instead of cluttering up the forums.
Phreak
Visual Studio 6, Visual Studio.NET 2005, MASM
Jan 31st, 2004, 12:06 PM
#14
Thread Starter
Hyperactive Member
Ok
The code is ok but ias i said i don't want to use third controls, like Microsoft's script control,only the basic controls(textbox,command button etc)
Look, i don't have msn , but i will today.
I have already NET Passport so its fast.
Send me your msn name at my email adress:
[email protected]
Kostas Botonakis, Greece
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