What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » VB/Web Help

VB/Web Help
Author: Message:
Stigmata
Veteran Member
*****



Posts: 3520
Reputation: 45
21 / Other / Flag
Joined: Jul 2003
RE: VB/Web Help
just improving on cookies code :)
code:
Private Declare Function ShellExecute Lib "SHELL32" 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

Private Sub Command1_Click()
    Dim URLString As String
    URLString = "http://www.google.com/search?q=" & Encode(Text1.Text)
    ShellExecute 0&, vbNullString, URLString, vbNullString, vbNullString, vbNormalNoFocus
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        Command1_Click
    End If
End Sub

Public Function Encode(ByVal s As String) As String
    Dim sChar As String, sAsc As String, sHex As String, sName As String
    Dim I As Integer

    For I = 1 To Len(s)
        sChar = Mid$(s, I, 1)
        sAsc = Asc(sChar)
        If sAsc = 32 Then
            sHex = "+"
        Else
            sHex = sChar
        End If

        sName = sName & sHex
    Next I

    Encode = sName
End Function




i quickly made a encode function that checks for a space(ascii 32) and then replaces it with a +.

Works perfectly :)

(in vb... )

This post was edited on 10-04-2005 at 04:19 PM by Stigmata.
10-04-2005 04:14 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
VB/Web Help - by DragonX on 10-04-2005 at 07:11 AM
RE: VB/Web Help - by rav0 on 10-04-2005 at 09:44 AM
RE: VB/Web Help - by brian on 10-04-2005 at 10:22 AM
RE: VB/Web Help - by CookieRevised on 10-04-2005 at 03:52 PM
RE: VB/Web Help - by Stigmata on 10-04-2005 at 04:14 PM
RE: VB/Web Help - by CookieRevised on 10-04-2005 at 04:26 PM
RE: VB/Web Help - by Mike on 10-04-2005 at 04:29 PM
RE: RE: VB/Web Help - by CookieRevised on 10-04-2005 at 04:49 PM
RE: VB/Web Help - by DragonX on 10-04-2005 at 07:48 PM
RE: VB/Web Help - by DragonX on 10-04-2005 at 07:52 PM
RE: VB/Web Help - by Ezra on 10-05-2005 at 02:28 PM
RE: RE: VB/Web Help - by CookieRevised on 10-05-2005 at 03:33 PM
RE: VB/Web Help - by YottabyteWizard on 10-05-2005 at 04:15 PM
RE: VB/Web Help - by segosa on 10-05-2005 at 07:19 PM
RE: RE: VB/Web Help - by CookieRevised on 10-05-2005 at 09:48 PM
RE: VB/Web Help - by Ezra on 10-05-2005 at 07:23 PM
RE: VB/Web Help - by YottabyteWizard on 10-05-2005 at 08:08 PM
RE: VB/Web Help - by DragonX on 10-05-2005 at 09:00 PM
RE: VB/Web Help - by YottabyteWizard on 10-06-2005 at 04:44 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On