D
dabezine
Guest
Hello guys, I hope you are all doing great. My project is about a program that generates Bibliography citations for students, in which they enter the information of a book, article, ... Then the program collects the info in textBoxes to be shown in RixhBox, the problem is when trying to generate a new citation, the first citation get removed! and replaced by the new one.
This is the code I used:
Private Sub ButtonClicks_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AevionButton1.Click, AevionButton2.Click, AevionButton3.Click
RichTextBox1.Rtf = Clipboard.GetData(DataFormats.Rtf)
Select Case True
Case sender Is AevionButton1
If AevionRadioButton7.Checked Then
RichTextBox1.Rtf = "{\rtf1\ansi\deff0 {\fonttbl{\f0 Times New Roman;}} " &
"- " &
TextBox1.Text & ", " &
TextBox2.Text & ". " &
"\i " & TextBox5.Text & ". " & "\i0 " &
TextBox9.Text & ", " &
TextBox10.Text & ". " + Chr(13) + Chr(10)
End If
If AevionRadioButton5.Checked Then
RichTextBox1.AppendText(Environment.NewLine)
RichTextBox1.Rtf = "{\rtf1\ansi\deff0 {\fonttbl{\f0 Times New Roman;}} " &
"- " &
TextBox2.Text & ", " &
TextBox1.Text & ",and " &
TextBox3.Text & " " & TextBox4.Text & ". " &
"\i " & TextBox5.Text & ". " & "\i0 " &
TextBox9.Text & ", " &
TextBox10.Text & ". " + Chr(13) + Chr(10)
End If
If AevionRadioButton6.Checked Then
RichTextBox1.AppendText(Environment.NewLine)
RichTextBox1.Rtf = "{\rtf1\ansi\deff0 {\fonttbl{\f0 Times New Roman;}} " &
"- " &
TextBox2.Text & ", " &
TextBox1.Text & ", " & "et al. " &
"\i " & TextBox5.Text & ". " & "\i0 " &
TextBox9.Text & ", " &
TextBox10.Text & ". " + Chr(13) + Chr(10)
End If
If AevionRadioButton2.Checked Then
RichTextBox1.AppendText(Environment.NewLine)
RichTextBox1.Rtf = "{\rtf1\ansi\deff0 {\fonttbl{\f0 Times New Roman;}} " &
"- " & TextBox2.Text & ", " &
TextBox1.Text.Substring(0, 1) & ". " &
"(" & TextBox10.Text & ") " &
TextBox5.Text & ". " &
TextBox7.Text & ". " & ": " & TextBox9.Text & "." + Chr(13) + Chr(10)
'Last, F. M. (Year Published) Book. City, State: Publisher.
End If
Case sender Is AevionButton2
If AevionRadioButton8.Checked Then
RichTextBox1.AppendText(Environment.NewLine)
RichTextBox1.Rtf = "{\rtf1\ansi\deff0 {\fonttbl{\f0 Times New Roman;}} " &
"- " &
TextBox2.Text & ", " & TextBox1.Text & ". " &
ControlChars.Quote & TextBox5.Text & "." & ControlChars.Quote &
"\i " & TextBox6.Text & ". " & "\i0 " & ", " & "vol. " & TextBox11.Text & "," & "no. " &
TextBox12.Text & ", " & TextBox13.Text & ", " & "pp. " & TextBox16.Text & "." + Chr(13) + Chr(10)
End If
If AevionRadioButton2.Checked Then
TextBox10.Enabled = True
AevionLabel9.ForeColor = Color.Gold
RichTextBox1.AppendText(Environment.NewLine)
RichTextBox1.Rtf = "{\rtf1\ansi\deff0 {\fonttbl{\f0 Times New Roman;}} " &
"- " & TextBox2.Text & ", " &
TextBox1.Text.Substring(0, 1) & ". " &
"(" & TextBox10.Text & ") " &
TextBox5.Text & ". " &
TextBox6.Text & ", " & "Volume " &
TextBox11.Text & "pp. " & TextBox16.Text & "." + Chr(13) + Chr(10)
'Last, F. M. (Year Published). Article title. Journal Name, Volume(Issue), pp. Pages.
End If
Case sender Is AevionButton3
If AevionRadioButton9.Checked Then
RichTextBox1.AppendText(Environment.NewLine)
RichTextBox1.Rtf = "{\rtf1\ansi\deff0 {\fonttbl{\f0 Times New Roman;}} " &
"- " &
TextBox2.Text & ", " & TextBox1.Text & "." & ControlChars.Quote & TextBox5.Text & "." & ControlChars.Quote & " " &
"\i " & TextBox8.Text & ". " & "\i0 " & ", " & TextBox14.Text & ", " & TextBox15.Text & "." + Chr(13) + Chr(10)
'Last Name, First Name. "Document Title if Available." Title of the Overall Website, Date, URL.
End If
If AevionRadioButton2.Checked Then
RichTextBox1.AppendText(Environment.NewLine)
RichTextBox1.Rtf = "{\rtf1\ansi\deff0 {\fonttbl{\f0 Times New Roman;}} " &
"- " & TextBox2.Text & ", " &
TextBox1.Text.Substring(0, 1) & ". " &
"(" & TextBox10.Text & ") " &
"\i" & TextBox5.Text & ". " & "\i0 " &
". " & "Retrieved from " & TextBox15.Text + Chr(13) + Chr(10)
End If
If AevionRadioButton9.Checked And AevionRadioButton2.Checked Then
TextBox14.Enabled = False
TextBox8.Enabled = False
AevionLabel16.ForeColor = Color.White
AevionLabel17.ForeColor = Color.White
End If
End Select
End Sub
Thank you very much guys, I hope you help mebecause many of students need this program.
Continue reading...
This is the code I used:
Private Sub ButtonClicks_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AevionButton1.Click, AevionButton2.Click, AevionButton3.Click
RichTextBox1.Rtf = Clipboard.GetData(DataFormats.Rtf)
Select Case True
Case sender Is AevionButton1
If AevionRadioButton7.Checked Then
RichTextBox1.Rtf = "{\rtf1\ansi\deff0 {\fonttbl{\f0 Times New Roman;}} " &
"- " &
TextBox1.Text & ", " &
TextBox2.Text & ". " &
"\i " & TextBox5.Text & ". " & "\i0 " &
TextBox9.Text & ", " &
TextBox10.Text & ". " + Chr(13) + Chr(10)
End If
If AevionRadioButton5.Checked Then
RichTextBox1.AppendText(Environment.NewLine)
RichTextBox1.Rtf = "{\rtf1\ansi\deff0 {\fonttbl{\f0 Times New Roman;}} " &
"- " &
TextBox2.Text & ", " &
TextBox1.Text & ",and " &
TextBox3.Text & " " & TextBox4.Text & ". " &
"\i " & TextBox5.Text & ". " & "\i0 " &
TextBox9.Text & ", " &
TextBox10.Text & ". " + Chr(13) + Chr(10)
End If
If AevionRadioButton6.Checked Then
RichTextBox1.AppendText(Environment.NewLine)
RichTextBox1.Rtf = "{\rtf1\ansi\deff0 {\fonttbl{\f0 Times New Roman;}} " &
"- " &
TextBox2.Text & ", " &
TextBox1.Text & ", " & "et al. " &
"\i " & TextBox5.Text & ". " & "\i0 " &
TextBox9.Text & ", " &
TextBox10.Text & ". " + Chr(13) + Chr(10)
End If
If AevionRadioButton2.Checked Then
RichTextBox1.AppendText(Environment.NewLine)
RichTextBox1.Rtf = "{\rtf1\ansi\deff0 {\fonttbl{\f0 Times New Roman;}} " &
"- " & TextBox2.Text & ", " &
TextBox1.Text.Substring(0, 1) & ". " &
"(" & TextBox10.Text & ") " &
TextBox5.Text & ". " &
TextBox7.Text & ". " & ": " & TextBox9.Text & "." + Chr(13) + Chr(10)
'Last, F. M. (Year Published) Book. City, State: Publisher.
End If
Case sender Is AevionButton2
If AevionRadioButton8.Checked Then
RichTextBox1.AppendText(Environment.NewLine)
RichTextBox1.Rtf = "{\rtf1\ansi\deff0 {\fonttbl{\f0 Times New Roman;}} " &
"- " &
TextBox2.Text & ", " & TextBox1.Text & ". " &
ControlChars.Quote & TextBox5.Text & "." & ControlChars.Quote &
"\i " & TextBox6.Text & ". " & "\i0 " & ", " & "vol. " & TextBox11.Text & "," & "no. " &
TextBox12.Text & ", " & TextBox13.Text & ", " & "pp. " & TextBox16.Text & "." + Chr(13) + Chr(10)
End If
If AevionRadioButton2.Checked Then
TextBox10.Enabled = True
AevionLabel9.ForeColor = Color.Gold
RichTextBox1.AppendText(Environment.NewLine)
RichTextBox1.Rtf = "{\rtf1\ansi\deff0 {\fonttbl{\f0 Times New Roman;}} " &
"- " & TextBox2.Text & ", " &
TextBox1.Text.Substring(0, 1) & ". " &
"(" & TextBox10.Text & ") " &
TextBox5.Text & ". " &
TextBox6.Text & ", " & "Volume " &
TextBox11.Text & "pp. " & TextBox16.Text & "." + Chr(13) + Chr(10)
'Last, F. M. (Year Published). Article title. Journal Name, Volume(Issue), pp. Pages.
End If
Case sender Is AevionButton3
If AevionRadioButton9.Checked Then
RichTextBox1.AppendText(Environment.NewLine)
RichTextBox1.Rtf = "{\rtf1\ansi\deff0 {\fonttbl{\f0 Times New Roman;}} " &
"- " &
TextBox2.Text & ", " & TextBox1.Text & "." & ControlChars.Quote & TextBox5.Text & "." & ControlChars.Quote & " " &
"\i " & TextBox8.Text & ". " & "\i0 " & ", " & TextBox14.Text & ", " & TextBox15.Text & "." + Chr(13) + Chr(10)
'Last Name, First Name. "Document Title if Available." Title of the Overall Website, Date, URL.
End If
If AevionRadioButton2.Checked Then
RichTextBox1.AppendText(Environment.NewLine)
RichTextBox1.Rtf = "{\rtf1\ansi\deff0 {\fonttbl{\f0 Times New Roman;}} " &
"- " & TextBox2.Text & ", " &
TextBox1.Text.Substring(0, 1) & ". " &
"(" & TextBox10.Text & ") " &
"\i" & TextBox5.Text & ". " & "\i0 " &
". " & "Retrieved from " & TextBox15.Text + Chr(13) + Chr(10)
End If
If AevionRadioButton9.Checked And AevionRadioButton2.Checked Then
TextBox14.Enabled = False
TextBox8.Enabled = False
AevionLabel16.ForeColor = Color.White
AevionLabel17.ForeColor = Color.White
End If
End Select
End Sub
Thank you very much guys, I hope you help mebecause many of students need this program.
Continue reading...