Hi pallini Sir, i have main document which has child documents. so in main document i have overridden the function document:oncloseDocumenet() and called ColeDocument:CloseDocument. Thanks For reply Sir.. but prob still not resolved Regards Samir
VCsamir
Posts
-
how to close document handle -
how to close document handlehi friends, i have have a MDI Application. when i close a document using onclosedocument. my document handle remains active though the members used in document are set to null. so i cannot check this condition if(doc) as it returns true. whereas in the if block it cannot access the members so app crashes eg.
if(doc) //handle =FAEX000
{
doc->getprivatevariable_or_functions(); // the application crashes here
}thanking in anticipation REgards Samir
-
how to close document handlehi friends, i have have a MDI Application. when i close a document using onclosedocument. my document handle remains active though the members used in document are set to null. so i cannot check this condition if(doc) as it returns true. whereas in the if block it cannot access the members so app crashes eg.
if(doc) //handle =FAEX000
{
doc->getprivatevariable_or_functions(); // the application crashes here
}thanking in anticipation REgards Samir
-
LOGFONT in C#Hi friends & seniors, i have a Vc++ dll in which i return a struct of LOGFONT menbers
struct xyzStruct
{
LOGFONT a;
}extern "c" __dllspec ... xyzStruct a()
this data is populated in vc++ dll and passed to a C# form in the C# side i have created
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]
public class LOGFONT
{
public int lfHeight = 0;
public int lfWidth = 0;
public int lfEscapement = 0;
public int lfOrientation = 0;
public int lfWeight = 0;
public byte lfItalic = 0;
public byte lfUnderline = 0;
public byte lfStrikeOut = 0;
public byte lfCharSet = 0;
public byte lfOutPrecision = 0;
public byte lfClipPrecision = 0;
public byte lfQuality = 0;
public byte lfPitchAndFamily = 0;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=32)]
public string lfFaceName = string.Empty;
}then i make pinvoke to the DLL
[StructLayout(LayoutKind.Sequential)]
public class xyzStruct
{
public lOGFONT a;
}
[dllImport ("Dll name")]
public static extern xyzStruct a();i get error "methods signature is not pinvoke comaptible" i try using int in struct in both dll and form everything works fine. thanks in advance Regards Samir
-
Problem to remove temporary image files once usedhi sir, i am using filestream only.. one more thing i am using thread to load the controls inside layout panel regards samir
-
Problem to remove temporary image files once usedhi friends, seniors $ all, I have a form on which i am using layout panel. on this layout panel i am adding user control during runtime. the control consists of a picturebox and label. the image which is displayed on picture box is copied from the source folder to temp folder. this image is resized and bitmap is created and passed to picture box. now i want to clear the temporary moved files, which is not happening.. :( i get the file is in use. so i disposed the child form, before comming to parent form. even clearing the layout panel didint help.. friends please suggest me some help regards Samir
-
Add control to listviewhi friends & all seniors, i have created a user control. i want to add it dynamically to list view. for certain criteria i am saying for(certain condition) listview.control.add(object_of_createdUserControl); If i am using this for flow layout panel it works fine. but this fails for list view. i dont get any error and all the objects of user control are added to the listview but only the first is displayed. hope i have stated my problem correctly :-D Looking forward for your kind response!! Regards Samir
-
Png Image Saving the original size doubleshi friends $ Seniors, i am trying to save an image in PNG format, the original image is 24dpi and is 16.2 mb, afterwards i add alpha channel to image and make some portion of the image transperant, after this when i save the image img.save(imagepath, imageformat.png) the size is increased to 33 mb. i wanted to know the image size increased is correct? does the image dpi changed from 24 to 32 increases the image so much? friends, also debugging my code i found a strange thing, which i would like to share with u Bitmap bmp = new Bitmap(imagepath); bmp.save("c:\11.jpg"); // this saved image with 16 mb Bitmap bmp1 = new Bitmap(bmp); bmp1.save(c:\\22.jpg); // this saved image with 33 mb Thanking in Advance Regards Samir
-
Maximum Width And Height of panelhi friends, i am using a panel of which i want to increase the size to maximum of may be 20,000 X 20,000 how can i achieve this on runtime? It gives me error like System.ComponentModel.Win32Exception: The operation completed successfully at System.Windows.Forms.DibGraphicsBufferManager.CreateCompatibleDIB(IntPtr hdc, IntPtr hpal, Int32 ulWidth, Int32 ulHeight, IntPtr& ppvBits) at System.Windows.Forms.DibGraphicsBufferManager.CreateBuffer(IntPtr src, Int32 offsetX, Int32 offsetY, Int32 width, Int32 height) etc.. actually i am working on zooming of image.. i am calculating the zoom percent and just increasing the width and height of panel and redrawing the image on it.. this works fine ..but when my panel size is set to above 12,000 X 8000 the system gives the above error.. thanks in advance Samir
-
DataGridView in Managed c++hi friends, i want to use datagridview in c++, i am using data binding. i add object list to binding and use this binding as data source to gridview. then i set the the dataPropertyName as the member of the object. my problem is i am not able to view my data in the grid. at runtime i want to add objects to the binding so that they can be viewed in the grid. my code is as below //bs is the binding object for(int j = 0; j< CustInfo.oCust->Customer->Count;j++) bs->Add(gcnew CustomerDetails(custobject)); CustGridView->DataSource = bs; DataGridViewColumn^ column1 = gcnew DataGridViewTextBoxColumn(); column1->DataPropertyName = "m_strName"; // member of CustomerDetails column1->Name = "Name"; column1->Width = 227; CustGridView->Columns->Add(column1); DataGridViewColumn^ column2 = gcnew DataGridViewTextBoxColumn(); column2->DataPropertyName = "m_strStreet"; //// member of CustomerDetails column2->Name = "Street"; column2->Width = 120; CustGridView->Columns->Add(column2); can any one help thanks in anticipation Regds Samir
-
iterationhi, this might be one of the way to solve it. you can use LINQ query to do it in a neat way IEnumerable carnames = from cars in car select cars.name; foreach(string cr in carnames) { //do whatever with cr } i feel linq is really a nice concept introduced.. infact i have become a fan of it. in above u can specify the 'where' condition also as per your need.. Hope this helps u... Regards Samir
-
Xml DeserializationThanks Sir !! I problem is solved.. i set the the namespace atrribute in the root!! thanks once again for being so kind.. Regrds Samir
-
Xml Deserializationhi , Opps sorry friends.. The opening and closing tags are matching i have put "//" only because to show the example..(when i was posting the same code the <> tags were getting invisible :doh: )i have tried opening the xml in iexplorer it opens fine.. Thanks .. Regards Samir
-
Xml Deserializationhi friends, i am using xmlclass serailization to read the Xml File /// XmlTextReader reader = new XmlTextReader(filename); try { XmlSerializer serializer = new XmlSerializer(typeof(Class_name)); Class_object = (Class_name)serializer.Deserialize(reader); reader.Close(); } catch (Exception e) { reader.Close(); return; } it says that "{
-
Are pathgradient brushes slow?hi friends & all contributers!! i am using a pathgradient brush. i am using a loop to add a single ellipse to add to path and filling that ellipse with path gradient brush and resetting the path.. when the points are too many the application slows down.. Is there any way to make this faster?? Thanks in Advance Samir
-
brushes with opacityHi friends $ experts!! i need a small help from you'll!! i am working on eraser brush.. i have created a path gradient brush with center color as white and surround color as transperant now i apply the brush on the image. now once i say save this brush the white color should become transparent wheras the transperant color should blend with the image.. i am using this brush so as to get the feather effect. i have tried with the composite mode as source copy but the tranperant blending effect goes.. can any show me a way to solve my problem? Thanking in advance Regards Samir
-
Image ScrollHI All! i have a panel on which i am drwaing a image control on the center of panel, now when i zoom the image i am resizing the control's left, top , height and width, now when i get negative left and top values the image gets cropped from top Image gets cropped from the top but the bottom scroll bars appears.. is there any way so that when i set the values of my image control to negative(i.e left and top) still the scroll bars appear for that control!! Thanks in Advance Samir
-
Image opacity in C#Thanks Sir :rose: :rose: for kind Help!! Regards Samir
-
Image opacity in C#Hi friends, Can you'll help me to find another way for this.. i have two bitmaps, one is the mask bitmap which is a grey scale image and another is actual image, i am applying this mask on the image, i use getpixel & setpixel to apply the color of mask image as the alpha of the other image.. for small images it is fast but it becomes slow as the image size increases.. Is there any alternate way to do so? Thanks in advance.. :-) Regards Samir
-
GDI Region blendinghi friends, i am trying to blend the edges of the polygon region can any one help me to do so.. regards Samir