Computing.Net > Forums > Programming > VB 6.0 & html question

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

VB 6.0 & html question

Reply to Message Icon

Name: wheelspinner99
Date: September 23, 2004 at 11:21:14 Pacific
OS: n/a
CPU/Ram: n/a
Comment:

I was wondering if there was a way to include a hyperlink on my app that users could click to send them to my website, i've seen many people do it, i can't figure it out.
Also, I want to be able to generate a html file when certain code is executed. My question is: Is it possible to specify the exact size i want to use? I don't just want to use the size attrib 1-7. I'de rather use 12-48 like in word (for example) Thanks!



Sponsored Link
Ads by Google

Response Number 1
Name: Chi Happens
Date: September 27, 2004 at 07:25:39 Pacific
Reply:

Yes you can do the link thing.

you need to use ShellExecute (it is an API)

Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Const SW_SHOW = 5

private sub ExecuteWebpage()

dim handle as long

ShellExecute handle, "OPEN", "http://www.computing.net/programming", "", "", SW_SHOW

end sub

Private Sub Label1_Click()

call ExecuteWebpage

End Sub


its that easy.


now onto the second part of your question:
the exact size of the font?

well yes. in HTML there is something called StyleSheets. they are easy to use they look like this:

<html>

<head>

<title></title>
<style>
TD.NORMAL {background-color:#FFFFFF;font-family:arial,san-serif;font-size:8pt;color:#000000}
TD.REVERSE {background-color:#000000;font-family:arial,san-serif;font-size:8pt;color:#FFFFFF}
</style>
<body>
<table>
<tr>
<td class="NORMAL">Normal Style</td>
<td class="REVERSE">Reverse Style</td>
</tr>
</table>


Hope this helps,
Chi


0

Response Number 2
Name: wheelspinner99
Date: September 27, 2004 at 23:45:14 Pacific
Reply:

That did help. My only reply is that i want to be able to specify the font size from my VB app that will render an HTML page.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: VB 6.0 & html question

I need help about vb 6.0 www.computing.net/answers/programming/i-need-help-about-vb-60/5404.html

Declaring Variables in VB 6.0 www.computing.net/answers/programming/declaring-variables-in-vb-60/9957.html

connecting to unix using vb 6.0 www.computing.net/answers/programming/connecting-to-unix-using-vb-60/7085.html