|
Well after some searching in the MSDN library I found some thing that does what I want.
The MSDN libraray states that you sould create an state object and this holds the data received.
It will read until the buffer is empty and will then restart the receive procedure.
|
|
|
|
|
I want to play movie on our pc and display on tv using video card.
mean to say playout video (code in c# and vb.net or any .net product)
i wana script
|
|
|
|
|
I think that is called Windows Media Player.
|
|
|
|
|
I need Run Movie On Tv Using Video card
Topic Directx 9
Code In C# or vb.net
i wana script
|
|
|
|
|
hi
How to visible the events associated to control in C#.NET like right side top in vb.NET
If u have any idea regarding this please help me
venky
|
|
|
|
|
i am facing video streaming problem
my requirment is out video mpeg using snazzi video card
code should be in c#,vb.net
Regards,
Shakil Ahmed
i wana script
|
|
|
|
|
I don't have script. You can ask Google for that.
|
|
|
|
|
I tried it, but I don't get any problem. I tried it using ASCII and Unicode, there are no escape sequence in it. I take the sample from MSDN. It use:
reader.WhitespaceHandling = WhitespaceHandling.None;
to remove the space character in it.
What kind of escape sequence did you get ?
|
|
|
|
|
Hi all,
i am trying to change app settings in run time. I wrote the code below:
Properties.Settings.Default.ServerIP = "10.0.0.7";
Properties.Settings.Default.Save();
MessageBox.Show(
Properties.Settings.Default.ServerIP
);
It alerts "10.0.0.7" but does not save the value (default value was 10.0.0.12). And in WindowsApplication1.exe.config file, it is still 10.0.0.12. Does anyone know how can i change this value?
Thanks...
ozgur.nevres
|
|
|
|
|
i found the problem.
If i make any changes in my application, and build it, it re-creates the user.config file in Application Data folder with default values.
can i force the VS to re-create the file with changed values?
thanks...
ozgur.nevres
|
|
|
|
|
Hi,
I'm buidling a forms application in which user settings can be stored and loaded from a file. So far so good. Now I'm trying to load a file of this type made by another user on another computer. It seems this causes some kind security problem:
System.UnauthorizedAccessException: Access to the path 'C:\dotnet\myapp\bin\Debug\settings\defaults.set' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.IO.File.Open(String path, FileMode mode)
The file in question is created simply as:
Stream stream = File.Open(filename, FileMode.Create);
BinaryFormatter bFormatter = new BinaryFormatter();
stream.Close();
Why am I getting this error and does anyone know how to solve it?
|
|
|
|
|
It most likely inherited rights from the parent folder, and got transfered somehow.
Are you using Vista btw? I have seen the same thing happen there without explaination.
|
|
|
|
|
No, I'm not using Vista, but this would be a reasonable explanation: I think the user that created the file had the application installed into a folder on his desktop, which could mean the rights to his desktop stick to the file. Can anyone confirm this?
|
|
|
|
|
Definately a permission issue. If you run as Adminstrator you can take ownership and change the permissions, but else you out of luck. I doubt there will be any way to circumvent this security for a non admin user or the original creator of the file.
|
|
|
|
|
|
|
Hi,
I tried to save some information in an user.config file. I tried to save a hashtable, but it doesn't work. Thats why I tried to save an arraylist and it works. After that I would like to save a NameValueCollection, but this isn't saved like the arraylist?!?! WHY????
[CSHARP]
public System.Collections.ArrayList Setting
{
get
{
if (mySettings == null)
mySettings = new Specifications.Settings1();
return mySettings.Table;
}
set
{
if (mySettings == null)
mySettings = new Specifications.Settings1();
mySettings.Table = value;
mySettings.Save();
}
}
public System.Collections.Specialized.NameValueCollection Setting2
{
get
{
if (mySettings == null)
mySettings = new Specifications.Settings1();
return mySettings.Table2;
}
set
{
if (mySettings == null)
mySettings = new Specifications.Settings1();
mySettings.Table2 = value;
mySettings.Save();
}
}
[/CSHARP]
|
|
|
|
|
As I read somewhere else, the type namevaluecollection doesn't support xml serialization. thats why it doesn't work.
Does someone know, if there is another type, which supports xml serialization and can be used like namevaluecollection?!?
|
|
|
|
|
Use the object browser to view the different classes in System.Collections to find out which collections implement ISerializable.
|
|
|
|
|
I'm trying to manually create an Isolated storage which is associated with a particular type.
IN a pseudo code like that
using System;
using System.IO.IsolatedStorage;
class AType
{
}
class ISTest
{
public static void Main(string[] arg)
{
Type t = typeof(AType);
IsolatedStorageFile isf = IsolatedStorageFile.GetStore(
IsolatedStorageScope.Assembly | IsolatedStorageScope.User,
null,
t.Assembly.Evidence);
Console.WriteLine("Done");
}
}
That throws undecypherable error.
I try to use reflector to see what:
IsolatedStorageFile.GetUserStoreForAssembly()
does, but I was none the wiser... :-/
Any tip on how to create IsolatedStorage associated with an arbitrary assembly (given as an argument)?
|
|
|
|
|
How about IsolatedStorageFile.GetUserStoreForAssembly() ? Or from Reflector, remove that 't.Assembly.Evidence' bit and replace with null .
|
|
|
|
|
Not so
Because I write this code in a utility class to read / write / store configuration file.
<t>IsolatedStorageFile.GetUserStoreForAssembly() will use the assembly where this utility method is written instead of the assembly that try to save its conf file!
Do you see what I mean? I'm not sure to be clear...
|
|
|
|
|
I have a method that accepts an SQLDbType and an object.
I would like it the check if that object can be cast into the SQLDbType.
like so:
<br />
public void Thingy(SqlDbType dataType, object value)<br />
{<br />
if ()<br />
{<br />
}<br />
else<br />
{<br />
}<br />
}<br />
How would i go about doing this ?
Thanks.
|
|
|
|
|
Hi,
if (value is SqlDbType) {
}
|
|
|
|
|
Thanks ,
My next questions is:
So how then would I cast it to the specific data type of dataType (passed as a method argument/parameter)?
<br />
(dataType(value)) does not seem to work
nor does
<br />
(SQLDbType.dataType(value)) <br />
Cheers.
|
|
|
|