|
I want create programe to send message from my to athor computer
same message is show in windows xp(message service)
such as (net send 128.0.0.1 hi )
how I do that
in C#.net
|
|
|
|
|
|
You use a Process class:
Process myprocess = new Process();
//Program you want to launch execute etc.
myprocess.StartInfo.FileName = "c:\\windows\\system32\\net.exe";
myprocess.StartInfo.Arguments = "send 128.0.0.1 hi";
myprocess.Start();
NOTE I am not sure about the location of net. I think it is in system32, but I could be wrong.
Hope that helps.
Ben
|
|
|
|
|
ShellExecute(NULL,"open","net.exe",<br />
"send 128.0.0.1 hi","c:\\windows\\system32",SW_SHOW);
|
|
|
|
|
Hi all
Can u pls help in monitoring UPS using Power Management
Thanks
abhi
|
|
|
|
|
Is Windows Forms really the right forum for this question?
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I have been trying to change color of tab control. But all i could do is change the color of tab - pages present on the tab control. It looks very awkward that tab pages of different color and the panel on which these pages are present is default color. Please if any one knows how to change the color of the tab control...
~Vikram Verma
|
|
|
|
|
VB.NET doesn't support that but C#. You can change the color of a tab and its page color but you can't change the color of tab control in vb.net. I assumed you are not going to use API to do that.
I wish there were such feature in VB.NET.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
I have a main form where the user selects a customer from a drop down box. On this form is also a button that opens another form as a dialog that allows the user to enter a new customer. The user clicks "Save" on the new customer dialog and the customer is saved to the database and the main form becomes active again. I can't figure out how to update the combobox so that it displays this new customer in the list.
The combobox is bound to a datasource. I know the code to create and save a new customer is working since the change is reflected in the database. The new customer also appears in the combobox BUT only after I close and run the application again.
<br />
if (result == DialogResult.OK)<br />
{<br />
<br />
}<br />
|
|
|
|
|
Figured it out. The quick answer is to simply fill the dataset again. However, if you have any filters elsewhere on the form that use the same dataset, be prepared to deal with exceptions. You must put some data back into the dataset before any calls to the filter are made. This was a big issue for me and took me about 8-10 total hours of debugging to figure out. Then again, I am a complete noobie.
|
|
|
|
|
Glad you figured it out. But you may want to take a look at Update Controls .NET. These controls update themselves from your own data objects, not from datasets. So when you add your customer object to your list, it would automatically refresh the drop down.
|
|
|
|
|
Thanks for the link. I have checked it out and I will at least experiment with some of those controls.
|
|
|
|
|
Hi --
I'm building a GUI application in Visual C++ 2003 using the drag-and-drop Windows Forms toolbox. Does anyone know a way to build docked windows/forms (tabbed windows) into an application? I'm aiming for a look similar to the docked windows in, for example, visual studio.
Thanks in advance!
Kim
|
|
|
|
|
|
These are great controls. I have used them in the past and they are very easy to work with.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
How do they work with Visual c++.net (2003 or later).
Thanks,
Kim
|
|
|
|
|
I have only used them from C#, but if you are doing managed C++ development they should work the same way. I have used them in VS2003 and VS2005 and both have worked great.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
As Richard pointed out, the controls from Divelements are great. They have a very simple programming model and a polished look to them.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
|
You could also take a look at DotNetBar[^]. They are very good, plus they support a wide variety of styles.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
I am developing a software for winforms in VS 2005, but the GUI design is done by someone else. I can't let the designer to enter my source code for many reasons. Is there any tool that I can use to design my GUI without accessing the code ?
Thank you,
Yuval
|
|
|
|
|
You can use visual inheritance.
The designer change the base forms that your code inherit.
Any changes to base forms (that contain no code) will reflect to your child forms.
|
|
|
|
|
This is exactly what WPF was designed to solve. Have a look at WPF and XAML.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
i want to bind datagried with an array list full by objects ?
|
|
|
|
|
The easiest way to bind a data grid with an array list (or any object container, for that matter) is to use Update Controls .NET. You can drop an UpdateGrid on your form and implement the GetItems event. This event just returns the array. Then implement GetCellValue to get the values to display. When the user changes a value, the control fires SetCellValue.
Here's an example:
private System.Collections.IEnumerable itemsGrid_GetItems()
{
return _order.Items;
}
private object itemsGrid_RowAdded()
{
return _order.NewItem();
}
private void itemsGrid_RowDeleted(object tag)
{
_order.DeleteItem((Item)tag);
}
private UpdateControls.Forms.ColumnDefinitions itemsGrid_GetColumns()
{
return new UpdateControls.Forms.ColumnDefinitions().
Add("Name", typeof(string)).
Add("Price", typeof(decimal)).
Add("Quantity", typeof(int)).
AddReadOnly("Total", typeof(decimal));
}
private object itemsGrid_GetCellValue(object tag, int column)
{
Item item = (Item)tag;
if (column == 0)
return item.Name;
else if (column == 1)
return item.Price;
else if (column == 2)
return item.Quantity;
else
return item.Total;
}
private void itemsGrid_SetCellValue(object tag, int column, object value)
{
Item item = (Item)tag;
if (column == 0)
item.Name = (string)value;
else if (column == 1)
item.Price = (decimal)value;
else if (column == 2)
item.Quantity = (int)value;
}
|
|
|
|