-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form1.vb
220 lines (158 loc) · 7.39 KB
/
Form1.vb
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
Imports System.IO
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Timer1.Start()
WebBrowser1.ScriptErrorsSuppressed = True
Me.WebBrowser1.DocumentText = out_txt_1.Text
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs)
' Me.WebBrowser1.DocumentText = TextBox1.Text
End Sub
Private Sub Label2_Click(sender As Object, e As EventArgs) Handles Label2.Click
out_txt_1.Focus()
SendKeys.Send("<html>
<body>
</body>
</html>")
End Sub
Private Sub Label5_Click(sender As Object, e As EventArgs) Handles Label5.Click
Dim prompt As String = String.Empty
Dim title As String = String.Empty
Dim defaultResponse As String = String.Empty
Dim başlık As Object
prompt = "Başlık Nedir?"
title = "Başlık Belirleyiniz"
out_txt_1.Focus()
başlık = InputBox(prompt, title, defaultResponse)
out_txt_1.Focus()
SendKeys.Send("<title>" + başlık + "</title>")
End Sub
Private Sub Label4_Click(sender As Object, e As EventArgs) Handles Label4.Click
Dim conv As New ColorConverter
If (ColorDialog1.ShowDialog() = DialogResult.OK) Then
Dim hex_color As String = String.Format("#{0:X2}{1:X2}{2:X2}", ColorDialog1.Color.R, ColorDialog1.Color.G, ColorDialog1.Color.B)
out_txt_1.Focus()
SendKeys.Send("<body bgcolor=" + hex_color + ">")
Else
End If
End Sub
Private Sub Button1_Click_1(sender As Object, e As EventArgs) Handles Button1.Click
Me.WebBrowser1.DocumentText = out_txt_1.Text
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
End Sub
Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
If Panel1.Width = 213 Then
Panel1.Width = 47
ElseIf Panel1.Width = 47 Then
Panel1.Width = 213
End If
End Sub
Private Sub Label8_Click(sender As Object, e As EventArgs) Handles Label8.Click
Dim Df_1 As String = String.Empty
Dim in_1 As Object = String.Empty
in_1 = InputBox("Paragraf yazısı belirleyiniz ?", "Paragraf Ekle", Df_1)
out_txt_1.Focus()
SendKeys.Send("<p>" + in_1)
End Sub
Private Sub Label7_Click(sender As Object, e As EventArgs)
''<h1>Bu bir başlık</h1>
Dim Df_2 As String = String.Empty
Dim in_2 As Object = String.Empty
Dim ds1_ As String = String.Empty
Dim kacıncı As Object = String.Empty
in_2 = InputBox(" Eklenecek başlık nedir ?", "Başlık Ekle", Df_2)
out_txt_1.Focus()
ds1_ = InputBox("Sayfaya eklediğiniz yazının boyutu ne olsun ?
Başlıklar <h1> ve <h6> dahil olmak üzere aradaki tüm rakamlar kullanılarak tanımlanabilir.
<h1> en büyük puntoyu belirtirken, <h6> ise en küçük puntoyu belirtir.")
SendKeys.Send("<h" + ds1_ + ">" + in_2 + "</h" + ds1_ + ">")
End Sub
Private Sub Label9_Click(sender As Object, e As EventArgs) Handles Label9.Click
''<!-- Bu bir açıklama -->
out_txt_1.Focus()
SendKeys.Send("<!--" + InputBox("Açıklamayı nedir ?") + "-->")
End Sub
Private Sub Label10_Click(sender As Object, e As EventArgs) Handles Label10.Click
out_txt_1.Focus()
SendKeys.Send("<hr>")
End Sub
Private Sub Label11_Click(sender As Object, e As EventArgs) Handles Label11.Click
out_txt_1.Focus()
SendKeys.Send("<b>" + InputBox("Yazılacak olan koyu metin nedir ?"))
End Sub
Private Sub Label7_Click_1(sender As Object, e As EventArgs) Handles Label7.Click
''<h1>Bu bir başlık</h1>
Dim Df_2 As String = String.Empty
Dim in_2 As Object = String.Empty
Dim ds1_ As String = String.Empty
Dim kacıncı As Object = String.Empty
in_2 = InputBox(" Eklenecek başlık nedir ?", "Başlık Ekle", Df_2)
out_txt_1.Focus()
ds1_ = InputBox("Sayfaya eklediğiniz yazının boyutu ne olsun ?
Başlıklar <h1> ve <h6> dahil olmak üzere aradaki tüm rakamlar kullanılarak tanımlanabilir.
<h1> en büyük puntoyu belirtirken, <h6> ise en küçük puntoyu belirtir.")
SendKeys.Send("<h" + ds1_ + ">" + in_2 + "</h" + ds1_ + ">")
End Sub
Private Sub Label3_Click(sender As Object, e As EventArgs) Handles Label3.Click
out_txt_1.Focus()
SendKeys.Send("<center>" +
" </center>")
End Sub
Private Sub Label12_Click(sender As Object, e As EventArgs) Handles Label12.Click
out_txt_1.Focus()
SendKeys.Send("<em>" + InputBox("Yazılacak olan vurgulanmış metin nedir ?"))
End Sub
Private Sub Label13_Click(sender As Object, e As EventArgs) Handles Label13.Click
out_txt_1.Focus()
SendKeys.Send("<i>" + InputBox("Yazılacak olan italik metin nedir ?"))
End Sub
Private Sub Label14_Click(sender As Object, e As EventArgs) Handles Label14.Click
out_txt_1.Focus()
SendKeys.Send("<del>" + InputBox("Yazılacak olan Üstüçizili metin nedir ?"))
End Sub
Private Sub Label15_Click(sender As Object, e As EventArgs) Handles Label15.Click
out_txt_1.Focus()
SendKeys.Send("<ins>" + InputBox("Yazılacak olan Altıçizili metin nedir ?"))
End Sub
Private Sub Label17_Click(sender As Object, e As EventArgs) Handles Label17.Click
out_txt_1.Focus()
SendKeys.Send("<a " + "href = " + InputBox("İnternet sitesi nedir ?") + ">" + InputBox("Görüntülenecek Metin nedir ?") + "</a>")
End Sub
Private Sub Label16_Click(sender As Object, e As EventArgs) Handles Label16.Click
out_txt_1.Focus()
SendKeys.Send("<img src=" + InputBox("Resim link nedir ?") + ">")
End Sub
Private Sub Label18_Click(sender As Object, e As EventArgs) Handles Label18.Click
'' <embed src = "https://www.youtube.com/embed/m7gggsKG9bc" width=400px height=300px allowfullscreen=true autostart=0 ></embed>
Dim a, b, c, d, f As String
a = "400px"
b = "300px"
c = "true"
d = "0"
out_txt_1.Focus()
SendKeys.Send("<embed src= " + "https://www.youtube.com/embed/" + InputBox("Video URL ismi Nedir ?
Örnek : https://www.youtube.com/watch?v=lnejdmI6P5M bu video da lnejdmI6P5M bu kısmı yazıyoruz.") + " width=400px height=300px allowfullscreen=true autostart=0 ></embed>")
End Sub
Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles PictureBox2.Click
Try
Dim SaveFileDialog1 As New SaveFileDialog
SaveFileDialog1.Filter = "Metin Dosyaları (*.txt)|*.txt|Tüm Dosyalar (*.*)|*.*"
Dim klasor As String
Dim file As String
file = "index.html"
Dim fs As FileStream = New FileStream(file, FileMode.Append)
Dim w As StreamWriter = New StreamWriter(fs)
w.WriteLine(out_txt_1.Text)
w.Close()
fs.Close()
MsgBox("Programın bulunduğu dizine kaydedildi.", MsgBoxStyle.Information)
Catch ex As Exception
End Try
End Sub
Private Sub PictureBox3_Click(sender As Object, e As EventArgs) Handles PictureBox3.Click
out_txt_1.Clear()
End Sub
Private Sub Panel1_Paint(sender As Object, e As PaintEventArgs) Handles Panel1.Paint
End Sub
End Class