|
Sure, Win32_Directory[^]. But why would you want to??? This is kind of the Rube Goldberg method of copying files. It has limited functionality, such as it won't over-write the destination file if it already exists.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
we are using microsoft Office 9.0 Library & COM namespace is OWC
TextBox1.Text = xlsheet.ActiveSheet.Cells[i,1];
While writting this code it is not converting to object to string but in reverse case it is working properly uploading to spreadsheet.
//This is the Error
Error: Cannot convert Object to String
So pls convey this & let me know the solution for the above problem.
I m using asp.net with c# coding.
Thanking u,
Naren.
please help me
|
|
|
|
|
Try this:
TextBox1.Text = (string) xlsheet.ActiveSheet.Cells[i,1];
Best regards, Alexey.
|
|
|
|
|
TextBox1.Text = xlsheet.ActiveSheet.Cells[i,1].ToString();
Every object in .NET has a .ToString() method
-- modified at 7:45 Friday 21st April, 2006
|
|
|
|
|
Hi
Thanks for sending Reply.
TextBox1.Text = xlsheet.ActiveSheet.Cells[i,1].ToString();
& also
TextBox1.Text = (string)xlsheet.ActiveSheet.Cells[i,1];
But i used this, its not working.
Pls give any idea.
Once again Thanking u,
Naren
please help me
|
|
|
|
|
All solutions are incorrect.
Correct code:
<br />
Excel.Range cell = (Excel.Range)m_workSheet.Cells[x + 2, y + 1];<br />
string st = cell.Text.ToString();<br />
Best regards, Alexey.
|
|
|
|
|
Hi Alexey
Thanks a lot for immediate reply.
Its giving an exception as "Specified Cast is not valid".
Now i m getting this problem.
Thanking u,
Naren
please help me
|
|
|
|
|
I hardly ever do Office Interop, but the Cell[,] returns a Cell, which has, IIRC, a Value property, soooo...
TextBox1.Text = xlsheet.ActiveSheet.Cells[i,1].Value.ToString();
might be what you're looking for, or something very close to it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello all,
Does anyone know of any way of calling functions in a VB6 exe, from code in C#? Is this even possble? I don't know much (if anything!) about VB6 so I'm a bit confused. I've managed to call functions in a VB6 dll, but is the same thing possible with exe's too?
As always, any help at all would be greatly appreciated!
Thanks
Shehzad
|
|
|
|
|
Nope. VB6 .EXE's don't support export functions, so you there's really nothing to call. .DLL's on the other hand, you've already found out.
The only exception to this would be if the VB6 .EXE is an ActiveX Server, which has all kinds of exports, just like any other COM-based assembly. Just add a COM reference to your .EXE and you're just about all set.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi all, I'm using component WebBrowser in my Windows Forms application (Framework 2.0), thus I need to block WebBrowser shortcuts (such as F5).
When I set WebBrowserShortcutsEnabled property to false, all shortcuts are blocked, but also it blockes "Delete" key.
Is there simple way to block "F5" without blocking "Delete"?
Thanks in advance.
Best regards, Alexey.
|
|
|
|
|
Thank's for attention ! i've founded solution.
It's simple: use of event PreviewKeyDown:
private void OnPreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
{
if (e.KeyCode == Keys.F5)
{
e.IsInputKey = true;
}
}
Best regards, Alexey.
|
|
|
|
|
Is there a way to open an outlook .msg item saved on my hard-drive and read data from it (such as the attachments)?
Mike - I love to program!
|
|
|
|
|
Try use Microsoft COM objects, like working with Excel or Word.
Best regards, Alexey.
|
|
|
|
|
Hi.
I need article about basic concepts of Remoting in .NET and the application of it.
I don't know anything about Remoting(the article may be in this level, please)
Best wishes
|
|
|
|
|
http://www.codeproject.com/csharp/#Remoting
good starting point
g00fy
|
|
|
|
|
|
This is part of web development im afraid. Different browsers interpret HTML in slightly different ways and getting to know all the nuances of browsers is part of being a developer.
You often have to do some slight tweaks/hacks in your HTML, CSS and even javascript to get your page working as you are happy across all browsers.
|
|
|
|
|
hi all,
i have an application that i am trying to 'port' to be more usable by accessing properties via the prop grid in VS IDE.
i have a function in my component that needs two callback functions (which the component provides delegates for) which it calls in the owning application to get/set a string in that application, how can i allow the programmer to select these functions through the property grid?
if i set the type of the property to the delegate, the propertygrid makes it readonly.
i have provided sample bare code to illustrate the calling applications functions
i would like to move the delegate declarations into designer generated code.
public Form1()
{
InitializeComponent();
this.updater1.GetProductVersionFunction = new AutoUpdate.UpdateClient.GetVersionString(GetApplicationVersion);
this.updater1.SetProductVersionFunction = new AutoUpdate.UpdateClient.GetVersionString(SetApplicationVersion);
}
public static string GetApplicationVersion()
{
return "version";
}
public static void SetApplicationVersion()
{
}
}
any help please would be awesome.
kind regards,
g00fy
|
|
|
|
|
i would like to enumerate functions in the owning form, when the component is dropped into it and populate a ddl for each property with those functions in the form that match the delegate.
... or ...
when i type a name into the prop box the code is generate to create the function that matches the delegate.
i am googling but am coming up short.
kind regards,
g00fy
|
|
|
|
|
UITypeEditor is the answer. For every type you can define an editor which should be shown when it is edited in the property grid. Normally the property grid resolves one of the inbuilt ones which can edit the type but in case of a delegate it just doesn't find one. So you have to built one on your own. In general you 'just' have to inherit from UITypeEditor and mark the delegate with this class (Editor attribute)). This can become very tricky. I would recommend to use Reflector to look at one of the inbuild editors (DockStyle and DockEditor are probably a good one to start). You could also look into this[^] because it deals with this topic.
Edit: To be honest I never tried this with a delegate. I hope there are no limitations in regard to this. If yes you would have to provide a wrapper class for the delegate.
|
|
|
|
|
Not to sure, but I think the property grid relies on the existance of a System.ComponentModel.Design.IEventBindingService service. To do that u need to:
1. Implement the interface yourself.
2. Add it to the IServiceProvider
NOTE: if u doing this at runtime, then you will likely need to provide all the design time services yourself.
|
|
|
|
|
Hi every body
I want to get component Toolbox "Docking Panel (with Auto-hide)" of viusal Studio (2003 or 2005)
some body help me
thanks
|
|
|
|
|
you want to access the toolbox in the IDE or you want something like this?
http://www.codeproject.com/cs/miscctrl/dockingmanagerextender.asp#xx1296865xx
if its the latter try the links at the bottom of that article or the article itself or google 'docking panel + c#'
hth
g00fy
|
|
|
|
|
Hello
I want to make a program that can create and unpack a encoded '.rar' or '.zip' document.
I have found a dll to download from rarlab.com, but it will not allow to unrar files with password.
Does anyone know where an good article about using the encoded '.rar' and '.zip' documents, or does anyone know where to get a freeware dll which already contain the functions with pack and unpack files with password.
Thanks
QzRz
|
|
|
|