|
Use MessageBoxButtons.YesNoCancel
If you only use YesNo , then clicking the X-Button is not a valid option, that's why it is disabled. Adding the "Cancel" property is the correct way to do it.
But for a confirmation to close the app I'd use OkCancel , because "No" and "Cancel" have virtually the same meaning in this case, yet the MessageBox has two different buttons. Kinda confusing.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi all, I'm creating a touchscreen form, so what I need to know is if there is anyway that I can change the look of the buttons, from square to round buttons, and just round the edges of the buttons.
I have images that I want to put on top of the buttons so I need to be able to change the form of the buton.
Any help will be appreciated.
Thanx in advance
He who laughs last is a bit on the slow side
|
|
|
|
|
I think there are some artciles here on CP covering this topic.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi,
There are several ways to create a button but not to be a button .
I used to play with PictureBoxes in which I used to load images that look like buttons. If you set the backcolor to Transparent and place inside the PictureBox an PNG file with transparent background you obtain a kind of button. If you want your "button" to be "alive" try changing the image in MouseEnter and MouseLeave event with images that look almost like the original one.
Static buttons i used to create on my background image of the form and place above them a label and at the Click event on the label do the work. It's not very pleasant but it works.
Do your best to be the best
|
|
|
|
|
|
Anyone tried this?
http://www.itu.dk/research/c5/[^]
If so, how does it compare to PowerCollections? It seems more powerful and I get the impression that it has a steeper learning curve.
Kevin
|
|
|
|
|
Kevin McFarlane wrote: If so, how does it compare to PowerCollections?
Personally, I have never had much use for it, and it seemed unnecesarily bloated. Thanks for the link
|
|
|
|
|
Hi All
I have a blank windows form running on .net 1.1. At runtime, I load controls dynamically from an XML file which is all fine. I now need to register events for the controls dynamically define somewhere in the XML file. Is this possible? As my requirement is to generate the controls and define its events in XML file, I don't want to use factory model.
I have tried using addhandlers and eventhandlers but no success yet.
Thanks
Mustafa
www.hostukdomain.com
|
|
|
|
|
I really hate to say this, but what you are trying to do was already done for you by Marc Clifton : http://myxaml.com/[^]
This has it all, eventhandlers, components, etc. all in XML. Great tool and very mature
WM.
What about weapons of mass-construction?
|
|
|
|
|
thanks Williem...
I look forward taking a dive into it..
Mustafa
http://www.hostukdomain.com
|
|
|
|
|
HI
Guys let me know one thing how to capture the data eneterd by the user through key baord in C# , e.g. if the user presses the A key of key board so i can access the A in my code for use.plz replt ASAP,
thankx in advance
|
|
|
|
|
You write a event handler for the Key_Press (or Key_Down) event for the control you wan't to capture.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
thankx for ur response , but man i am making a window service it would be running at the back end as window process,there would be no user control in front of the user where the user enters the data and i can get the data in key press event of my application , so that would not be the case here,plz reply ASAP ,
|
|
|
|
|
Hi all,
I've been working on a Graph class for our web stats system and i'm having a few problems.
After getting some help of a few guys/gals (not sure) from here, I solved many problems and then hit another one.
I have currently got a class that generates an image of a graph which has X and Y Axis labels all correctly placed.
Now my problem is, how can I display my values in a staticly sized image?
My working space is 150hx650w. My X and Y Labels are all placed in the right place, and I need to calculate how tall I need to make my bars to reflect their value.
So my values are now : 0,0,4,0,90,172,0 (graph shows stats for the last 7 days)
At first I thought 150*value/100 would give me a percentage of the height, which I could simply draw
but when I tried it against the 172, my return value was 258.
Has anyone got any idea's on how to solve this. Maths was my strong subject at school, but i've forgotten most of it.
Thanks everyone.
Gav
|
|
|
|
|
bar = bar_max * value / value_max
For example:
bar = 150 * 172 / 172 = 150
bar = 150 * 90 / 172 = 78
|
|
|
|
|
THANK YOU!
I knew it would be simple, but I didn't think it was THAT simple.
|
|
|
|
|
Hi all,
I just want to know what i'm doing wrong when trying to access a website thru cmd. I send the command from my application to cmd prompt. "http://bulksms.2way.co.za/5567/eapi/submission/send_sms/2/2.0?username=itgoeshere&password=blahblah&message=hi+ma&msisdn=0820820820"
I want this link to run thru cmd. please help
If you know how to just run a url without sending it to command prompt (if that is easier) that would be great help
thank you in advance
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
Okay, if figured out how to run a url directly from C# but i opens up my default web-browser. I want to run the url without the having the user see the url. i'm using the "Process.Start(URL)" to run the url.
Is there a way to not open any windows (like the web-browser) and still run the url?
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
Take a look at the HttpWebRequest class.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Thank you, I came across an article that gave the following code
HttpWebRequest Request;
StreamReader ResponseReader;
Request = ((HttpWebRequest)(WebRequest.Create(URL)));
ResponseReader = new StreamReader(Request.GetResponse().GetResponseStream());
when i run the code it says: "the underlining connection was closed. The remote name could not be resolved"
What does that mean?
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
Hi,
I want to add checkbox in datagrid.I know we can use
DataGridColumnStyle boolCol = new DataGridBoolColumn();
but problem is this one taking only bool value. but my column value is string.
i have to make checkbox check or uncheck depending upon the status.
status is one of the field in my table and it's containg I or A.
any solution for this.plz help me.
thanks
|
|
|
|
|
I think it's saver to change the select Query and translate the I or A values into true or false. You might want to checkup on the CASE OF syntax for SQL 2000/2005.
WM.
What about weapons of mass-construction?
|
|
|
|
|
I have a dataGridView and just three rows.
I wrote dataGrid_RowEnter and dataGrid_RowLeave event. Basically i am changing the color to red of the row in the Row_Enter event and in the RowLeave and changing the color back to no color. I have also button in the same form. I have not written any thing on the button. but even if i click the button RowLeave event is firing and changing back my color. Is there a way around it. Is this the
normal behavior.
Thanks
kal
|
|
|
|
|
If your button is not within the row then yes it is normal behavior, you have left the row to click on the button hence the RowLeave event being fired.
only two letters away from being an asset
|
|
|
|
|
int[] W=new int[10];
int[][] wind=new int[2][];
Color c1 = h.GetPixel(1,1);
W[0]=c1.ToArgb();
wind[0][0]=W[0];
this code give me run time error at wind[0][0]=W[0]; I do not know why,is there any error,can some one guide me,
|
|
|
|