|
The link can't be found...thanx if you can get it to me
Jude
|
|
|
|
|
|
I didn't understand your question very well, but if you only want to disable the Close button on your C# form, just add this property to your Form:
class MyForm : Form
{
...
protected override CreateParams CreateParams
{
get
{
CreateParams createParams = base.CreateParams;
createParams.ClassStyle |= 0x200;
return createParams;
}
}
...
} I hope this helps!
Luis Alonso Ramos
Intelectix
Chihuahua, Mexico Not much here: My CP Blog!
|
|
|
|
|
Thanx for the reply, but I am trying to prevent a certain program that runs in a command window to be closed.
Jude
|
|
|
|
|
hi i m new to C#.net.i m using winsock controll for network programming. the following code does not work.
private void axWinsock1_DataArrival(object sender, AxMSWinsockLib.DMSWinsockControlEvents_DataArrivalEvent e)
{
Bytes[] msg=new Bytes[20];
axWinsock1.GetData(msg,msg.length);
}
but it gives error that cannot parameter to refer object how to do that i mean where refer object comes into scene.
later i used the first variable as string but still give error.
Tasleem Arif
|
|
|
|
|
Hello, I have this next code, which works, but when I open the .xml file it doesn't show me the type I want, it shows me "System.Type" or "AnyType"...
DColSFirst.DataType = TypeCode.String.GetType();
also:
DColSID.DataType = Type.GetType("System.UInt32"); //works either...
How can I define the DataColumn to a type I want?
|
|
|
|
|
Hi folks, does anyone know where I can find a guide / tutorial on measuring internet / network traffic?
Cheers,
Ben.
|
|
|
|
|
|
Not quite, but it did point me in the right direction, thanks
|
|
|
|
|
I have a need to display data with a DataGridView that is expandable in both dimensions. In other words, the user may want to add both extra rows and extra columns. To do this I am currently just copying my data from a strongly typed list of object (that also contain another strongly typed list of their own - i.e. the second dimension) to a DataTable and add some methods for inserting new columns and then copy everything back again when I'm done. It's not the most elegant solution, but it does work. I was wonder though if there is a better solution using a custom collection class. Does anybody have any suggestions? Is there a way to get the DataGridView to bind a collection of custom objects that themselves contain another collection class?
|
|
|
|
|
Hi all I have two problems ist one is that I have stored a string in ArrayList using split function (i.e one word per index). now the problem is that this ArrayList contains white spaces wich is creating problems as well. whereas i have already removed the white spaces from the string
2ndly i want to convert an ArrayList into a string. not an array of strings but a single string...
looking forward to ur help
Regards,
-- modified at 13:53 Tuesday 9th May, 2006
|
|
|
|
|
friend this may resolve, ur first problem..
<br />
private void parseString(String x)<br />
{<br />
string tempstr;<br />
int i=0,len,flag=0;<br />
tempstr="";<br />
<br />
len=x.Length;<br />
while(i < len)<br />
{<br />
if(x[i]!= ' ')<br />
{<br />
tempstr = tempstr + x[i];<br />
flag = 0;<br />
}<br />
else<br />
{<br />
if(flag == 0)<br />
{<br />
str.Add(tempstr);<br />
tempstr = "";<br />
flag = 1;<br />
index++;<br />
}<br />
<br />
}<br />
i++;<br />
}<br />
str.Add(tempstr);<br />
<br />
}
In this str is arraylist
If u have still some doubt, mail me
ShivaJee
|
|
|
|
|
In .NET 2.0 you can use the StringSplitOptions.RemoveEmptyEntries with the String.Split function. Otherwise when you load up your ArrayList just check if the strings contain only white space:
if (myString.Trim()="")
To convert back to a string can't you just iterate through the ArrayList and add each entry to a string, or even a StringBuilder?
-- modified at 16:53 Tuesday 9th May, 2006
|
|
|
|
|
Use foreach to iterate over the array and a stringbuilder and ToString ( if you're not using a string in your foreach ) to pass each object through the stringbuilder to build up your string.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
How can I insert a tab into the Text attribute of the Label of Winform?
For example
aaa: uuuuuuuu
bbbbb: yyyyyyyyyyyy
So in order to display
aaa : uuuuuuuu
bbbbb : yyyyyyyyyyyy
you must fill a tab character in. "aaa: uuuuuuuu" will be the text attribute of the Label.
Any help will be highly appreciated.
-- modified at 13:55 Tuesday 9th May, 2006
|
|
|
|
|
|
|
are you trying to write in from a visual-studio properties window?
because they will disable that option and just write \t, search the designer code for the label's text, and do it by hand, if there is a @ before the string, then erase it...
If the problam is continues, then something doesn't make sense, give a part of the code...
|
|
|
|
|
i have a binary tree class in SDI form program.
i want to print binary tree on that form using GDI commands.
can any one pls tell me how can do it.
pls give sample code to do it.
-- modified at 13:41 Tuesday 9th May, 2006
|
|
|
|
|
Create a BinaryTreeRenderer class.
public class BinaryTreeRenderer
{
public void Render(System.Drawing.Graphics graphics, BinaryTree theTree)
{
graphics.DrawLine(....);
}
}
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
I am porting a C# app from .Net 1.1 to 2.0. The app uses a native DLL. In 1.1, I used the following code successfully:
<br />
[DllImport(@"cbWaypoint.dll", EntryPoint="NEWJOB")]<br />
public static extern void NEWJOB();<br />
The DLL was located in the same folder as the assembly (bin/Debug).
However, when I try to do the same thing using 2.0, I get a DllNotFoundException:
Unable to load DLL 'cbWaypoint.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Is anyone aware of changes to PInvoke in 2.0 that would cause this problem?
|
|
|
|
|
Does your native DLL have any dependencies that may be missing (i.e. must also be in the same folder or registered elsewhere on the machine)?
-Phil
|
|
|
|
|
I am needing to create an Options Window for my Applicaiton. Like in MS-Word when you go to Tools > Options > 'Options Window' you can specify settings for the app etc.
Can someone direct me to a tutorial or an article that talks about this stuff? Or tell me the techniques as to how to approach it?
Thanks in advance.
|
|
|
|
|
There is no pre-built "options window" in the .NET framework. You just create a new Form, add a bunch of controls which represent options, and provide some type of persistence mechanism to save/load the user's settings. You might want to use an xml config file to store the settings.
Josh
|
|
|
|
|
How about the Settings.settings file? Would that be a better choice?
|
|
|
|