I want my program instead of selecting the whole sentence for a return, that a part of sentence is also possible if a copied that.
here's my code:
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
//check if current operation is a clipboard
if (m.Msg == WM_DRAWCLIPBOARD)
{
//then we use a try catch block so if
//anything wrong happens in Clipboard.GetText() our program wont crash
try
{
//with foreach we go through all our questions
foreach (string question in questionList)
{
//and we check if clapboarded text is matches with our question
if (Clipboard.GetText() == "When a computer is being assembled, which action can be taken to help eliminate cable clutter within a computer case?")
{
notifyIcon1.Icon = SystemIcons.Exclamation;
notifyIcon1.BalloonTipTitle = "When a computer is being assembled, which action can be taken to help eliminate cable clutter within a computer case?";
notifyIcon1.BalloonTipText = "Install a modular power supply.*";
notifyIcon2.BalloonTipIcon = ToolTipIcon.Error;
notifyIcon1.ShowBalloonTip(100);
return;
}
this is the question: "When a computer is being assembled, which action can be taken to help eliminate cable clutter within a computer case?"
i want for example if you copied this: When a computer is being assembled, which
You get the same match and the same notification
Thanks in advance