Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 6th, 2006, 01:00 AM
Registered User
 
Join Date: Jan 2005
Location: chennai, tn, India.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default C# 2005 Application.EnableEvents

Hi,

I have a textbox, in my project, I already wrote some functionality which execute during textbox value change in the textbox_valuechange event.

When I try to assign some value to the textbox this textbox_valuechange event is firing.

My problem is I need to prevent this, In VBA I found one Event Application.EnableEvents = false, which usually present events associated with that control and again when we make it as Application.EnableEvents = true, then event firing for control begin to execute like:

VBA Code:
Application.EnableEvents = false
txtText1.value = "Dotnet"
Application.EnableEvents = true

There is any events or method in C#2005, which is equivalent to VBA Application.EnableEvents exists?..

Can anybody help me!.

Regards,
Nelson.


  #2 (permalink)  
Old December 6th, 2006, 02:35 AM
Registered User
 
Join Date: Dec 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to MadJac
Default

you simply need to create your own flag at the top of your class.

bool flag = true;

in some function
change_text("testing");

change_text(string text)
{
flag = false;
textbox.text = text;
flag = true;
}

textbox_changed()
{
if(flag == true)
{
     do this, and if the flag is false ten it won't do anything.
}
}

thats the simplest idea i can come up with, and not 100% sure it'll work. you can try it anyway
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VB 2005 Application vs. Access Database dirtdog22 Visual Basic 2005 Basics 1 April 19th, 2008 08:27 AM
[Resolved] [2005] Call Outlook in vb application snufse .NET Framework 2.0 1 February 12th, 2008 04:58 PM
Migrating 2005 AJAX-Enabled Web Site to 2005 SP1 jrblack10 ASP.NET 2.0 Professional 0 July 25th, 2007 02:16 PM
Tutor needed for VB 2005 application edx VB How-To 9 May 13th, 2007 04:26 PM
Migrate application VS 2003 to VS 2005 rishi123 .NET Framework 1.x 0 December 28th, 2006 07:13 AM



All times are GMT -4. The time now is 07:36 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.