-
Notifications
You must be signed in to change notification settings - Fork 1
/
Learn.frm
153 lines (114 loc) · 3.43 KB
/
Learn.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
VERSION 5.00
Begin VB.Form Learn
BorderStyle = 1 'Fixed Single
Caption = "About <some tag>"
ClientHeight = 5040
ClientLeft = 45
ClientTop = 360
ClientWidth = 6630
Icon = "Learn.frx":0000
LinkTopic = "Form3"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 5040
ScaleWidth = 6630
Begin VB.CommandButton Command2
Caption = "&Exit"
Default = -1 'True
Height = 495
Left = 4200
TabIndex = 4
Top = 4320
Width = 1935
End
Begin VB.CommandButton Command1
Caption = "&Learn more on w3c Schools"
Height = 495
Left = 1320
TabIndex = 3
Top = 4320
Width = 2895
End
Begin VB.TextBox itext
Height = 2535
Left = 1320
TabIndex = 1
Text = "Info about this tag"
Top = 1560
Width = 4815
End
Begin VB.Label Label2
Caption = "Information:"
Height = 255
Left = 360
TabIndex = 2
Top = 1560
Width = 1215
End
Begin VB.Label labeltag
AutoSize = -1 'True
Caption = "<some tag>"
BeginProperty Font
Name = "Verdana"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
Left = 360
TabIndex = 0
Top = 720
Width = 1965
End
End
Attribute VB_Name = "Learn"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim adoconn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim str As String
Private Sub Command1_Click()
Dim ret As Long, theWebSite As String
'theWebSite = "http://w3c.org/"
theWebSite = "http://www.google.com/search?sitesearch=www.w3schools.com&as_q=" & labeltag.Caption & "&x=0&y=0"
ret = ShellExecute(Me.hwnd, "open", theWebSite, vbNullString, vbNullString, 3)
If ret < 32 Then MsgBox "There was an error when trying to open a default browser", vbCritical, "Error"
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Me.Caption = "Learn about " & learnq
labeltag.Caption = CStr(learnq)
'On Error GoTo z
'gstrConnectionString = ("provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\tags_help.mdb")
Set adoconn = Nothing
adoconn.Open gstrConnectionString
Set rs = Nothing
'str = "select * from puzzles where tag=" & Key
str = CStr("select * from puzzles where tag LIKE '" & learnq & "%'") ' "select * from cafe where Date=" & CStr(Date)
rs.Open str, adoconn, adOpenForwardOnly, adLockOptimistic
'Dim intX As Integer
'For intX = 1 To 100
'List1.AddItem "Item" & intX
'Next
rs.MoveFirst
If rs(2) = "" Then
Else
itext.Text = rs(2)
End If
While Not rs.EOF
rs.MoveNext
Wend
GoTo zz
z:
MsgBox "Info about this tag not found"
Unload Me
zz:
End Sub