|
|
can find article how to do it..can you help me
|
|
|
|
|
See if this helps
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_wrcore/html/wrwlkUsingXMLSchemaToPushTextToWordDocument.asp
Live Life King Size
Alomgir Miah
|
|
|
|
|
You can try brute force...you can use the ExcelSheet.Range method/property to access the cell value.
|
|
|
|
|
I have a combobox that displays a list of dynamically loaded "plugin" objects, using the code below:
Assembly ControlLib = Assembly.LoadFrom( Location );<br />
<br />
object objPlugin = ControlLib.CreateInstance( ControlName );<br />
<br />
cboList.Items.Add( (IFTPlugin)objPlugin );
I have set the combobox "DisplayName" property to "Caption" (a member of the IFTPlugin interface), but it always calls ToString on the object instead and shows the assembly name instead of the friendly name.
I know that the object is loaded correctly, and that the "Caption" method is working, because I can call the following code and get the expected result:
string strCaption = ((IFTPlugin)objPlugin).Caption;
Rather than override the objects ToString function, is there a way to get the combobox to correctly call IFTPlugin.Caption ?
Thanks for your help.
The StartPage Randomizer
|
|
|
|
|
Make sure to override "ToString()" method of the object you're adding to the dropdown. The dropdown will display the value returned by ToString and thus you dont need to set the databinding.
So ...
<br />
public class User<br />
{<br />
string _fname;<br />
string _lname;<br />
public User(string FName, string LName)<br />
{<br />
_fname = FName;<br />
_lname = LName;<br />
}<br />
public override string ToString()<br />
{<br />
return string.Format("{0}, {1}", _lname, _fname);<br />
}<br />
}<br />
<br />
private void form2_Load(object s, System.EventArgs e)<br />
{<br />
User[] arUsers = new User[2];<br />
arUsers[0] = new User("John","Smith");<br />
arUsers[1] = new User("Jane","Smith");<br />
this.comboBox1.Items.AddRange(arUsers);;<br />
}<br />
hope this helps.
- Malhar
|
|
|
|
|
There is one more twist to it.
Thoughts:
Make sure Caption is a property and has Get and Set implemented.
Alomgir Miah
Live Life King Size
|
|
|
|
|
|
|
Hello, I have an interesting situation here.
I have a C# application called Aquisition.exe that uses a COM dll called reports.dll
The curioisty is that there are two versions of reports.dll - version 83 and version 103 and version 103 is registered on the machine.
Acqusition.exe 's manifest file refers however to version 83 - interop.reports.dll version 83. The interop.reports.dll refers to version 103 and it resides in the folder containing Acquisition.exe
There are no errors and it looks like version 103 is being used by Acquistion.exe even though its manifest refers to version 83.
Is this OK? Should there be a bug in the .NET CLR engine? Can I leave things be? Thanks for your thoughts.
RK
|
|
|
|
|
Hi!
I need a file explorer to be able to implement it in my application, but they all those that I have found do not take the sight in Mosaic that one sees in Windows XP. There exists free someone that is capable of showing this sight? If not, is it possible to do someone? Better that I have found it is the Pi-Sys Labs's .NET Folder View (http://www.pisyslabs.com/DiskObserver.aspx) but it isn't free.
I think that it uses the explorer that show the OpenFileDialog, and show it as a control. How can be done that?
Thanks and sorry for my bad English
|
|
|
|
|
Hello,
Is there a way of placing a groove line on the Form? I tried to look
something up in Customization of a ToolBox, but to no avail.
Thank you.
|
|
|
|
|
hey Zaboboa,
To draw a line in c#, you need to use a label.
//
// label1
//
this.label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label1.Location = new System.Drawing.Point(44, 68);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(100, 2);
this.label1.TabIndex = 0;
this.label1.Text = "label1";
Or if you really want, you can make a user control that will draw the line(s).
K.
|
|
|
|
|
Thank you, it really helped.
|
|
|
|
|
Does anybody know of a way to add a form to a container?
For example adding a form as a control of another form, but not using IsMdiContainer?
|
|
|
|
|
Set the TopLevel property of your "child" form to false. Then you can add it to any Controls container you want.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks, just what I needed!
|
|
|
|
|
If I run my remoting client, and during run time I temporarily lose my connection to the network, how can I continue on using remoting?
For example,
ServerObj theServerObject = RemotingServices.Connect("tcp://.../obj.rem");
theServerObject.DoSomething();
LanConnection.Zap();
LanConnection.ReEstablish();
theServerObject.DoSomething();
I've been banging my head against a wall over the last 2 days trying to figure this one out. Anyone have insight into why this is happening, or how to 'reconnect' to my server object? Even the least bit of info would be greatly appreciated.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Homosexuality in Christianity
Judah Himango
|
|
|
|
|
In my projects I'm using Activator.CreateInstance() to get my server objects.
One of them is explicitely marshalled in a server application, the other one is a SingleCall CAO.
I didn't experience any problems like this so far. When my server application is shut down, then all calls will naturally fail, but simply restarting the server brings everything back to normal, i.e. my client programs work as if the server never was gone.
Perhaps RemotingServices.Connect does something different than Activator.CreateInstance()...
Can you confirm that using Activator.CreateInstance() gives the same effect?
Regards,
mav
|
|
|
|
|
Hi every body.
I want to make report generator something like Crystal Report that uesr can make report at runtime.
Do something like resize,drag and drap,drawing lines...
If any one have an idea please lead me or if you have code about it please send it to me.(VB,C#,C++)
Thanks
Akbar
|
|
|
|
|
I just wanted to say that.....I dont have what you are looking for
|
|
|
|
|
Hi.
Did you work with Crystal Report ?
I want to write a program like to Crystal Report.I don't know how can I explaine it.
Any way thanks for your attention.
Akbar
|
|
|
|
|
How can I make it so that my datagrid columns span the width of my datagrid, when I get my dataset?
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
this.dataGrid1.SizeChanged += new EventHandler(this.OnSizeChanged);
private void OnSizeChanged(object sender, System.EventArgs e)
{
Trace.WriteLine("OnSizeChanged Event Handler.");
try
{
this.AdjustColumnsWidth();
this.AdjustDynamicControls();
}
catch (Exception exception)
{
if ( exception.InnerException != null )
{
MessageBox.Show(exception.InnerException.Message);
}
else
{
MessageBox.Show(exception.Message);
}
}
}
private void AdjustColumnsWidth()
{
foreach ( DataGridTextBoxColumn dgtc in this.dataGridTableStyle.GridColumnStyles )
{
dgtc.Width = 80;
}
}
Alomgir Miah
Live Life King Size
|
|
|
|
|
I think that you are miss understanding what I want. I want my datagrid to spread out the columns across the top of the grid depending on the number of tables.
Currently my code is setting a fix size but I cannot even get that working. Do you have any suggestions?
<br />
GridColumnStylesCollection gcsColl = StudenDataGrid.TableStyles["Student"].GridColumnStyles;<br />
for (int i = 0; i<gcsColl.Count; i++)<br />
{<br />
if (gcsColl[i].GetType() == typeof(DataGridTextBoxColumn))<br />
{<br />
DataGridTextBoxColumn textColumn = (DataGridTextBoxColumn)gcsColl[i];<br />
textColumn.Width = 150;<br />
}<br />
}<br />
<br />
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|