|
The ListView has an Items collection, you can use this to set the width of an item, I believe.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thanks for replying.
There is no such or similar property.
|
|
|
|
|
|
Yes, there is, but it's not what you want
listView1.Columns[0].Width = 20;
Is how you set column width.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Yes there is offcourse Items property but I meant that there is no property on it by which its size, etc can be changed.
Increasing the column widths will do.
Thanks for the quick responses.
Cheers
|
|
|
|
|
Hi,
Is there any other way of increasing the label size other than increasing the column widths?
Thanks
|
|
|
|
|
I have build a server application with Sockets. My question is simple.
Is it possible to see how many and what clients are connected? If yes then how?
Kind Regards ,
Jacco
|
|
|
|
|
I always keep track of the connected client sockets, so that I can disconnect them at will, for example to restart the server in a correct manner. If you keep track of the connected client sockets, you can simple get the size of the list which gives you the number of connected clients.
WM.
What about weapons of mass-construction?
|
|
|
|
|
hi
i found an article in codeproject as DataGridPrinter that print datagrid good. but it has written with VB.Net and i want it in csharp. when i create dll in VB.Net and i use it in c# the following error shown me :
Unable to cast object of type 'System.Windows.Forms.BindingSource' to type 'System.Data.DataTable'
and when i set Datagrid1.DataSource = ds1.Tables["Table1"]; the following error shown me :
//in Line 374
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
how to solve my problem and do you have a other class that print datagrid in C# with header and footer ?
thanks ..
|
|
|
|
|
There is a forum provided under the article, that's the place to go to get help on the article.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
How to play a sound from my program.
I have Visual Studio 2003.
Net 1.0.]
Help.
Vasildb
|
|
|
|
|
using System.Runtime.InteropServices;
[System.Runtime.InteropServices.DllImport("kernel32")]
private static extern int Beep(int dqFreq, int dqDuration);
Beep (3000,25);
=> It will play a nice beep like in '80 years
If you are not happy with that you can also use the MCI functionalities provoded by the API (need import also)
or ... simply play wave with:
[System.Runtime.InteropServices.DllImport("Winmm.dll")]
private static extern bool PlaySound(byte[] data, IntPtr hMod, UInt32 dwFlags);
La Richesse & la Gloire ne griseront jamais que les temples
|
|
|
|
|
hi ,
i writing a application in that i want to read or send data to one port(COM2)
i using C#.net2003 thatwhy i can't use
namespace SerialPort
i must use win32 API
plz give a sample program for sending the data to COM2 port in C#.net
it's very usefull in my application plz
Thanks
|
|
|
|
|
Could someone point out why there is an error here?
Thanks.
class BankAccount<br />
{<br />
<br />
decimal m_ID;<br />
<br />
public BankAccount(string ID)<br />
{<br />
m_ID = 0;<br />
}<br />
<br />
}<br />
class SavingsAccount : BankAccount<br />
{<br />
decimal m_ID;<br />
<br />
public SavingsAccount(string ID)<br />
{<br />
m_ID = 0;<br />
}<br />
}
|
|
|
|
|
Since the SavingsAccount ctor doesn't have an explicit call to the base class ctor, the compiler will insert a call to the default ctor (the one with no parameters). But there is no such ctor, so you get the error. You need to add the call to the initializer list:
public SavingsAccount(string ID) : base(ID) { ... }
|
|
|
|
|
|
How can I display drgged object's shadow (or faded image) with the mouse pointer? Thanks.
|
|
|
|
|
You can change the cursor if you have a static image you want to show under the mouse. Otherwise, you need to draw it yourself.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
If i make a stream of some sort out of it, and write to the stream, will the online file be edited?
I don't suspect so. Is there something i can do to do this?
|
|
|
|
|
Sure - if you have FTP write access, you can read the file, change it, and write it back.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Excellent, im so happy... well y'know.
|
|
|
|
|
when i'm looking at a value and using console.writeline(byte[0]); to print the output of a network stream. i am getting a 69 printed to the screen. is this an octal number or the binary number 69? 01000101?
|
|
|
|
|
It is 69 in decimal (01000101 binary). I don't know how/if C# can display octal.
A byte array is just a bunch of bytes - numbers that can range between 0-255 decimal, 00000000 to 11111111 binary, or 000-377 octal.
HTH,
Mike
|
|
|
|
|
If it was octal, it wouldn't have a 9 in it. If it was binary, then it wouldn't have a 6 OR a 9 in it.
I would have thought byte was a keyword and couldn't be an array name...
If you're worried, use ToString and pass it a format so you know what it is.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi All,
I have a product which I am planning on distributing to a few Beta testers. I thought it would be a good idea to incorporate some sort of licensing/registration scheme for it, so I can control it, have a trial version that expires after a certain period of time, etc. Does anyone have any experience with licensing solutions that can be used with .NET components?
Thanks,
Aaron
|
|
|
|