HTML Editor
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
2 posts
Page 1 of 1
Hello All!
Well, i create this app for designing my website.
the function of this app is Load,Save,Preview it is not very helpful but it is good for me.
i will add new function next time.
let's start
Design :
1. We need:
[*] 3 Button
[*] 1 RichTextBox
2. Options
[*] Form size: 724; 539
[*] Button1(Save) , size = 75; 30 , location = 0; 2
[*] Button2(Load From File) , size = 108; 30 , location = 74; 2
[*] Button3(Preview) , size = 75; 30 , location = 181; 2
[*] RichTextBox1 , size = 708; 468 , location = 0; 33 , name = TextHT
Code :
1.Button1 Code :
Well, i create this app for designing my website.
the function of this app is Load,Save,Preview it is not very helpful but it is good for me.
i will add new function next time.
let's start
Design :
1. We need:
[*] 3 Button
[*] 1 RichTextBox
2. Options
[*] Form size: 724; 539
[*] Button1(Save) , size = 75; 30 , location = 0; 2
[*] Button2(Load From File) , size = 108; 30 , location = 74; 2
[*] Button3(Preview) , size = 75; 30 , location = 181; 2
[*] RichTextBox1 , size = 708; 468 , location = 0; 33 , name = TextHT
Code :
1.Button1 Code :
Code: Select all
2.Button2 Code :
Dim svHT As New SaveFileDialog
svHT.Filter = "HTML Files(*.html)|*.html"
svHT.FileName = ""
If (svHT.ShowDialog = Windows.Forms.DialogResult.OK) Then
MessageBox.Show("File Saved!", "Message", MessageBoxButtons.OK)
End If
Code: Select all
3.Button3 Code :
Dim ldHT As New OpenFileDialog
ldHT.Filter = "All Files|*.*|HTML Files(*.html)|*.html"
ldHT.FileName = ""
If (ldHT.ShowDialog = Windows.Forms.DialogResult.OK) Then
Dim srHT As String = My.Computer.FileSystem.ReadAllText(ldHT.FileName)
TextHT.Text = srHT
End If
Code: Select all
All Code :
With TextHT
Dim s As String = TextHT.Text
My.Computer.FileSystem.WriteAllText(Application.StartupPath & "\cache.html", s, False)
End With
System.Diagnostics.Process.Start(Application.StartupPath & "\cache.html")
Code: Select all
if you don't understand, you can download the attachment :
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim svHT As New SaveFileDialog
svHT.Filter = "HTML Files(*.html)|*.html"
svHT.FileName = ""
If (svHT.ShowDialog = Windows.Forms.DialogResult.OK) Then
MessageBox.Show("File Saved!", "Message", MessageBoxButtons.OK)
End If
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim ldHT As New OpenFileDialog
ldHT.Filter = "All Files|*.*|HTML Files(*.html)|*.html"
ldHT.FileName = ""
If (ldHT.ShowDialog = Windows.Forms.DialogResult.OK) Then
Dim srHT As String = My.Computer.FileSystem.ReadAllText(ldHT.FileName)
TextHT.Text = srHT
End If
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
With TextHT
Dim s As String = TextHT.Text
My.Computer.FileSystem.WriteAllText(Application.StartupPath & "\cache.html", s, False)
End With
System.Diagnostics.Process.Start(Application.StartupPath & "\cache.html")
End Sub
End Class
You do not have the required permissions to view the files attached to this post.
nice tutorial , well explained go to viewforum.php?f=16 and make a introduction
+rep
Edit : Oh I see your the owner of http://www.corliansa.com/ cooll;
+rep
Edit : Oh I see your the owner of http://www.corliansa.com/ cooll;
Find my programs on Softpedia
2 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023