|
James T. Johnson wrote:
To give an assembly a strong name use the sn tool to create a key file
But where is sn tool ? When I run
sn -k keyfile.snk<br /> in commandline windows tell me that it couldn't find that tool.
I have one .snk file in my computer and when I use it,it solve my problem but I don't how to create it myself.
Thanks James.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
It is part of the SDK; you'll have to use the shortcut provided by VS.NET in the start menu... Start\Programs\Microsoft Visual Studio .NET\Visual Studio .NET Tools\Visual Studio .NET Command Prompt.
Or you can alter your path to include %windir%\Microsoft.NET\Framework\v1.0.3705\
James
Simplicity Rules!
|
|
|
|
|
Thank you James.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
Can you have MDI's\SDI's in C#, done enough dialogs but can you do 'proper' applications?;P
|
|
|
|
|
Yes you can.
--
David Wengier
Sonork ID: 100.14177 - Ch00k
(as far as I know)
|
|
|
|
|
As David said, Yes you can.
To add to that though there is an inherit difference between the way Windows Forms and MFC work. There is no difference between an MDI parent, MDI child, and a Dialog. All are created by deriving from Form and calling certain methods or setting certain properties.
For an MDI parent set the IsMdiContainer property to true. To create a MDI Child, assign the parent window to the child form's MdiParent property. To create a Dialog, use the ShowDialog() method.
James
Simplicity Rules!
|
|
|
|
|
Keep a close watch on this
regards
Kannan
|
|
|
|
|
Hi,All
I want to access Microsoft Excel Sheet in Visual C#.In one button click i am writting following code:
Excel.Application ExcelApp = new Excel.ApplicationClass ();
Excel.Worksheet sheet ;
sheet = (Excel.Worksheet) ExcelApp.Workbooks.Open("D:\\AccessExcelInVB\\Data.xls",1,1,1,1,1,1,1,1,1,1,1,1).Sheets.get_Item("Data");
MessageBox.Show( sheet.Cells.get_Item(12,12));
I want to access the data in (12,12)'th cell and show it in MessageBox,i need to compare it with string in further code.
But it gives error that object can not be converted to string.
Can anybody tell me how should i convert object to string?
Thanx and Regards
Tushar
|
|
|
|
|
Tushar mahajan wrote:
MessageBox.Show( sheet.Cells.get_Item(12,12));
You need to manually call ToString() on it, but there is probably some Excel method you need to call to get the string out of it.
James
Simplicity Rules!
|
|
|
|
|
Hi,
When i use :
MessageBox.Show(sheet.Cells.get_Item(12,12).ToString);
it gives me string System.__ComObject
But i want value of that cell.
Also it does'nt have Value property to give me value of that cell.
Tushar
|
|
|
|
|
According to a quick look at MSDN there should be a Value property on the Range object that refers to that cell.
ie, Range("L12").Value , I think you create the range object from the worksheet.
James
Simplicity Rules!
|
|
|
|
|
Hi,
Sorry to trouble you again but i am confused.
Excel.Application ExcelApp = new Excel.ApplicationClass ();
Excel.Worksheet sheet ;
sheet = (Excel.Worksheet) ExcelApp.Workbooks.Open("D:\\AccessExcelInVB\\EquipmentData.xls",0,1,1,1,0,0,1,0,0,0,0,0).Sheets.get_Item("Data");
now when i use sheet.Cells(12,12) and gives the Dot it does'nt show me anything,and it gives me error("Excel._Worksheet.Cells denotes a property where a method was expected").(DotNet does'nt support Default).
so i should use sheet.Cells.get_Item(12,12),but it does'nt show me Value property.
I am using Office2000 is it due to that?.
Thanx
Tushar
|
|
|
|
|
This code works for me with OfficeXP
Excel.Application app = new Excel.ApplicationClass();
Excel.Workbook wb = app.Workbooks.Open(@"C:\test.xls", 0,0,1,1,0,0,1,0,0,0,0,0, 0, 0);
Excel.Worksheet ws = (Excel.Worksheet) wb.Worksheets[1];
Excel.Range range = (Excel.Range) ws.Cells[12, 12];
textBox1.Text = (string) range.Text;
wb.Close(false, Type.Missing, Type.Missing);
app.Quit(); HTH,
James
Simplicity Rules!
|
|
|
|
|
Hi,
Thank you very much,now it works here too.
Actually i am new to C#.
Thanx again
Tushar
|
|
|
|
|
I think you might want to try sheet.Cells(12,12).Value (and then maybe .ToString() )
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
Hello Everybody,
I am developing a windows application using c#. I want access some .DBF
file without ODBC.
Can anybody help me out.
Thanks in advance.
|
|
|
|
|
cn0574 wrote:
I want access some .DBF
file without ODBC.
Without ODBC? I think, even ADO internally makes ODBC calls.
Do you mean to say you want to directly open the dbf file and parse it on your own? It might not be an elementary process at all. I suggest that you use OLE DB .NET [underlying technology used by ADO .NET]
Regards
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
I hope that a control can direct access .dbf file.
|
|
|
|
|
Does anyone know if it's possible to use assembly blocks in C#? Or any ideas on how to go about this?
andypat
|
|
|
|
|
Andy Patterson wrote:
Does anyone know if it's possible to use assembly blocks in C#? Or any ideas on how to go about this?
I don't think C# allows you asm blocks, but you can have asm blocks in your MC++ program and then access those classes from C#
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Yeah, thats what I thought. Thanks for your input.
andypat
|
|
|
|
|
I try to accomplish the simple task of writing an ASCII text file in C#/.NET
string str = "This\nIs\nA\nTest";
byte[] b = new byte[str.Length];
System.Text.Encoding.ASCII.GetBytes(str.ToCharArray(),
0, str.Length, b, 0);
FileStream TextFileStream = File.OpenWrite(FileName);
TextFileStream.Write(b, 0, str.Length);
I tried all kind of things like this.
or like that
FileStream TextFileStream = File.OpenWrite(FileName);
BinaryWriter BinaryASCII = new BinaryWriter(TextFileStream, System.Text.Encoding.ASCII);
BinaryASCII.Write(strText);
TextFileStream.Close();
But the newlines in my string never show up correctly in notepad.
What do I need to do do just simply write ASCII to a text file in C#/.NET ?
Tim
|
|
|
|
|
A newline is \n\r, or \r\n, I always forget which.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
if you just want to write text use the StremReader class it is meant for that
|
|
|
|
|
sorry for writing tex you need StreamWriter
|
|
|
|
|