|
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
|
|
|
|
|
Image_Processing wrote: but graphics image cannot be converted in to Botmap
Actually they are easily converted to Bitmaps several ways. A simple one
Bitmap MyBitmap = (Bitmap)MyPictureBox.Image;
Regards
|
|
|
|
|
You can achieve this effect by calling a special version of Graphics.DrawImage() .
Create a Bitmap in the size of your cropping area.
Then get yourself a Graphics object to draw into this bitmap using Graphics.FromImage() .
Using this Graphics object you draw the original image into the new bitmap in a way that the top left corner of the crop area is painted to the top left corner of your new bitmap.
Don't forget to dispose of the Graphics object afterwards or you'll create a resource leak.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Hi All,
I am using DataGridView in my application.I want to highlight the selected row(without setting the backcolor or forecolor) when the user selects the row.Is there a way to do this.
Regards
Vinutha
Vinutha
|
|
|
|
|
row is already get selected by default behaviour of datagrid.
for any special color you can use
myDataGrid1.SelectionBackColor Property
and to access current row you can use
myDataGrid1.CurrentRowIndex
sameer
|
|
|
|