|
|
Thanks...
Not realy what I expect, but it can work without strange exceptions
Good Luck
Alex Kucherenko
|
|
|
|
|
Anyone know how to burn CD's using C#?? Does MS have an .NET or API for this? Thanks!
|
|
|
|
|
Its called IMAPI. Its based on COM. You might have to write a wrapper for .NET. I remember seeing a sample using this API on www.gotdotnet.com. Check under C++ Samples.
|
|
|
|
|
Yeah I did do a little research about IMAPI. Unfortunately, I know ZERO C++ and I'm dissapointed in the fact that CD Burning Classes were not introduced into the .NET Framework. WindowsXP has had built in burning for a while. Hopefully they'll add it with .NET 2.0.
|
|
|
|
|
I would like to access a legacy ms sql 6.5 database from a c# application. When I execute the connect method, it tells me only 7.0 and above are supported. Does anyone know a way around this?
|
|
|
|
|
Use ODBC.NET instead of the pseudo-native SQLServer .NET data provider.
|
|
|
|
|
Hi,
How can I determin If I run on a 9x or a NT-based box?
I need to query some ugly registry keys that differe between the two...
Italian is a beautiful language. amare means to love, and amara bitter.
sighist | Agile Programming | doxygen
|
|
|
|
|
System.Environment.OSVersion.PlatformID != System.PlatformID.Win32NT
(use .NET SDK WinCV.exe to browse the CLR features by keyword (the resultset is often better and richer than the MSDN7's index)).
|
|
|
|
|
Thanks! Someday I'll find my own way around the CLR...
(winCV seems a cute tool, but wouldn't have helped me here...)
Italian is a beautiful language. amare means to love, and amara bitter.
sighist | Agile Programming | doxygen
|
|
|
|
|
I have treeview in my application.How can I delete a node when I have its FullPath ?
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Given the actual implementation of the FullPath property :
private void GetFullPath(StringBuilder path, string pathSeparator) {
if (this.parent != null) {
this.parent.GetFullPath(path, pathSeparator);
if (this.parent.parent != null)
path.Append(pathSeparator);
path.Append(this.text);
}
}
the only way to Remove a TreeNode based on its FullPath is to parse it and browse the parent/children hierarchy with a recursive routine, seeking the actual TreeNode.
|
|
|
|
|
I got the point.Thank you very much.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Does anyone know how to send keystrokes/mouse clicks remotely? (aka pcAnywhere)? For example, i have a client connecting to the remote host, can view the remote desktop and run a program (let's say defrag) and want to send a mouse click / keystroke across (using co-ordinates i suppose) to allow the end user to "control" the remote pc. Is there a sample code for this or is it even possible in C#?
|
|
|
|
|
you would need to have some service executing on the remote pc to proxy the commands for you.
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Hey folks - hope you can help me!
OK - in VB I can do this:
Dim x as Object = CreateObject("Word.Application") Is there a similar thing in C#? (without creating version dependencies - I want to link to either Word 2000 or XP?
Thanks!
--
Andrew.
|
|
|
|
|
At least two ways :
1- integrate interoped assemblies by just right-clicking on the References item, then add a reference to the Word type-library. (msoxxx.dll). MS distributes reference Office assemblies known as PIAs.
2- explicitely ask the CLR to create wrappers for the COM type-library :
- Type t = Type.GetTypeFromProgID("Word.Application");
- WordObject obj = Activator.CreateInstance(t);
Unfortunately, with the obj running, you have no object model to play with. You need to create a wrapper : look Marshal.CreateWrapperOfType(...).
|
|
|
|
|
Thanks - the second method was just what I was looking for! I've not done much C# yet (only just got hold of the final release of VS.NET) but have got a small project that I thought would benefit nicely from .NET.
--
Andrew.
|
|
|
|
|
is this correct regarding delegates (?) :
if you have a usercontrol , and make it listen to the parent containers mousemove events (say it hooks itself to the parent in the "parentchanged" event)
will the mouse event handlers create a strong ref from the parent to the usercontrol?
(i beleve it does)
the problem if so , is if you remove the usercontrol from its parent , and loose all references to it. (the only valid ref still alive is the delegate target in the parents mouse event)
now , will this usercontrol be garbage collected?
(i beleve it doesnt , since ive profiled this with a mem profiler)
is all the above correct?? , and if not , how come are the usercontrol still alive and kicking when profiling ,even if i have called gc.collect() after loosing all refs.
do i really HAVE TO call .Dispose() on my usercontrol before dropping all refs to it?
and if so , is that really good/standard windows forms coding practice?
according to msdn you should NEVER call .dispose() unless the target holds valuable resources such as gdi objects , file pointers etc , and never ever do it if you are simply dealing with managed code..
//Roger
ps.
if you add a Console.Writeline("blah") to the destructor and dispose you can clearly see that they does NOT fire when the usercontrol have attached itself to some parent container events ,
while if you remove the eventhandlers , finalize and dispose fire just fine...
|
|
|
|
|
I think the solution is that if your usercontrol hooks itself to the parent's events it should also unhook itself. If you remove the control from its parent the control will get a ParentChanged event and the Parent will now be null. For example, the following code within the user control seems to work:
private Control parent = null;
private MouseEventHandler meh = null;
private void UserControl1_ParentChanged(object sender, System.EventArgs e) {
// Unhook from previous parent (if any)
if (parent != null) {
parent.MouseMove -= meh;
}
// Remember new parent
parent = Parent;
// Hook new parent (if any)
if (parent != null) {
if (meh == null) meh = new MouseEventHandler(parent_MouseMove);
parent.MouseMove += meh;
}
}
Chris Jobson
|
|
|
|
|
Hi.
I have an app that populates a ListView when files are selected via a file dialog. Selecting one or more items in the ListView and 'editing' them activates another Form that then (should) populate its ListView from the selected items in the main form that called this form. I run into an error when doing so (at run time) because the Collection of ListViewItems can't be added into a second ListView. I would like to avoid removing the items from the first listview, adding them to the second listview (which I tried and it works), and then run into the hassle of adding the 'edited' items back to first listview when the second form is no longer needed, and therefore closed.
I tried reading through many posts to find a solution to this little problem I am having, and have inferred that binding a data source to 2 ListBoxes also presents this problem, however I didn't attempt implementing any solution with listboxes.
Any direction would be appreciated. Thanks for reading this.
|
|
|
|
|
hi!
I try to create an new anchor Element with this line...
> mshtml.HTMLAnchorElement YYY = new mshtml.HTMLAnchorElementClass();
(I added mshtml,...)
and the following error occurs...
"An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in xcwrapper.dll
Additional information: COM object with CLSID {3050F248-98B5-11CF-BB82-00AA00BDCE0B} is either not valid or not registered."
what is wrong here?
anyone any idea? (I stuck here since a week
|
|
|
|
|
HTMLAnchorElement is a read-only class, ie it's used to reflect the properties of an EXISTING anchor in the current document.
To add a new anchor, the easiest way is to use either document.write() (which means you don't necessarily control where the anchor is inserted), or better, use the children/parent element hierarchy and then, use HTMLElement.insertAdjacentHTML("<a ....").
|
|
|
|
|
Hi, I finished my project and want to make a setup project for this. I made my configurations and want to build and i come across an error which is "dotNETFXRedist_x86_enu.msm must not be used to redistribute the .NET Framework. Please exclude this merge module." When i exclude this module everything is ok but on the client machine the setup project asks for a NET Framework download. How can i make this setup project in a way that don't want the framework download on a client machine???
Thanx for reading...
|
|
|
|
|
Hi All,
I am a student new to C# and was hoping someone can help please...
I am trying to create a program where the users can dynamically add controls like, textboxes, comboboxes, labels, buttons etc. to a tabcontrol.
The number of tabpages created is also controlled by the user.
The problem that I am having is trying to control all these controls etc. I was thinking that I would have a Collection (control array) for the tabpages and then another Collection for every tab page for all the controls on that tabpage. Is this the best way to do it?? or is there a better way to do it...
Any help will be seriously welcome this is more than stressing
Thank You.
|
|
|
|