|
I need to call a function just before ComboBox.SelectedIndexChanged event is fired.
The idea is to take screen-shot of Windows Form (having a ComboBox) showing last-selected ComboBox item when the user selects another item in the ComboBox.
Please let me know if of an event which is called before SelectedIndexChanged (i.e before selected value changes).
May be an event like BeforeSelectionIndexChanged.
|
|
|
|
|
Madandu wrote: May be an event like BeforeSelectionIndexChanged.
If there is the general convention is to using the -ing ending.
BlahChanging - fired before an action is taken
BlahChanged - fired after an action is taken.
|
|
|
|
|
Colin Angus Mackay wrote: BlahChanging - fired before an action is taken
But there is no SelectedIndexChanging so i suggest you create a control that inherits from ComboBox and override OnClick to raise a SelectedIndexChanging.
Or, keep an image of the combobox to use it when next SelectedIndexChanged.
Eslam Afifi
|
|
|
|
|
Hi friend i want to show message box just like in msn when new user Login or email received. For my application so that at any new change my software tell the user about change at the message box just like MSN
wasim khan
|
|
|
|
|
|
|
|
Hi Everybody,
I'm strucking with this task from last 2 weeks,
is project setup (the user has no .net frame work ,sql server etc..,we have to put ".exe" files along with our project Setup file ,How can I do this,I'm sending my steup fail details ".txt file" also) , and we are using C# 2008 Express Edition,i tried this in TragetSystem,i got total 58 errors ,but i'm sending some error Error Messages.
Could u Please Help me.
Error Details:
1:The install location for prerequisites has not been set to 'component vendor's web site' and the file 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe' in item 'Windows Installer 3.1' can not be located on disk
2:The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX35\dotNetFX20\aspnet.msp' in item '.NET Framework 3.5' can not be located on disk. See Help for more information.
3:The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX35\dotNetFX20\aspnet_64.msp' in item '.NET Framework 3.5' can not be located on disk. See Help for more information
4:The install location for prerequisites has not been set to 'component vendor's web site' and the file 'SqlExpress\sqlexpr32.exe' in item 'SQL Server 2005 Express Edition SP2 (x86)' can not be located on disk. See Help for more information.
etc..................,
|
|
|
|
|
Good Afternoon my Friend
Firstly when you Create a Setup File in VS, you cannot Automatically install .NET Framework, and that means your users will not be able to install your msi file , because it need the framework installed First. Now one thing that you can do, is in your Installation Disk , just include the Framework, because you cannot install the Framework simultanously with your Application. from oour Errors , i see it complains about (prerequisites) and means the .NET Framework is not installed.
Hope it Helps
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
hi all,,, How i insert ListBox items to Array in c#..?
CheeN
|
|
|
|
|
sacr83,
Does this help?
object[] listBoxObjects = new object[listBox.Items.Count];
listBox.Items.CopyTo(listBoxObjects, 0);
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
I have to say - this is easily found using google, or even MSDN. Try working it out yourself instead of relying on other people to do your coding for you.
string[] listItems = new string[this.listbox.items.count];
for (int i = 0; i < this.listbox.Items.count; i++)
{
listItems[i] = this.listbox.Items[i];
}
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Mr John Simmons..
Thank you very much for your help.really it works.really thank you.
CheeN
|
|
|
|
|
Vote my response.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hello everyone,
Mentioned here,
http://msdn.microsoft.com/en-us/library/system.decimal(VS.80).aspx
What means "The scaling factor also preserves any trailing zeroes in a Decimal number"? Could anyone show me a sample please?
thanks in advance,
George
|
|
|
|
|
It means simply that it will not chop off any trailing zeros from your number i.e. 12.450 does not become 12.45
Hope that helps
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Thanks Bob,
Your sample pretty well demonstrates what means "preserves any trailing zeroes", but I am confused about what means "scaling factor also preserves" here?
BTW: I have the background of how Decimal and float are stored internally, but I do not know how could we utilize scale (I think it is the exponent) to preserve zero?
regards,
George
|
|
|
|
|
As I said originally, it preserves the number of decimal places. A quick look at MSDN for decimal says "The scaling factor specifies the number of digits to the right of the decimal point; it ranges from 0 through 28"
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Thanks Bob,
From the link,
http://msdn.microsoft.com/en-us/library/system.decimal(VS.80).aspx[^]
I can not find "The scaling factor specifies the number of digits to the right of the decimal point; it ranges from 0 through 28", could you post the link where you find the statement you quoted please?
I want to read more.
regards,
George
|
|
|
|
|
Hi,
Is the .Net winform development is competitive tool for windows system programing???? [Unsure] really? What is position of .Net winform developer in developers market? Is C# being preferred over c/c++ by any developer any point of time for system programming , embedded system programming?
|
|
|
|
|
|
|
Any Microsoft programming skills you have are marketable, so pick the one you like.
Second, .Net is more than just WinForms. If you limit yourself to that, you may as well get a job flipping burgers instead.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hello
I m developing a window application. I m doing diferent tasks against different events using multi-threading. Against 1 thread , I m enabling the timer, and against its function I m performing 1 task, but it is not working i.e it is not executing the timer function. if I put all the code against some button rather than within thread , then it works well.
plz tell me how could I use the Timer within the thread.
here is my Code.
private void Start_Click(object sender, EventArgs e)
{
pthrd = new Thread(new ThreadStart(Thrd1));
pthrd .Start();
}
void Thrd1()
{
MessageBox.Show("Thread Start");
timer1.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
MessageBox.Show("Start Grabbing");
Calculate();
}
Shanzay
|
|
|
|
|
DeepOceans,
I am not sure if this is correct, but i think its because the thread does the work and then exits, thus the timer will be told to start but then instantly quick, thus it never ticks.
Since i am not sure if my thinking is correct, i dont have a solution other than to keep the thread alive.
Whats the reason you want to run a Timer in the background anyways?
Regards,
Gareth.
(FKA gareth111)
|
|
|
|