|
Make sure you've entered the correct machine name, and your user has the proper rights...
Please vote my message! Click on one of the numbers beside ' Rate this message'.
.: I love it when a plan comes together :.
http://www.zonderpunt.nl
|
|
|
|
|
Hello,
I am trying to create a 3 dialogs where i can pass as a parameter a directory path, and the user will only be able to browse through that directory and its subdirectories (the user won't be able to browse "up" or change drives).
Anyone who can help me through this? or maybe a link to a reference that I can check? I've been searching but can't seem to find the right Google keyword.
Thanks!
~Rafferty
|
|
|
|
|
You can create your own dialog using a treeview to display the top level directory, and display any directories within that directory, etc. You could use the System.IO.DirectoryInfo class to retrieve child directories in the top level directory, and to find subdirectories in those directories, etc...
HTH
|
|
|
|
|
|
hello everybody... im having some problems fixing two errors i get after following someones instructions given on how to save recorded audio as a WAV file... im curious to see if someone can help me...
this project is a combination of two different projects
this one: http://www.codeproject.com/cs/media/cswavrec.asp?msg=1743046 (you can see the message regarding combining the two projects at the bottom)
and this one: http://www.codeproject.com/csharp/CSharpRipper.asp
ive put everything into a zip file and threw it on my server here:
http://mike-soft.com/code/cswavrec.zip
i compiled it using microsoft visual c# express edition... where i get 11 warnings and 2 errors... the errors are as follows:
The best overloaded method match for 'Yeti.MMedia.WaveWriter.WaveWriter(System.IO.Stream, WaveLib.WaveFormat)' has some invalid arguments
and
Error 12 Argument '2': cannot convert from 'WaveLib.WaveFormat [C:\cswavrec\WaveNative.cs(25)]' to 'WaveLib.WaveFormat [c:\cswavrec\yeti.mmedia\bin\Release\yeti.mmedia.dll]'
any help is GREATLY appreciated, as this will be used in a small educational radio station
|
|
|
|
|
kb1ibh wrote: Error 12 Argument '2': cannot convert from 'WaveLib.WaveFormat [C:\cswavrec\WaveNative.cs(25)]' to 'WaveLib.WaveFormat [c:\cswavrec\yeti.mmedia\bin\Release\yeti.mmedia.dll]'
Looks like you have two classes called WaveLib.WaveFormat, and the instance you have, isn't from the place the dll is expecting.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
ive found two classes by that name
if you look at the solution, there are two projects within it, one which has a reference to the other, and the class exists within both of those projects, but the class is exactly the same in both... i dont know if that would cause this...
|
|
|
|
|
Yes, it does. Doesn't matter that they are the same - they are two different classes that, right now, happen to have the same implimentation. Delete one from the project, work on it until it will build again ( so always reference the other one ), and it will work
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
[Serializable]
public class SpecialOccasionsItem
{
private int id;
private string mediafile;
public int ID
{
get{return id;}
set{ id = value;}
}
public string MediaFile
{
get {return mediafile;}
set{mediafile = value;}
}
public SpecialOccasionsItem()
{}
public SpecialOccasionsItem(int itemID, string mediaFile)
{
mediafile = mediaFile;
id = itemID;
}
}
in the webservice there is the methed
[WebMethod]
public List<SpecialOccasionsItem> GetSpecialOccasionsCollection()
{
List<SpecialOccasionsItem> il = new List<SpecialOccasionsItem>();
return il;
}
In the application that requests this web methed
*I get a can't cast exception*
public List<SpecialOccasionsItem> GetSpecialOccasionsCollection()
{
try
{
List<SpecialOccasionsItem> il = new List<SpecialOccasionsItem>();
Array Gsoc = se.GetSpecialOccasionsCollection();
for (int i = 0; i < Gsoc.Length; i++)
{
il.Add((SpecialOccasionsItem)Gsoc.GetValue(i));
}
return il;
}
catch { }
}
|
|
|
|
|
AFAIK, it is not possible to pass the custom object by using this attribute "Serializable". In our project, we used to pass the custom object from web application to web service. (there is one debate about "passing custom object vs passing individual parameter") In order to do that, we have to put XML Seriablzable attribute (as same as the one generate for Proxy Class) in custom class instead of "[Serializable] "
F16I wrote: In the application that requests this web methed
*I get a can't cast exception*
It is probably because of one auto-generated class in your proxy class..
Please check your proxy class of your webservice.. I believe that there are one class like that in it..
public class SpecialOccasionsItem<br />
{ <br />
public int ID;<br />
public string MediaFile;<br />
.... <br />
}
If I'm right, please comment this class.. copy the attributes from this class. and paste them at the top of your class..
Let me know if you are not clear...
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Array Gsoc = se.GetSpecialOccasionsCollection();
Doesn't this web service call return a List<specialoccasionsitem>? Why are you trying to assign it to an array?
Where is the InvalidCastException being thrown? Is it this line?
|
|
|
|
|
Well I got it to work,
it look like the auto-generated webservice created a class for my custom class
|
|
|
|
|
How to upload an image using C# 2003?? Please give me.. code for reference...
who i am? i am....
|
|
|
|
|
|
How to do this.
When user stores something in clipboard, my program to store that in a text file.
Please help.
Thanks.
C#
|
|
|
|
|
|
Thanks, but I don't want to check every second the clipboard.
That should be something like an event, when the clipboard content is changed, then the program to store the data somewhere.
C#
|
|
|
|
|
Hi,
the clipboard is a unique system-wide resource; it is accessible through the
Clipboard class which has several methods, but no properties and no events.
other unique resources (such as keyboard and mouse) are associated to a single
process and a single control at a time, clipboard is different.
SO the only solution would be to periodically poll it, check for text,
compare with previous text, etc.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
|
plz how can i read a string from a txt file then insert it in a database table using C# in visualstudio2005 ?
|
|
|
|
|
Try the following projects...
To read a file.
Insert into a database
Above are two code projects that were quite easy to search for. If you combine the concepts and examples from the two projects, you'll get the answer you need. If you had been more specific about a single problem, you probably would have got a source code answer for that problem.
Hogan
|
|
|
|
|
Hi,
you can read the text in bytes and then insert the bytes (search on google:write blobs in database) in database.
-- modified at 5:19 Thursday 23rd August, 2007
|
|
|
|
|
I am planning on making the dialog for the custom settings for a software.
On the dialog, on the vertical left side, there would be the listbox showing "password", "Wired", "RF", "Save Folder Location" stuff like that on the list box.
Now, in the group box, I would have the different components showing in the groupbox on the right side, depending on the selected item on the listbox.
Should I use groupbox[], and the index in [] be based on listbox selected index?
Should I call a method, based on the listbox name so it would dispose the existing group box and generate a new one?
I hope this is not confusing...
|
|
|
|
|
I'd create a user control that displays the properties of each aspect of your software. Then, swap in (make visible, set position) the appropruate panel on the right of the list box when the selection changes. You'll need to prevent a selection change if validation of the currently displayed panel fails.
/ravi
|
|
|
|
|
Hi,
the easiest approach for showing a lot of groupable settings, is by using a
Tab Control with several TabPages. The tabs would be organized horizontally then.
If you really want it with the tabs to the left, I suggest you build your own
Tab Control look-alike.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|