|
keefb wrote: There is also a port of .net useless pile of steaming dog mess called Mono which can be compliled for/under multiple environments (such as linux) which would be quite usefull if it was ever finished.
FTFY
All those who believe in psycho kinesis, raise my hand.
My 's gonna unleash hell on your ass. tastic!
|
|
|
|
|
Mono is quite useful for writing Linux or cross-platform apps.
Of course, if you are looking for a magic way to port your Windows-only app to Linux without having to spend any effort, Mono isn't what you are looking for.
WinForms is crap since any non-trivial WinForms code must rely on P/Invoke or overriding WndProc which is platform-dependent.
So just like other programming languages, if you want a cross-platform app, you must use a cross-platform GUI toolkit like GTK#.
WPF isn't implemented in Mono and won't be anytime soon. Silverlight/Moonlight might be an alternative, though.
That said, non-GUI code usually runs fine in Mono. The only trouble I had were hard-coded line endings ("\r\n"). I had no trouble using new language features like LINQ.
|
|
|
|
|
If moonlight is as well implemented for silverlight as mono is for .NET, then expect problems: big problems (where they can't be bothered to implemnt the boring stuff they don't use), small (where they don't implement it quite the same), and bl**dy annoying little differences that waste way too much time to find.
All those who believe in psycho kinesis, raise my hand.
My 's gonna unleash hell on your ass. tastic!
|
|
|
|
|
I got great help with postings of Dr. Wisam E. Mohammed.
I have a question/query for all those working with mapwindow activeX.
I've added a shapefile of 'countries' to the mapcontrol(mapwingis.axmap). Now i need that upon clicking/selecting a shape, particular information to be showed.
I tried the coding on mousedownevent but i think mapwingis events are not working??
help!!!
|
|
|
|
|
I suggest you find a forum specialized in the use of the mapwindow activeX control. You might get some help here, but it will be more likely on a dedicated forum.
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
|
mayank4everurs wrote: mapwindow activeX
Never heard of it.
|
|
|
|
|
Hi all,
I'm trying to get the global hotkeys working with Linux.
With Windows it is DLLImport user32 but this dll doesn't exist in Linux.
Has anyone an idea how to get global hotkeys working with Linux?
Thanks to all.
|
|
|
|
|
hii man,
you need to write your own implementation of GlobalHooks in c or c++
write down a library and use that one in your c# application or on linux..
grretz
|
|
|
|
|
Thanks for this hint.
But if i do so, ill have to install this lib on every client. Am I right? Or is there any posibility to deliver this lib with the C# project.
I'm not familiar with c#. I use to work with Linux and C++ so if this Questions are a little stupid ... please don't matter
greatz
Armin
|
|
|
|
|
yeah in windows you need to deploy the lib/dll like by installing the app.
using the lib in linux need to be recompiled under linux because the operating system specific api will be used and that one is different as the on in windows see the user32.dll doesn't exists under linux.
hope i could help
|
|
|
|
|
yeah sure, but now i feel a little stupid ...
Using Windows and user32.dll everything works but what do i have to use for Linux.
With C++ it's easy to use global Shortcuts but I don't get it to work in .NET
If anyone has a bit of code to put me to the right way ... the one would be my hero
thanks
Armin
|
|
|
|
|
Hey guys =),
I want to create a ".xls" and ".xlsx" file in C#2008. Creating && saving is no problem, but how can I close it?
I think I've a bug in my code...
Microsoft.Office.Interop.Excel.Application excelApp = new ApplicationClass();
Microsoft.Office.Interop.Excel.Workbook newWorkbook = excelApp.Workbooks.Add(Microsoft.Office.Interop.Excel.XlWBATemplate.xlWBATWorksheet);
Microsoft.Office.Interop.Excel.Sheets excelSheets = newWorkbook.Worksheets;
string currentSheet = "Tabelle1";
Microsoft.Office.Interop.Excel.Worksheet worksheet = (Microsoft.Office.Interop.Excel.Worksheet)excelSheets.get_Item(currentSheet);
worksheet.SaveAs(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\SaveAsTest.xlsx", t, t, t, t, t, t, t, t, t);
but now the question is... "how can I close this worksheet?" a ".close" property doesn't exist...
I read, that I can close the workbook but the workbook uses a already existing file.
Is it possible to assign the new created to a workbook?
greets Mschauder
|
|
|
|
|
It looks like you need the Application.Quit()[^] method; don't you just love Microsoft?
MVP 2010 - are they mad?
|
|
|
|
|
Hey, worked fine!
Now the next problem... my computer uses office 2007, I can open the ".xlsx" && ".xls" file smoothly...
But if I use the laptop with office 2003... sure I can't open the ".xlsx", but why can't I open the ".xls"???
Is there a possibility to save the file, with the natural format for office 2003 (.xls)
greets Mschauder
|
|
|
|
|
I answer now my own question (sorry!):
just use:
t means
object t = Type.Missing;
worksheet.SaveAs("Test.xls", XlFileFormat.xlExcel8, t, t, t, t, t, t, t, t);
and saving as office2007:
worksheet.SaveAs("Test.xls", t, t, t, t, t, t, t, t, t);
|
|
|
|
|
|
hi,
try to set the DisplayStyle to ImageAndText or Text. may this would help
greetz.
|
|
|
|
|
nope, it still doesn't work
|
|
|
|
|
how we can get and set item values in a multicolumn listview?
|
|
|
|
|
I find the documentation[^] is the best starting point.
MVP 2010 - are they mad?
|
|
|
|
|
I want to change the outer border of tablelayoutpanel. NOT THE INNER CELL BORDER bt the OUTER BORDER of the panel.
Tablelayoutpanel has the option for cell borders bt not for the outer border. How to change that.????
Can anybody help me with the code....????
Thanks in advance....
|
|
|
|
|
Because a TableLayoutPanel is derived from a Panel, it has a BorderStyle - it's just that you can't see it in the properties windows (or Intellisense). You can alter it at run time, but not at design time:
tableLayoutPanel1.BorderStyle = BorderStyle.Fixed3D;
Intellisense will not find it when you get to the dot, but keep typing and it will be accepted, and will compile and run cleanly.
All those who believe in psycho kinesis, raise my hand.
My 's gonna unleash hell on your ass. tastic!
|
|
|
|
|
I wrote some code and have problem in line *. I get my modem names correctly but when I want to instantiate a Modem object I face an exception in line * which is: "This modem is invalid".
static void Main(string[] args)
{
TAPI tapi = new TAPI();
bool b = tapi.Initialize();
ArrayList list = tapi.AvailableModems();
* tapi.modem = new Modem(list[1].ToString(), tapi, new IntPtr());
Modem modem = tapi.modem;
modem.Call("6632");
}
list[1] is correct because I checked it and also I should say that my modem is connected to an internal dormitory phone line which I can dial other rooms, so my number in Call() function is just 4 digit long. I wanted to know that is that possible that because my modem is connected to an internal phone line I faced that exception? Excuse me for any mistakes because of my poor English.
modified on Tuesday, February 2, 2010 2:02 AM
|
|
|
|
|
I have this simple code running on my windows server just fine, but when I run it in mono after a couple days I start getting only OutOfMemory exceptions.
public static byte [] TryReceive (Socket sock, out int nLength)
{
nLength = 0;
try {
int size = sizeof(int);
byte [] data;
int recv = 0;
int offset = 0;
data = new byte [size];
while (size > 0) {
recv = sock.Receive(data, offset, size, SocketFlags.None);
if (recv == 0)
return null;
offset += recv;
size -= recv;
}
size = BitConverter.ToInt32(data, 0);
offset = 0;
data = new byte [size];
while (size > 0) {
recv = sock.Receive(data, offset, size, SocketFlags.None);
offset += recv;
size -= recv;
}
nLength = data.Length;
byte [] dataGraph = new byte [data.Length - 1];
Array.Copy(data, 1, dataGraph, 0, dataGraph.Length);
if (BitConverter.ToBoolean(data, 0))
dataGraph = DecompressBytes(dataGraph);
return dataGraph;
}
catch (OutOfMemoryException) { ObeServer.log.Log(1, "OutOfMemory when receiving packet."); return null; }
}
Could someone please see something that might be causing this?
TIA
|
|
|
|
|
In fact this may be an issue with the TCP window size, let me explain that.
Certainly the size that you try to decode is wrong, due to a framing issue.
If it's a TCP, you need to have some sync stuff, you cannot consider with TCP even if it's a connected protocol that the byte you will receive is always here. That's why you need a sync byte (eg. 0x80 for RTP protocol or HTTP string for HTTP....) prior the size.
The windows socket size is different from OSes (eg. Linux and Windows) and the TCP NO WAIT depends on the stack configuration.
So, I advise you to check if the : size = BitConverter.ToInt32(data, 0); is correct and not a very high value which may cause the memory leak.
My two cents
|
|
|
|