|
no problem. Sorry I can't be of any help here. Good luck.
norm
|
|
|
|
|
Ack - norm, did you actually understand his code at all?
--
-Blake (com/bcdev/blake)
|
|
|
|
|
|
I'm afraid you are using entirely the wrong tool for the job. URL's and Ports are in no way interchangable. You need to be using WebRequest not TcpClient. TCP is a stream protocol between an IP address/port pair on one computer and a IP address/port pair on another computer. HTTPS is an application level protocol between that runs inside an encrypted tunnel that's inside a TCP connection.
Since you are sending XML to this URL I suspect it is a web service of some flavor, and even easier you should be using a proxy generated from their WSDL description of the service.
--
-Blake (com/bcdev/blake)
|
|
|
|
|
Hi, do we need to implement our own DataGrid paging for Windows Form DataGrid?
I understand that to implement paging for ASP.NET DataGrid, one simply specify: InPageIndexChanged handler as DataGrid's attribute.
But anyone did that for WindowsForm?
Thanks!
norm
|
|
|
|
|
Does anyone out ther know how to work around the problem that Interops (Office one for sure) cannot be included in assemblies that are strong named?
|
|
|
|
|
If the product includes a Primary Interop Assembly (PIA) those should be strongly named already. Office has Primary Interop Assemblies available, check the general MSDN downloads section for them.
If you are generating your interop assembly using VS.NET; in the project properties you will find a setting which lets you specify a keyfile to use for the generated interop assembly. Unfortunately this feature isn't available in VB.NET, so you'll have to resort to using the command line tools aximp and tlbimp (refer to MSDN for their usage).
HTH,
James
"then when you go to bed...wait, you dont do that do you....ok....when you plug into the 'hive mind' to charge yourself, ill hack into your head"
Nnamdi Onyeyiri over MSN
|
|
|
|
|
Thank you sir... It would have been much easier if MS read the AssemblyInfo file for the project (but maybe is in the next release)
|
|
|
|
|
Using a web form and making a connection using a socket connection I can do.
The problem is executing a command on the UNIX box once I am connected.
I need ANY and ALL help
|
|
|
|
|
Aren't you using a client-server architecture? I would assume that you just want to code the server in C/C++ on linux and the client in C#. Your communication protocols are all that really need to be the same. The server would just execute a certain unix command when it reads a certain keyword that the client sends.
|
|
|
|
|
I get connected using the socket. Now I need to execute some unix command and I do not know how to proceed once I am connected.
Here is a sample of my code: (The Process object code is converted from VB.NET)
Socket tempSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
try
{
tempSocket.Connect(endpoint);
if(tempSocket.Connected)
{
this.txtstream.Text = "connected";
try
{
string strResults = "";
ProcessStartInfo psCmd = new ProcessStartInfo();
//Setup New Process Info
psCmd.FileName = Environ("ComSpec");
psCmd.RedirectStandardInput = False;
psCmd.RedirectStandardOutput = True;
psCmd.Arguments = "/c ls"; psCmd.UseShellExecute = False;
Process procCmd = Process.Start(psCmd);
//Read in Results & Write to current cmd session
strResults = procCmd.StandardOUtput.ReadToEnd();
this.txtip.Text = strResults;
procCmd.WaitForExit;
}
catch
{
this.txtip.Text = "no directory list";
}
}
}
|
|
|
|
|
Hi, I want to override an OnClick event on a datagrid and display a dropdown menu. Here's the code:
private void OnClick(object sender, System.EventArgs e)
{
int row = dgReport.CurrentCell.RowNumber;
int col = dgReport.CurrentCell.ColumnNumber;
//Question: How can I retrieve:
//(1) selected Cell width
//(2) selected Cell height
//(3) selected cell position
//I don't think I found anything from DataGrid properties. Anyway, once I have cell width, cell height, and cell position, I can dynamically create a dropdown list at the specified location and size.
}
Thanks.
norm
|
|
|
|
|
hi,
here is the one way you could do this, but there could be an easier way.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsdatagridclassgetcellboundstopic.asp
the method is GetCellBounds, which returns the Rectangle object which has width, height, X and Y properties.
ankita
|
|
|
|
|
In VB6 I used the following code with no problems:
xlsheet.HPageBreaks.Add Before:=xlsheet.Rows(rowcnt)
In C# I don't know what parameter I'm supposed to pass to the HPageBreaks.Add method. I keep getting the error:
"Object must be a normal type and not an array"
I've tried passing it an excel range, and the row number with no success.
|
|
|
|
|
Hi all, hope you can help on this one.
I have a C++ struct like this below:
struct OTHERSTRUCT Thing[MAX_NO] = {
{1, "x"},
{2, "xx"},
};
where OTHERSTRUCT is:
struct OTHERSTRUCT
{
int Num;
CString Desc;
};
My question is how do i replicate this in C#? the only way i have so far got this to work is shown below:
public struct tagLINE
{
public tagLINE(int ACode, string ADesc)
{
Code = ACode;
Desc = ADesc;
}
int Code;
string Desc;
};
And creating an instance of it like this:
public tagLINE[] A = new tagLINE[3] {new tagLINE(0, "0"),
new tagLINE(1, "1"),
new tagLINE(2, "2")};
Do i really have do all this "new"ing? Any feedback would be
great.
Simon Wren
simon.wren@nesltd.co.uk
C++ Application Team Leader
National Energy Services Ltd
Visit Us: www.nesltd.co.uk Or: www.nher.co.uk
|
|
|
|
|
Simon Wren wrote:
Do i really have do all this "new"ing?
yes
PS: everything else looks fine
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
So, normally a structure is not new'd when instanciated, except when it's going into an array? This means that the array can only hold reference types, right? Are the value types actually boxed as they're added to the array?
I appreciate you sharing your knowledge on this stuff or pointing me somewhere that explains it better.
Regards,
Alvaro
Can I ask you a question?
|
|
|
|
|
I was under the impression that new was optional for structs. Try getting rid of the constructor altogether and assigning directly to the structures values. Don't see why it wouldn't work.
|
|
|
|
|
I'm working on an application for a school. The web based application needs to give teachers (some teachers have been assigned organizational units) the ability to edit certain group policies. How would I go about getting an object for the "Proxy settings" policy. it seems like the api function GetGPOList might do it, but I'm somewhat lost.
|
|
|
|
|
Hi all,
I have a serializable class 'A' which contains a ArrayList. I create a new instance of class 'A' and add a new instance of Serializable class 'B' to the arraylist.
Now when I try to Serialize class 'A' with BinaryFormatter it just dies..no errors, no crashing.I've marked the statements in vs.net and it just stops when it hits the line that serializes it. Im only attempting to serialize class 'A' thinking that it should serialize all classes its linking to automatically? is this correct?
I have no idea why this is happening and have been struggling with it for a few days now, has anybody got any ideas?
Thanks,
Matt.
|
|
|
|
|
For me it works.
I have
[Serializable]
class A
{
B[] arrayOfB;
}
[Serializable]
class B
{
}
Perhaps it's because you haven't set the Serializable attributes to all? Or because you are using an arrayList? Try with a simple array to check
|
|
|
|
|
Things to check
You will need [Serializable] attribute on each class (should throw an exception, not hang), if it still doesnt serialize, the objects could be far to complicated to serialize, I have had a problem using the binrary formatter on certain complicated objects, it looses data and generally is unstable (I think this was in release 1.0, I Havent tried in 1.1).
Theres a handy undocumented class called LosFormatter, i think its in the System.Web namespace, its a very agressive serialization class which can serialize more data types than the binary formatter. Use it in exactly the same way you would use the BinaryFormatter class.
FYI: LosFormatter is what is used to generate the ViewState field in an ASP.NET application. I cant guarentee it will solve all your problems tho
Thanks - James
James Simpson
Web Developer
imebgo@hotmail.com
|
|
|
|
|
That led me to add extra logging through the process, and I found that it dies when i add to the collection, rather then when it serializes.. turned out to be that I didn't initialize the arraylist d'oh!
It seems to always be something simple that I totally overlook.
Oh well, thanks for the reply (:
|
|
|
|
|
I evaluated seven xp style menus - none of them does MDI merge. Conspiracy?
Tomaz
|
|
|
|
|
I want to Drag files from a TreeView from my application into Windows Explorer. I know hw to get Drag Drop data from windows Explorer but I don't know how to do it from my application to explorer.
Mazy
No sig. available now.
|
|
|
|