|
yes,perhaps should be.
But sometimes I really have to make some properties dependent on others.
For example,I am writing a 3-D bar chart component,the bar width would depend on block width of the x-aix(I mean that no matter how width the bar you set,it should not wider than the block width,but the block width even depend on the block count of the x-aix).
Thanks
|
|
|
|
|
* I'm want to capture router information such as Incommming/Outgoing traffic, router up time, CPU utilization, Interface IP addresses, etc.
* I made a community in the router and try to get that information. But it not success.
* If anybody knows something about that pls reply me.
* If u have any C# code related that thing pls sent it.
Thanks..........
|
|
|
|
|
Hi,
I am working on a Zebra Printer (110XiIII Plus) and trying to print custom labels using a C# application, but am having no progress in printing graphics i.e. images. I am using the latest driver also.
I have a BMP file that needs to be printed. I tried to print using the PCX format, but even that didn't work.
I read in the documentation that the ~DY command can be used to send a bitmap to the printer and then recall it from the printer's memory and print it.But even that hasn't worked.
The command I am using is ~DYE:123.BMP,B,B,4096,,
Where 123.BMP is my file which is 13x13 and 4096 is the size in bytes. Is this correct or am i missing something or doing wrong!??
Any help is appreciated.
Regards
Sharath M
|
|
|
|
|
First off Zebra printers are kind of a pain, but they do work pretty good. I guess my first question would be have you loaded the 123.bmp on the zebra printer? In my previous job, there was a lot of custom code to load all the images onto the zerbra so those commands would work. My current job, we use crystal reports and embed images into the report and that seems to work just fine.
Hope that helps.
Ben
|
|
|
|
|
Hello...
I have a resx file and that file has about 1000 entries.
Some entries are not used. How to find out, which entries are not used ?
Instead of search it manually using "Find All References".
Thanks...
|
|
|
|
|
how run application(program) in task(background)
and how how close process program
|
|
|
|
|
I think if you search on the Process object and process.Start(program) You will find all the info you need.
Hope that helps.
Ben
|
|
|
|
|
I doing add reference to some TLB file and i see that in the C# project i have the tlb lib wrapped in some interop.
The problem is that the TLB does not show me all the interface that are in the TLB file.
Someone have solution ?
Thanks
|
|
|
|
|
Hi,
Can Anybody help me which API should i use to disable double clicking on window border.When ever we double click on the windows form header it will maximises the window at the top left corner of the desktop.I want to disable this Property for my window.
Any help will be greatly appreciated.
|
|
|
|
|
Hello,
kyreddy wrote: which API should i use to disable double clicking on window border
No API needed!
Just override WndProc method like this:
const int WM_SYSCOMMAND = 0x112;
const int SC_MAXIMIZE2 = 0xF032;
protected override void WndProc( ref Message m )
{
if( m.Msg == WM_SYSCOMMAND )
{
if( m.WParam.ToInt32() == SC_MAXIMIZE2 )
{
return;
}
}
base.WndProc( ref m );
}
Hope it helps!
-- modified at 7:09 Wednesday 1st August, 2007
All the best,
Martin
|
|
|
|
|
Thank you very much Martin its working.
|
|
|
|
|
You are wellcome!
All the best,
Martin
|
|
|
|
|
If you talking about C# you do not need API for this, just set to false the MaximizeBox property for the Form object.
|
|
|
|
|
I've a simple function:
<code>
private void BuildTree()
{
TreeNode rootNode = new TreeNode("Root");
TreeNode node1 = new TreeNode("Child 1");
TreeNode node11 = new TreeNode("Child 11");
TreeNode node12 = new TreeNode("Child 12");
node1.Nodes.Add(node11);
node1.Nodes.Add(node12);
rootNode.Nodes.Add(node1);
TreeNode node2 = new TreeNode("Child 2");
rootNode.Nodes.Add(node2);
TreeNode node3 = new TreeNode("Child 3");
rootNode.Nodes.Add(node3);
treeView1.Nodes.Add(rootNode);
if (!rootNode.IsExpanded)
{
rootNode.Expand();
}
}
</code>
My problem is:
If I create a new Winforms application, the expand function does its work, but if the same function is written into a .dll where the treeview is on a usercontrol, expand does nothing. I mean the node doesn't expands so I have to click on '+' to do it.
I use the same function at each time.
Any guess?
Peter Kovacs
collapo
|
|
|
|
|
Just a guess but the difference may be at what point you call this function. Probably your test app already shows the treeview when calling the function while your usercontrol calls the function before the tree is visible.
I don't think it has anything to do with the user control as I already used Expand on TreeViews within user controls.
Robert
|
|
|
|
|
The treeview is shown in initializecomponents in both project, if I'm not mistaken, therefore that can not be the problem. The function is called right after Initializecomponents(), so it is called "at the same time".
But anyway thanks, I'm waiting for others.
And the winform application is not a test, but a paralell application.
Peter
|
|
|
|
|
Hi,
I am using MSACCESS database which is belonged with password. and I need to know that how do I create connection string?
Thanks in Advance
|
|
|
|
|
|
Thank you Mr. il_masacratore
|
|
|
|
|
Hi,
The following is the code i used to create, write to and save an excel file. Everything goes fine except there is a delay in releasing the object. Yes it persists till the application is closed. Sometimes i'm able still see the excel.exe in the task manager even after the application is closed. Is there any way to overcome this.
I've added a reference to excel 11.0 com component.
private void CreateExcel()
{
Excel.Application ExcelApp = null;
Excel._Workbook ExcelWorkbook = null;
Excel._Worksheet ExcelWorkSheet = null;
string strSavePath = "";
try
{
ExcelApp = new Excel.Application();
ExcelApp.Visible = false;
ExcelWorkbook = (Excel._Workbook)(ExcelApp.Workbooks.Add(Type.Missing));
ExcelWorkSheet = (Excel._Worksheet)ExcelWorkbook.Sheets["Sheet1"];
// ExcelWorkSheet.Name = "My Sheet";
//Make sure Excel is visible and give the user control
//of Microsoft Excel's lifetime.
ExcelApp.Visible = false;
ExcelApp.UserControl = false;
/*********************/
DataSet dsData = MyDataLayer.GetDataSet("Select top(3) from XXXX");
if (dsData != null && dsData.Tables.Count > 0)
{
// the writing process
ExcelWorkSheet.Cells[iRowIndex, iColumnIndex] = data;
}
/*********************/
//ExcelWorkSheet.get_Range("A3", "F3").HorizontalAlignment =
//Excel.XlHAlign.xlHAlignCenter;
//ExcelWorkSheet.get_Range("A1", "A1").Font.Bold = true;
ExcelWorkSheet.Visible = Excel.XlSheetVisibility.xlSheetVisible;
ExcelWorkSheet.Activate();
ExcelWorkSheet.get_Range("A3", "F3").EntireColumn.AutoFit();
//ExcelWorkSheet.get_Range("E1","E1").Columns.EntireColumn.NumberFormat = "£###,###,##0.00";
strSavePath = Application.ExecutablePath.ToString();
strSavePath = strSavePath.Substring(0, strSavePath.LastIndexOf("\\"));
strSavePath = strSavePath + "\\TestExcelFile.xls";
ExcelWorkbook.SaveAs(strSavePath, Excel.XlFileFormat.xlExcel7, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Excel.XlSaveAsAccessMode.xlNoChange, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
// ExcelWorkbook.Close(false, strSavePath, null);
// return;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
if (ExcelWorkSheet != null)
{
System.Runtime.InteropServices.Marshal.ReleaseComObject(ExcelWorkSheet);
ExcelWorkSheet = null;
}
if (ExcelWorkbook != null)
{
ExcelWorkbook.Close(false, strSavePath, null);
System.Runtime.InteropServices.Marshal.ReleaseComObject(ExcelWorkbook);
ExcelWorkbook = null;
}
if (ExcelApp != null)
{
ExcelApp.Quit();
System.Runtime.InteropServices.Marshal.ReleaseComObject(ExcelApp);
ExcelApp = null;
}
}
finally
{
if (ExcelWorkSheet != null)
{
System.Runtime.InteropServices.Marshal.ReleaseComObject(ExcelWorkSheet);
ExcelWorkSheet = null;
}
if (ExcelWorkbook != null)
{
ExcelWorkbook.Close(false, strSavePath, null);
System.Runtime.InteropServices.Marshal.ReleaseComObject(ExcelWorkbook);
ExcelWorkbook = null;
}
if (ExcelApp != null)
{
ExcelApp.Quit();
System.Runtime.InteropServices.Marshal.ReleaseComObject(ExcelApp);
ExcelApp = null;
}
//GC.WaitForPendingFinalizers();
}
GC.Collect();
}
Thanks,
PLS
|
|
|
|
|
I have also run into this problem some time ago. The only solution (workaround) I found was to get a list of all running processes (Process.GetProcesses) before creating the Excel.Application instance and then again after the creation to fetch the corresponding process. I then killed this process after being done.
I know this is completely insane but as said I didn't find any other solution.
Robert
|
|
|
|
|
Hi All,
I am using FolderBrowserDialog in my application. FolderBrowserDialog have RootFolder Property, where it gets or sets the root folder where the browsing starts from. But we can assign only SpecialFolder to RootFolder.
Is it possible to assign user specified folders other than special folders?
Is there any other dialog where we can achieve this?
Thanks in advance.
|
|
|
|
|
The SelectedPath property is what you're looking for.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Thank You. Thank You. Thank You.
|
|
|
|
|
Hi!
I want to dial a number by my modem and play a voice after a person response to the call.
|
|
|
|