473,398 Members | 2,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Incredible minimizing form!

122 100+
Ok I have a unique situation I haven't encountered before.

From my main form when a keypress event is triggered (enter key) it calls another form that allows the user to enter a quantity and then assigns that quantity to a variable in my main form.

Works great only if i trigger the even more than once the second time i press enter and the second form is closed my main form is minimized to my task bar.... really annoying. Anyone know how i can resolve this, i tride refreshing the main form upon retrun to the calling proceadure but it still happens frequently.

Thanks in advance.
Feb 16 '08 #1
4 853
r035198x
13,262 8TB
Ok I have a unique situation I haven't encountered before.

From my main form when a keypress event is triggered (enter key) it calls another form that allows the user to enter a quantity and then assigns that quantity to a variable in my main form.

Works great only if i trigger the even more than once the second time i press enter and the second form is closed my main form is minimized to my task bar.... really annoying. Anyone know how i can resolve this, i tride refreshing the main form upon retrun to the calling proceadure but it still happens frequently.

Thanks in advance.
Perhaps if you post the code that you used ...
Feb 16 '08 #2
DragonLord
122 100+
Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3. private void textBoxInvoiceNumber_KeyPress(object sender, KeyPressEventArgs e)
  4.         {
  5.             if (checkBoxMultiScan.Checked == false)
  6.             {
  7.                 if (e.KeyChar == (char)Keys.Enter)
  8.                 {
  9.                     //Find out how many items are to be entered
  10.                     int intScanQuantity;
  11.                     intScanQuantity = GetQuantity();
  12.                     ScanItems(intScanQuantity,textBoxInvoiceNumber.Text,textBoxAddress1.Text);
  13.                     this.Refresh();
  14.                 }
  15.             }
  16.         }
  17.  
  18.  
  19.   private int GetQuantity()
  20.         {
  21.             FormResults fr = new FormResults();
  22.             fr.ShowDialog();
  23.             return Convert.ToInt32(fr.getQuantity);
  24.         }
  25.  
  26.  
Feb 19 '08 #3
DragonLord
122 100+
Any thoughts ?One thing i should mention is i am debugging maybe that makes a difference?
Feb 25 '08 #4
r035198x
13,262 8TB
Any thoughts ?One thing i should mention is i am debugging maybe that makes a difference?
Shouldn't you be destroying that fr object once you get the input you need? Why not use a simple input dialog instead?
Feb 26 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: NL | last post by:
Hi, Does anybody know how to turn off the animation Windows does with a window as it's minimized/maximized to the taskbar? I have an app which, when minimized, syncs to any other open...
13
by: Nathan | last post by:
Hello again, I have an application with three forms. Frm1 has a button whose click event calls frm2 -- frm2.ShowDialog(). Frm2 has a button that calls frm3 -- frm3.ShowDialog(). When I...
4
by: Tony Clark | last post by:
Hi, How can i tell when a form is minimizing or closing by use of the button in the top right of the form? thanks in advance
7
by: Lee | last post by:
Hi, How do I detect when a form is minimizing? specifically when a user clicks the show desktop button on the taskbar, rather than the minimize button on a form. thanks in advance
1
by: Zectron | last post by:
I have made my custom application from which i can access all other installed application using Shell function. I need to send this application to system tray upon minimizing. How to do it?? Please...
5
by: Scott | last post by:
Hi everyone, I have a c# console app that when run through an autorun.inf file, launches a web page from the CD. It works just fine but I would like the console window minimized on startup....
0
by: zyxwvu | last post by:
Dear All, I am developing project. on minimizing the from it should go to the system tray and not show on the task bar.. could u please help me in this way. Thanks and Regards Ravikrishnakumar
2
by: kimiraikkonen | last post by:
Hi, Maybe simple, but i couldn't find the correct class for minimizing current form when a "button" is clicked. Thanks.
3
by: qazplm114477 | last post by:
Hi, I'm having a tiny problem. I have just started playing around with visual basic a week ago so im fairly new at this. I created a method that saves changes when you click a button, once the button...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.