|
ExecuteNonQuery gives me the value of 1. Now about the single quotes, I tried taking them out, and it gives me a query error.
Now here is one interesting thing i've noticed. Everytime I run the program, I notice when going back into VS, the connection to the database kinda closes on the server explorer. Anyone know what could possibly be done to prevent that from happening?
The slowest component sits at the keyboard.
|
|
|
|
|
Try using square brackets [] around the table name and everywhere else you have the single quotes except in the Values section.
The value of 1 means it updated something.
|
|
|
|
|
Nope, nothing at all, does the same thing.
The slowest component sits at the keyboard.
|
|
|
|
|
I'm rephrasing this question because its original form was never answered.
I'm trying to define structs and/or controls as properties. Types are declared with the Serializable attribute, and property declarations are marked as Browsable. Both get and set accessors are provided, and runtime code has no problem addressing the properties. The root class descends from Control.
The expected and necessary design time behavior is that Properties view displays these properties under expandable nodes, with the properties/fields of each displayed within the node.
Instead, the property is displayed in gray/disabled text, and there is no expandable node.
What else do we have to do, or what might we have done wrong, which denies us this intended behavior?
TIA,
m
|
|
|
|
|
You need to define or create a ControlDesigner and assign it to the class using the DesignerAttribute .
|
|
|
|
|
Thanks to you.
Since we've tried that, I assume there must be something wrong with our designer, and that we need to revisit the documentation on that.
m
|
|
|
|
|
Documentation certainly doesn't seem to support your suggestion:
The ControlDesigner class provides a base control designer class that can be inherited from and extended to provide design-time support for a Web server control in a design host, such as Visual Studio 2005.
|
|
|
|
|
Moreover, DesignerAttribute cannot be applied to structs. (So says Visual Studio.)
|
|
|
|
|
Thanks to the following CodeProject article, this issue is now solved:
http://www.codeproject.com/csharp/propertyeditor.asp
What we need for the intended expandable property node behavior is a *TypeConverter*.
This article was excellent, in that it got straight to the point and didn't fail to raise any important detail. Everything worked as intended, first try.
Much thanks to Kodanda Pani.
|
|
|
|
|
If anyone is interested (I assume many of us have to deal with this issue), I have discovered that implementing TypeConverter is very sensitive to DefaultAttribute declarations. I'm getting nested nodes without default attributes, but they are dysfunctional. I discovered this in design-time testing, wanting to eliminate the possibility of invoking Reset on the composite property, because the IDE would raise errors whenever we did this. I next thought that since I had declared default attributes on the underlying property classes, that I may as well not declare default attributes on properties of these types... but no... the TypeConverter implementation falls apart then.
|
|
|
|
|
I dropped a PropertyGrid control on a tabpage to use for user settings. I then connected the control to a new class using the propertygrid's SelectedObject property. All of my properties show up fine but I need to know how to capture the event when a property is changed and store it.
Originally I used a settings file but was unable to customize (especially the help descriptions) it to my needs. Hence the new class.
Thanks,
Mark
|
|
|
|
|
The PropertyGrid should automatically update your class after its been bound using SelectedObject.
|
|
|
|
|
I want to paint a particular part of image on the form that is I want to display the picture not its background... I have differentiated between both the background and picture using lock mode and bitmap data. Now how can I display that required portion on the form??? Can any buddy help?????
should I use region if soo then how???????
-- modified at 3:42 Wednesday 21st February, 2007
|
|
|
|
|
The desktop is not intended to support such functionality.
|
|
|
|
|
mike montagne wrote: desktop is not intended
I dont want it on the desktop I want it on the form......
|
|
|
|
|
So reference GDI graphics and/or read articles on this site for your answer. If you have the image, you can assign it to your form's background image. If you need to take a subregion of the source image, clone, copy, or draw that to a new bitmap, and assign that to your background image.
|
|
|
|
|
hi all,
i wanna to ask,
that if i have a line and i want to select it
how can i make it seems to be selected(u know in graphics
shapes have their color changed or selected when clicked)
Generator
|
|
|
|
|
The most simple method is to XOR the color. Off the top of my head I do not know the method to XOR a color. Also you can draw a border around the line. Or you can change the pen to be dashed or some other non-solid pen type.
Pen pen = new Pen(new System.Drawing.Drawing2D.HatchBrush(System.Drawing.Drawing2D.HatchStyle.Cross, Color.Black), 2f);
File Not Found
|
|
|
|
|
Hello,
my question today is, how do I declare a method which accepts the reference pointer on an other method as argument.
here is some pseudo code to demonstrate what I mean.
<br />
void humppa() {...}<br />
<br />
void IwantHumppa(????????){...}<br />
<br />
void Main()<br />
{<br />
IwantHumppa(humppa);<br />
}<br />
The "??????????" is the part I don't know and where hopefully you guys can help me!
Thx!
~HUMPPAAA!
|
|
|
|
|
|
delegate void SampleDelegate(int arg1, int arg2, string abc);
private void SomeOtherMethod(int arg1, int arg2, string abc){}
private void SomeMethod(SampleDelegate sd){
sd(1,2,"test");
}
Then in some method
SampleDelegate sd = new SampleDelegate(SomeOtherMethod);
SomeMethod(sd);
File Not Found
|
|
|
|
|
i want to make an application in wihch the inner part(which is opaque) must show the contents of lower window or applincation etc..... so tht it can make a dynamic copy of lower application...... n display in that inner part...
plz tell me a way out????
how to make it!!!!!!!!!!!!!
sushant kaura
|
|
|
|
|
I've worked with GDI, but haven't done exactly what you ask... so this is just a hypothesis.
What I would try at first is to take a screen shot of the window as in Alt+PrintScreen. You should be able to easily paint the result from the clipboard to a bitmap or the background image of your application window.
|
|
|
|
|
From within a C# application (Visual Studio 2005), I want to programatically iterate the list of GAC Assemblies used by the program, and view the Assembly versions. Can anyone provide me with information, and/or a link, that will help me perform this task?
Thank you...
|
|
|
|
|
Hi,
I am clueless about how to perform a virus scan using my symantec antivirus, i.e. i am developing an email client, I need to scan virus first and then send.
Thank you!
M. Nauman Yousuf
"Mess with the Best, Die like the rest"
|
|
|
|