473,795 Members | 2,830 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Forms AcceptButton property

I have a form with it's AcceptButton property set to a button on my forms
click event, when I hit enter in runtime on the form, the cursor goes to an
hourglass for a second, as if it were doing something but does not hit the
breakpoint I have set, when I press the button the event procedure code
executes correctly and the break point is hit, what could be the problem...?

TIA

Dan
Nov 21 '05 #1
1 1856
OK I figured this out, I was passing a reference of myself to another form I
was opening, this form modifed the text property on several of the controls
on the page leaving them having focus. I called the focus method of my save
button after using the self reference and this seemed to fix the problem...

Thanks

"Alien2_51" wrote:
I have a form with it's AcceptButton property set to a button on my forms
click event, when I hit enter in runtime on the form, the cursor goes to an
hourglass for a second, as if it were doing something but does not hit the
breakpoint I have set, when I press the button the event procedure code
executes correctly and the break point is hit, what could be the problem...?

TIA

Dan

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2037
by: bj7lewis | last post by:
I have two modal dlg forms that are invoked(seperately) by a main form but the two modal dlg forms don't close when clicking the OK & Cancel buttons setup as below... Here the setup... //In MainForm.cs... //I Don't want the main form to close with enter and esc keys... MainForm.AcceptButton = None; //Not in code... MainForm.CancelButton = None; //Not in code...
0
1005
by: Jeff Haumesser | last post by:
I have a form with the AcceptButton property set to a command button. I also have a RichTextBox on the same form. With the AcceptButton property set, I cannot enter a carriage return in the RichTextBox. It instead activates the command button that is specified in the AcceptButton property. Does anyone else have this problem and if so, how can I have both and AcceptButton property set and able to enter a Carriage Return in the RTB...
2
6023
by: lostdreamz | last post by:
Ok, my situation is like this. I have a form with a few text boxes each with a 'validating' event, OK & Cancel buttons, and have the AcceptButton/CancelButton/DialogResult properties all set. Situation 1: (works fine) If the user enters invalid text in a text box, presses Enter in the text box, the validation displays a msgbox. They now correct the text, press Enter in the text box, it validates correctly this time and the
2
7198
by: Wardeaux | last post by:
All, I have login form used with ShowDialog(). I have the AcceptButton property set so that the "Enter" key is mapped. I also need to keep the dialog open when the UserID and PWD are invalid so user can reenter them. How to I prevent the form from closing? MTIA wardeaux
4
1342
by: Chris Strug | last post by:
Hi there, Possibly something of a simple question but I was wondering is anyone could provide a few pointers or links. Given that I have two forms, a main (frmMain) and a child (frmChild). From frmMain, I create an instance of frmChild and show() it. The child form contains a property called "getString" which I want to return the contents of a textbox from the child form.
0
1081
by: Karsten Sosna | last post by:
Hello NG, i have a problem with the AcceptButton in VB.Net and C#. I have an empty project with one form. On this form i take two buttons(Button1 and Button2). Now i set the the AcceptButton-Property to Button2, compile the application with the IDE. After the compilation the property is already set to Button2. Now i add a new UserControl to the project and drop it on the Form(AcceptButton = Button2). When i compile the project the property...
2
1658
by: sonicm | last post by:
Hi, I have a search for where we want the user to enter the search criteria in at the top and press enter, then the results are shown in a datagrid which we set the focus to. Once they select the item they want to choose then they press enter to accept the form. The problem is when you go into the form butSearch is set to AcceptButton for the form, once you have selected the search criteria to populate the data grid then we want to...
1
4781
by: Tony Johansson | last post by:
Hello! I'm reading a book which mentioned about this AcceptButton property for a form which seems quite easy so I try to figure out how it works but I have run into some small problems. I have this small easy program below which show two buttons called button1 and button2. In this program when the Enter key is clicked event handler for button1 is called.
3
1629
by: Josh Kodroff | last post by:
I have a pretty standard Windows Form with 2 relevant buttons: btnOK and btnCancel. I set both buttons' DialogResult properties appropriately. I then set the form AcceptButton and CancelButton properties appropriately. However, whenever I click the Play button, the 2 properties get reset back to their defaults (nothing). Does anyone have any idea why this might be happening? I'm particularly annoyed because I got this right on...
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10165
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10002
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9044
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6783
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5565
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.