if (ActiveMdiChild is MyBaseClass1) { // your code hier }
JoeSharp
Posts
-
Finding base class of an object -
Object reference not set to an instance of an object.hi set the connection object 'con' to the command object e.g com.Connection = con do not forget to close the connection e.g. con.Close() aftre the dt.Fill(dt) call. regards
-
How to save textBox to a filehi why you write the text line by line? using(StreamWriter sw = new StreamWriter(filename)) { sw.Write(textbox.Text); } regards
-
Image to binaryhi //To binary MemoryStream ms = new MemoryStream(); bitmap.Save(ms); ms.Position = 0; byte[] arr = ms.ToArray(); // From binary MemoryStream ms = new MemoryStream(arr); Bitmap bitmap = Bitmap.FromStream(ms); regards
-
Load Type in DLL in a different AppDomainhi use LoadFile instead of LoadFrom. this will help you more www.codeproject.com/KB/dotnet/AssemblyLoadFile.aspx cheers
-
Hexadecimal const declarehi visual basic does not support ox00008603L try with: Public Const ABCDE_FGH As Integer = &H00008603L or Public Const ABCDE_FGH As Long = &H00008603L
-
bool[] from valuehi had a look in the BitArray class in the System.Collections namespace. maybe this will help you. regards
-
How To Open A File + Sourabh Dashi File.Open(strIOPath, FileMode.Create) FileMode.Create = Specifies that the operating system should create a new file. If the file already exists, it will be overwritten. try with FileMode.Open regards
-
How to get Value from Combobox.valuemember prppertyhi try with SelectedValue regards
-
Adding a control from within a classhi pass a reference of the form to your class. Public Sub New(ByVal newLeft As Short, ByVal newRight As Short, ByVal newWidth As Short,_ ByVal newHeight As Short, ByVal form As Form1) regards
-
Groupbox problemhi have you try to use GroupBox1.Visible = True/False instead of Hide()/Show()? regards
-
searching a file from a folderhi add a reference to the Microsoft Scripting Runtime library: C:\WINDOWS\system32\scrrun.dll regards
-
Dispose()yes, because the C object is defined outside the using block. using(C c = new C()) { // your code } // after this line the C object is not accesible
-
How to register COM component and use in c# window applicationin this case your exe ist not a com object. all com object must contain DLLRegisterServer and DLLUnregisterServer methods. this methods register/unregister the com object.
-
How to register COM component and use in c# window applicationhi you can register com objects with regsvr32.exe. pass the full filename as parameter. after registering, add a reference to your project selecting the com object registered before. visual studio create a wrapper for the com object and add this wrapper as refernece to the project. regards
-
Showing and manipulating a window formhi using(frmForm frm = new frmForm()) { frmForm.ShowWindow(this); // the using block call the Close/Dispose methode // so yopu don't need to call Close() or Dispose() } regards
-
RichTextBox RightClick [modified]hi use int index = RichTextBox.GetCharIndexFromPoint(Point pt); to get the position of the char under the mouse. use RichTextBox.SelectionStart = index; RichTextBox.SelectionLength = 0; // maybe this line is not necessary to move the cursor inside the textbox. regards
-
How to save iconshi this is a good example for loading and saving icons. http://www.codeproject.com/KB/cs/IconLib.aspx regards
-
Size of a Classhi you can use the Marshal.SizeOf(typeof(MyClass)) method in the System.Runtime.InteropServices namespace. regards
-
Making FileDialogs as Child Windowshooks are not easy to use. look in the msdn help, set the filter to platform SDK an search for OPENFILENAME. good luck :-)