|
I see three problems with the code:
1. You clear the list outside the monitoring.
2. You enter and leave the monitoring for each item you add, leaving the list in different state every the time.
3. You never leave the monitoring when you read from the list.
---
b { font-weight: normal; }
|
|
|
|
|
I have made a windows service and deployed it using installutil utility. Now i want to remove it as i have to make some changes in the original service. How can i remove the service.
I have another problem. Whenever we pass an insert statement against database table the exception can be cathced by using sqlexception parameter. I have done with exception where there is a problem with the primary key because i know the error code it genereates when there is a primary key error. But how can i do the same type of checking when there is an error related to foreign key. Wht is the error code for foreign key related errors.
Any suggestion is well received. thanx in advance
|
|
|
|
|
To uninstall windows service use installutil/u from your visual studio command prompt like installutil/u <your assembly="" name="">
and for the next one i hope you should ask in sql forum.
Luck is Opportunity with hardwork
|
|
|
|
|
How to get the values of some properties in the class
Like I have a Class ... Class1 in which some properties are defined say FName, LName..
What I want is that I want to apply this thing to many classes of which I don't know the properties that it contains as in....
in class1 it may be FName or LName
but what is in class 2 I don't know
I want to have some common code that will apply for all the classes I want.
the problem with this one is that here I have to call the values of all the properties individually
How can I do this?
Please reply.
Thanks in Advance
Parag Gupta
|
|
|
|
|
Hello
I don't think I fully understand your question, but if you want to browse through all properties of a certain type -not instance- and get their names then call Type.GetProperties() method. If you have a certain object of that type, and you want to check the value of that property, then get the PropertyInfo and call PropertyInfo.GetValue() method supplying it with the object you want to check for that value.
I hope this was helpful.
Regards
|
|
|
|
|
Salaam to All
i m Ahsan and doing MCS , I have to connect a Prolog KB to my C# application, can any1 help me....
will be very thankful for ur concern...
Regards
Ahsan
|
|
|
|
|
Hi...
I want to access/use parent forms variables from child forms. Those varibles in parent form i have declared as 'public' also but i am not able to access parent forms varibles from child form...i doing something like this to access paremt form variables...
this.ParentForm
but no result...can anybody suggest me anything...
Also can anybody suggest me any document on MDI Parent-Child application.
Thanks,
Vinay
|
|
|
|
|
Hello,
Is your parent form a Standard System.Windows.Forms.Form?
If not, and you would like to get access to a user property, you would have to cast it to your userform.
UserForm userform = this.ParentForm as UserForm;
if(userform!=null)
{
userform.??? //Do youre stuff!
}
Hope that helps you!
All the best,
Martin
|
|
|
|
|
make that variable static and use it my the class name ..so no need to create any object
sameer
|
|
|
|
|
ya...its a standard windows form...
Actally my application is something like this...
I hv created the MDI application in which parent form contians some ToolStrip buttons. I will call the child forms through menus. On some button click events of the child form items i have to get some parent form variables & i have to do some operations...(e.g get string from parent & write in a richtextbox)
Can u tell me how i can do that...?
Regards,
Vinay
|
|
|
|
|
Hello,
Are you getting an Exception during runtime, or is youre code not compilable?
|
|
|
|
|
i hope my previous solution should work. here anothr for you
pass your parent form object in the child form and store it like;
object parmObj = parentObject;
and now access parent form public methods/variable by type casting it by ur parent form class name. ie.
((ParentForm)parmObj).Variable;<br />
((ParentForm)parmObj).Method();
sameer
|
|
|
|
|
I am working on a messenger application in c#.there is a browse part where admin can open any page through browser and i want that when admin can use the scrollbar at their end then that should be reflect to att the other client.Since this application is basically for classroom feature or for presentation.But i dont know how to use this facility
Aman Nigam
|
|
|
|
|
That is not practically possible. That would require that all the computers use the same resolution, has the same windows theme, use the same browser, open the browswer window with the exact same size, have the exact same settings for browser toolbars, have the same setting for browser text size, et.c.
I would rather go for displaying an image of the teachers browser instead.
---
b { font-weight: normal; }
|
|
|
|
|
The best way to do this would be to embedd IE in your app and then control it from there. As someone else said, you cannot guarentee that everyone sees exactly the same thing, but you can host a web browser and interact with it.
And it would use a lot less bandwidth than sending images of the central PCs browser.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
how to generate random number
|
|
|
|
|
Use the Random class. Example:
Random rnd = new Random();<br />
<br />
int digit = rnd.Next(10);
---
b { font-weight: normal; }
|
|
|
|
|
Hi
How can i access Ms-Access, and Oracle Database remotely? i mean what will be the querystring for both of these.
regards
sAqIb
|
|
|
|
|
|
I'm trying my popup system by using the win32 call:
[DllImport("user32", SetLastError = true, CharSet = CharSet.Auto)]
public static extern int AnimateWindow(int hWnd, int dwTime, int dwFlags);
instead of myPopup.Show().
However when I use AnimateWindow al the child control disappear!
Some reappear when I click on the winodws.
Even more puzzling, I been checking the child control with the debugger:
they are there, visible, with the correct bounds (and parent!!)
Hey, what's happening!
Any ideas?
|
|
|
|
|
Solved with a call to myPopup.CreateControl()
|
|
|
|
|
Hi I am working in Image Processing Project ,I want to crop an image from specific points as (left right top bottom)point are availble,is there any funtion availble in C# that can segment or crop an image from given points.
Plz Help me and Reply me soon
May Almighty ALLAH bless us (Always)
|
|
|
|
|
Graphics gs =this.CreateGraphics();
now use gs.SetClip() function ..hopeit'll solve your problem
sameer
|
|
|
|
|
Problem is this that i have put this croped image in pictureBox and have to obtain croped image pixels infombut graphics image cannot be converted in to Botmap ,Actually i want to make cropped image as Bitmap
plz Help me
|
|
|
|
|
can you write a littler Piece of code that you are doing.
sameer
|
|
|
|