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 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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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...
|
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...
|
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
|
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
|
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.
| |
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...
|
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...
|
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.
|
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...
|
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...
|
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,...
| |
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...
|
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...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |