Hello, I have a question. I want to make a small designer for my application. For that I use the DesignSurface class. this all works very fine, but now I have one small problem too. The standard view (surface.View) has as background another control and the real control which I design is not on (0,0) . For some reason I need the position of (0,0) for the control to design. Knows anyone a solution for this? Regards Hansjörg
hpetriffer
Posts
-
DesignSurface -
Form on clientHello, is it possible to display a Form on a client? I have a client which makes an remote call on the server and in some cases the server want to display an dialog. Regards Hansjörg
-
check if a class is inherited from another classthanks this works
-
check if a class is inherited from another classis not possible because I don't have always the default constructor.... regards Hansjörg
-
check if a class is inherited from another classIs there a possibility (net 2.0) to check if a class is inherited from another class? I have no instances of the 2 classes only types. e.g. class A:class B { } class B:class C{ } class a inherits from class B? -> yes.... Regards Hansjörg Edit/Delete Message
-
dbf database files import net2.0Hello, I have to import dbf database files to my c# application. what is the best way to do that? I use vs2005 express and I have also the sqlexpress Regards Hansjörg
-
access properties dynamicallyHello, I want to access a property dynamically. e.g. [code] class A{ private int i; public int I{ get{return i;} } } [/code] now I have a instance of this class and I want to access in the way: instance.Get("I"); and this should return my i... I know that Reflection is the way to do that, but how? Regards Hansjörg
-
Duplicate ToolStripMenuItemHello, I wan't to duplicate a toolstripmenuitem. The problem is that I don't have found a solution to duplicate an event. All other properties which I need I can access. I want to duplicate the event, because in that part of the code I don't know which eventhander is registerd. Is there any way to do that? Regards Hansjörg
-
ContextMenuStripIs it possible to open a contextmenu inside of the program?
-
use Control to DataGridViewCellIs it possible to draw a Control as DataGridViewCell. I wan't to use for that an existing control... Regards Hansjörg
-
Force Paint event to a "null" deviceHello, I need an object which is inherited from a control.to simulate some things. The problem is that the object makes the last initializations during the OnPaint event. But in my case I don't want to display the object on the screen, because I need it only as helper object. Is there an way to do that? Regards Hansjörg Edit/Delete Message
-
Release resources in FormsThank you it was a very good hint!
-
Release resources in FormsHello, In my application (net2.0) I have a few threads. I want to stop the threads when the main form is closed. Now I'm not sure what I have to do. Normally I would implement a IDisposable interface. In the form exists this function already and it is not virtual. What is the best way to implement this? Which event I should use? Regards
-
Dispose in FormsHello, In my application (net2.0) I have a few threads. I want to stop the threads when the main form is closed. Now I'm not sure what I have to do. Normally I would implement a IDisposable interface. In the form exists this function already and it is not virtual. What is the best way to implement this? Which event I should use? Regards
-
Event before object is removed from datagridviewHello, If I use the tab to go through the datagridview it is added automatically a new item. Here I use the ListChanged Event and ItemAdded to Update another internal list. To hold the list up to date I have to remove also the items when a row is removed. When I have made no changes to the Item and I press in the last cell another time the tab key the last row is removed, and after that another time added. But now I have the problem that I can't find any event which happens before the row is removed to hold my list uptodate... Has anyone an idea? Regards Hansjörg
-
DataGridViewColumn with possibility to select a few ItemsHello, I search a DataGridViewColumn which has the possibility to select a few Items (with Checkbox). It should be also possible to bind data to that control. Knows anyone a control for Net2.0 Regards Hansjörg
-
Serializing object problemI have tested this also. it doesn't work. At the moment I have made an workarround in serializing the array as Register0, Register1 ... It is not a good solution, but it works. I hope to remove this workaround in the next days, weeks... Regards Hansjörg
-
please help me...I hope that nobody write this program for you!
-
Serializing object problemHello I have a strange problem. I have implemented the ISerializable interface for 2 classes. the GetObjectData implementation of the first class is:
public void GetObjectData(SerializationInfo info, StreamingContext context) { List lstRegister = new List(); info.AddValue("Text", this.Text); foreach (Control c in this.Controls) { Register reg = c as Register; if (reg != null) { lstRegister.Add(reg); } } Register[] registers = lstRegister.ToArray(); info.AddValue("Registers", registers); }
the serialization constructor is the following:protected VisualTabPage(SerializationInfo info, StreamingContext ctxt) : this() { this.Text = info.GetString("Text"); Register[] registers = (Register[])info.GetValue("Registers", typeof(Register[])); this.Controls.AddRange(registers); }
for the Register class I have implemented also this interface and it was working well: I have tested it with the following helper class:[Serializable] internal class SerializeTab { private string name; public List visObjects = new List(); public string Name { get { return name; } set { name = value; } } }
Now if I Deserialize the object, there is a Register[] array with one item, but this item is null. Has anyone an idea what can cause this? Regards Hansjörg -
ToolStripItem NumericUpDownHello I have made now an ToolStripNumericUpDown control. Now I want to display a Text on the left side of the ToolStripNumericUpDown. How I can do that? At the moment the code is the following:
public class ToolStripNumericUpDownTest : ToolStripControlHost { public ToolStripNumericUpDownTest() : base(new NumericUpDown()) { } private NumericUpDown NumericUpDown { get { return Control as NumericUpDown; } } public decimal Value { get { return NumericUpDown.Value; } set { NumericUpDown.Value = value; } } }
Regards Hansjörg