|
As I suspected, you were trying to use the new PIAs more than likely. If you use the Office XP PIAs, you should be able to work with both Office 2002 and Office 2003 since following COM guidelines can help ensure then COM interfaces are backward compatible, which Microsoft does a pretty good job of doing (since they wrote the specs).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Ok,
got it.
Using a vss file as a container of the controls.
Thanks for baering with me!
|
|
|
|
|
I'm working with DataGrid in winforms application. I need to set focus() to a specific cell in the DataGrid.
I used the CurrentCell property to set the cell focus:
private void ColumnChangingHandler(object sender, DataColumnChangeEventArgs args)
{
switch (args.Column.ColumnName)
{
case "acsID":
{
string value = args.ProposedValue.ToString();
if (!IsNumber(value))
{
SetCellWithFocus(this.dataGrid2);
dataGrid2_GotFocus(sender, args);
}
break;
}
}
}
private void SetCellWithFocus(DataGrid myGrid)
{
myGrid.CurrentCell = new DataGridCell(1,1);
}
private void dataGrid1_GotFocus(object sender, EventArgs e)
{
MessageBox.Show(dataGrid1.CurrentCell.ColumnNumber +
" " + dataGrid1.CurrentCell.RowNumber);
}
but the focus was returned in the next cell.
Please help me.
Thanks
Mr Duc Linh Nguyen
|
|
|
|
|
I don't have VS.NET to test it now but it seems it is zero based.
Mazy
"I think that only daring speculation can lead us further and not accumulation of facts." - Albert Einstein
|
|
|
|
|
How do we get the current path of the application?
|
|
|
|
|
Use the static property StartupPath of the Application class.
|
|
|
|
|
Simply: Environment.CurrentDirectory . Its a string so you can feed this to other objects like DirectoryInfo and Directory .
|
|
|
|
|
While I'm sure you probably mean what the other reply suggested (Application.StartupPath ), "current path" is not always the same directory as the application. It is the current working directory, and can be set on shortcuts to something different, or if you are in a command prompt in a different directory and type the path to the application. The directory you're in is the currenty working directory. It's important to be mindful of this fact.
To get the current working directory, you can get the Environment.CurrentDirectory . If you want the application directory to be the current working directory anytime your application starts, set this property like so:
Environment.CurrentDirectory = Application.StartupPath;
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Need to create and use custom attribute in Active Directory user account via LDAP.
Active Directory server works on Win2003 Enterprise.
How I can do it?
Thanks.
|
|
|
|
|
|
The articles that Mazdak's search lists don't explain how to add a custom attribute to the Active Directory schema, which is what you appear to be asking. For information on that, see How to Extend the Schema[^] on the MSDN. To get this schema extension attribute, you can use its name in the DirectoryEntry.Properties dictionary property.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Heath Stewart, thank you.
|
|
|
|
|
I have a class that is so long that I would like to split it into two or more files. Like keeping public methods and properties in one file and private methods and variables in another. Possible ?
|
|
|
|
|
Not yet. The functionality for this will be available in the next release though. (So, it looks like you'll have to wait a while)
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
Coming soon: The Second EuroCPian Event[^].
|
|
|
|
|
Hi
How do I change the Color of the client area of a form in MDI?
Thanks
Riaan
|
|
|
|
|
I'm sure you mean the client area of the MDI-Form. You have to use the Paint Event of the MDI-Form, get the rectangle of the Dark Grey Area and fill it with your Color.
Stefan
|
|
|
|
|
Hi,
does any one know the links to source code about audio or video chatting software developed in c#.
Thanks in advance
|
|
|
|
|
http://www.codeproject.com/useritems/direct_show_-_playa.asp
I hope that useful for you.
Mr Duc Linh Nguyen
|
|
|
|
|
here's the solution:
http://www.banasoft.net/AVPhone.htm
|
|
|
|
|
Is there any method of embedding VC++.NET code in VC#.NET Project and using the different functions declared in VC++ code in VC#.
CHEERS
|
|
|
|
|
Create a .NET assembly using Managed C++, wrapping any unmanged code into a managed class. In the C# project, reference the newly created assembly, and you'll be able to make full use of the MC++ managed classes.
Take a peek at Nick Parker's article[^] to get your started, or look through the list of Managed C++ articles here on CodeProject. There are some good examples there.
Hope that helps.
--Jesse
|
|
|
|
|
Using remoting, when an Image?Bitmap is transfered, it is recieved in "NativeImage" format, from which the Image cannot be got back.
Is there any other method of transfering Image using Remoting.
CHEERS
|
|
|
|
|
Typically, you serialize this to a byte[] array which marshals with no problems. This is also true for XML Web Services.
Another, much faster way (that doesn't require serialization, which will degrade performance) is to use DIME and the Web Service Enhancements (WSE), though you could implement DIME yourself pretty easily since the WSE isn't supported on Windows (only on Windows NT is it supported).
See DIME: Sending Files, Attachments, and SOAP Messages Via Direct Internet Message Encapsulation -- MSDN Magazine, December 2002[^] for a conceptual overview and links to many resources (including the DIME specs), as well as a link to the WSE[^] which already includes these extensions and can be integrated with .NET Remoting and XML Web Services rather easily (especially the latter).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I have a datagrid and a dataset...and naturally the source of the datagrid is a table in the dataset. When I type a value into one column, I would like to update the value of another column. For instance, if I was keeping track of items purchased in my table, and I enter the Quantity and Price in respective cells, I would like the next cell to calculate this value and show immediately. I have an expression string to do this in my dataset table, but the datagrid doesn't seem to add the row until I have physically scrolled through all of the columns in the row...so the Total cell doesn't get updated until I actually navigate through it and into the next row. Can I put an expression on the column in my datagrid somehow, or manually do the calculation and set the value into the correct cell? Thanks for the help on this.
|
|
|
|
|
Do you mean DataTable.DisplayExpression and DataColumn.Expression property?
Mazy
"I think that only daring speculation can lead us further and not accumulation of facts." - Albert Einstein
|
|
|
|