So, I am trying to have a user scroll to the bottom of my rich text box and once they hit the bottom, I want the checkbox to become visible. I have searched online and tried a few solutions and they haven't worked yet. Any assistance would be helpful. Thank you
using System;
using System.Windows.Forms;
using System.IO;
using System.Text;
using System.Runtime.InteropServices;
using System.Drawing;
using Microsoft.Office.Core;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Linq;
using EUSAA;
using System.Threading.Tasks;
namespace EUSAA
{
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
txtDateTime.Text = DateTime.Now.ToString();
txtUsername.Text =
System.Security.Principal.WindowsIdentity.GetCurrent().Name;
btnClose.Visible = false;
chkAgree.Visible = false;
rtbSecurityAwareness.LoadFile("Security Awareness.rtf");
}
private void chkAgree_CheckedChanged(object sender, EventArgs e)
{
if (chkAgree.Checked)
{
btnClose.Visible = true;
}
else btnClose.Visible = false;
}
private void btnClose_Click(object sender, EventArgs e)
{
using (StreamWriter sw = File.AppendText(@"I:\Security Awareness
Signed Users\Signed Users.txt"))
{
sw.WriteLine(System.Security.Principal.WindowsIdentity.GetCurrent().Name +
"\t" + DateTime.Now.ToString());
}
Environment.Exit(0);
}
}
}