keags1

Transfering a textbox value to an EventHandler Process

Discussion created by keags1 on Dec 9, 2011
Latest reply on Dec 13, 2011 by keags1
Good day,

I am a complete newbie to VB.NET and have been plugging around with a few ideas for a tool.

I am using Visual Studio express 2008 to load a form, perform a task at a given interval.
My problem is:

1) I am able to populate a textbox with the desired text (a pathname);
2) I can get the timer event to work perfectly;
3) The problem arises when the timer conditions are met and I need to perform a task based on the value of the text box.
4) The value from the textbox becomes lost and when i hold my mouse cursor over the textbox:


I get an error:
"An exception 'Microsoft.VisualStudio.Debugger.Runtime.CrossThre adMessagingException' occurred"
and it is tracked to:
StackTrace = " at Microsoft.VisualStudio.Debugger.Runtime.Main.Throw CrossThreadMessageException(String formatString) at System.Windows.Forms.SafeNativeMethods.GetWindowTe xtLength(HandleRef hWnd) at System.Windows.Forms.Control.get_WindowText() at System.Windo...

The script doesnt stop it just keeps running but doesnt do anything.
Being VERY unfamiliar with this type of work
I am stumped.

Any help / advice will be greatly appreciated!
On a side note, the script runs perfectly when i hard code in the pathname, but this doesnt suit the work i would like this script to do.

Thank you!

Outcomes