|
there are two buttons in my layout.one is "start" the other is "stop".
when i click the "start" button it will excute the programe.it will expend long time to excute. so the user will click the "stop" button to stop the current operation.
there is two problem to solve:
1, when click the "start" button the "stop" button must can be operated.
2, stop the current porcess's excute.
i have wriited the code as this:
//i want to make the layout's other control can be operated,but failire
System.Windows.Forms.Application.DoEvents();
//abort the current main thread
System.Threading.Thread.CurrentThread.Abort();
thank you!
|
|
|
|
|
|
|
I have C#.net form bound to microsoft access database.
form has two textboxes. database has one table with two fields.
I want user to be able to open form and enter data into textboxes - click a button and have it entered in database.
Is this possible- I know there is an insert command - but not sure how to implement.
can you give me info or point me to any examples
thank you
|
|
|
|
|
An example here[^].
There are only 10 types of people in this world — those who understand binary, and those who don't. |
|
|
|
|
|
|
Don't do data access directly in your form; split it out to a separate class.
|
|
|
|
|
ShowInTaskBar is only a property of WinForm. So, how do I get a console app to not appear in the taskbar?
Thanks!
Marc
|
|
|
|
|
Changing the project output type to Windows Application will remove the console window. This would only be of use if you don't need access to any of the standard handles, i.e. you're not using the Console class.
Alan.
|
|
|
|
|
Are you suggesting that a Windows Application can't access the Console class?
|
|
|
|
|
I was envisaging a program that required no user interaction, e.g. a simple utility that could be run as a scheduled task. In this situation the form-less windows application is perfect as it is completely invisible to the user and won't steal focus from the foreground task. If there is no console window then most of the Console class is rendered useless. The Read and Write methods fail gracefully, presumably because they are wired to null streams, but other methods that attempt to access the 'window' or keyboard, e.g. Console.Title, Console.ReadKey throw an IOException.
Console.CapsLock is still good!
Alan.
|
|
|
|
|
And Beep; don't forget Beep.
|
|
|
|
|
I don't know, so this is not an answer..
But, you can get the hWnd of the console window (or so I've heard..) by setting the title to something randomish (to avoid accidental duplicates) and then doing FindWindow on that. I'm not sure where to go from there, but there is probably a WinAPI call / message / SetStyle hack for it, right?
|
|
|
|
|
I'm reviewing for an interview, and the following question is on my list:
"What event occurs before a control is rendered to the user?"
I'm uncertain if the answer that's sought is PreInit or Postback. Please advise. Thanks.
Draykko
=======================
Every experience in life is a lesson to be learned
A. Stevens
B.S., Computer Science
|
|
|
|
|
The user purchases a computer and powers it up.
|
|
|
|
|
OnPaint
Harvey Saayman - South Africa
Software Developer
.Net, C#, SQL
you.suck = (you.Occupation == jobTitles.Programmer && you.Passion != Programming)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
I would like to build a Imperial to Metric converter program like the many I have seen on the web. I would like to use this project as a way to better understand C# object orentation, building classes etc. In particular the "front-end" engineering and design aspects.
I have read many books on C# programming but I'm still not feeling like I am concepually putting my programs together efficiently.
Can some one point me into a good source of information on this subject.
tia
rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
I am studying a TreeView implementation.
The TreeView uses classes which encapsulate certain controls such as textbox, checkbox etc.
Each item class inherits from Component (not Control).
Generally speaking, why would you inherit from Component like this?
|
|
|
|
|
Hi,
I would inherit from Component, not from Control, to get objects that can be inserted and configured with Visual Studio Designer, without them being Controls, i.e. actual GUI parts. Some examples are:
System.IO.Ports.SerialPort
System.Windows.Forms.Timer
System.Timers.Timer
see MSDN[^]
For GUI parts I would derive specialized Controls from their typical original (e.g. a special TextBox from TextBox) and composite Controls from UserControl.
|
|
|
|
|
When I'm a bad developer. Fortunately, as a good developer, I don't derive from either those; I implement appropriate interfaces instead.
There are many places within .net where inheritance was used when interface implementation would be more appropriate.
|
|
|
|
|
Hi I am struggeling with a print problem since a while.
I want to print the content of a Panel thats sits in a form. The panel has a dynamic number of labels in it.
I have tried with both crystal reports and the Visual Studio PrintForm powerpack but it is not what I am looking for.
Has someone got a best practice or any hints for me. Completing my first c# course at Uni so I am quite new at it.
Thanks in advance
|
|
|
|
|
Here[^] is one way of doing this.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
Hi.
can u tell me how can install Crystal Report When i am installing my project to another computer(With Install Shield)?like .Net FramWork.
When i install my project to user's computer this message is shown.
Could not Load or find assembly 'CrystalDecisions.Windows.Forms,Version=10.5.3700,Culture=neutral....'
But i did add this refrence to my project.
Thank u.
CanI
|
|
|
|
|
Is that file present at the same location in the user computer as you have set in your code?
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
I can't find that file in my computer too!!!
I have installed Crystall Report in user's system but it isn't working yet.
(I added that Assembly in my C# program And Built it.(Release it) and in my install Shield project i added all files from Release Folder).
Did i do any mistake?or should i do anything more?
Thank u.
CanI
|
|
|
|