|
what do you mean by Page scope variable?
private CustomCollection variablename = new Customcollection();
Is it what you need ?
|
|
|
|
|
I didn't really get what it is you want either. Please provide more info.
|
|
|
|
|
I wanted to use a quickfix FIX Engine APIs in one of the application for Real Time DataFeed from Exchange. Does any one have sample program that uses quickfix APIs in .Net or can provide any help on this? Thanks.
|
|
|
|
|
How can I accept speech or voice from the user?
|
|
|
|
|
You'll need to use a speech recognition API (hint: Vista and Win7 have one built in)
|
|
|
|
|
use
System.Speech.Recognition namespace to handle this..
For this you need to add System.speech.dll to your solution.
|
|
|
|
|
I have small mystery I've been trying to figure out, which I believe can be solved by delegates in c#, but I could be totally wrong.
Here is the dilema.
I have class A. Class A has a method Foo. Foo will have a set of instructions. However, I am trying to add the ability, during runtime, based on certain conditions, replace the instructions executed by Foo, but only for one particular instance of class A, and only to be executed once before reverting to default behavior.
As I understand delegates with what I've been reading so far, this is what I've tried to do. I declare Foo as a delegate, and another method called DefaultFoo. Elsewhere in the code an anonymous delegate is created and assigned to Foo. After it is executed, Foo is set back to DefaultFoo.
Obviously this doesn't even make it past the compiler. I can't figure out the correct syntax, or if I'm even going about the goal in the right direction.
I would appreciate any and all assistance.
|
|
|
|
|
Do you mean something like this:
using System;
class Program
{
static void Main(string[] args)
{
A a = new A();
a.PerformFoo();
a.UseDefault = false;
a.PerformFoo();
Console.ReadKey();
}
}
public class A
{
private delegate void FooDelegate();
private FooDelegate fooToUse;
private bool _UseDefault;
public A()
{
fooToUse = DefaultFoo;
}
public bool UseDefault
{
get { return _UseDefault; }
set
{
_UseDefault = value;
if (_UseDefault)
fooToUse = DefaultFoo;
else
fooToUse = OtherFoo;
}
}
private void DefaultFoo()
{
Console.WriteLine("Default");
}
private void OtherFoo()
{
Console.WriteLine("Other");
}
public void PerformFoo()
{
fooToUse.Invoke();
}
}
|
|
|
|
|
Yes! Thank you very much. That solves my problem beautifully.
I was definitely declaring the delegates wrong, and I had never heard of Invoke. This will make things so much easier. Thank you again.
|
|
|
|
|
Invoke is strictly necessary by the way - you could just call fooToUse(); .
|
|
|
|
|
Hi,
I have an assembly abc.dll which is in GAC with version 1.0.0.0. A client application is using it. Now a new version of that assembly has come - abc.dll, version 1.1.0.0. I want the client application to use it without re-compiling it.
So i added the new assembly in GAC, opened .Net 2.0 Configuration tool from control panel, added the client application to Applications tab and in configured assemblies i added abc.dll and went to Binding Policy tab and gave:
Requested version: 1.0.0.0
New version:1.1.0.0
But still when i run the program, i get the error:
Could not load file or assembly 'abc',version=1.2.0.0,culture=neutral,.....
Do i need to make any other settings for it to work? please help me!
Thanks.
|
|
|
|
|
Well I think the abc.dll version is 1.2.0.0 and not 1.1.0.0. Maybe you are missing the new assembly version.
|
|
|
|
|
The version of new dll is 1.1.0.0 only. The problem is it is searching for the new version dll with the old public key token i.e. Version=1.1.0.0 and PublicKeyToken of the old version. how to make it look for the PulibKeyToken of the new version?
|
|
|
|
|
Hi
I’m trying to develop an application for nokia s40/s60 which will manipulate a 160 char text message when messages arrive into the hand set. Currently I m considering symbian OS only…
I need your help, valuable suggestions, and guideline on how to start. Please cooperate...
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
Thanks
Md. Marufuzzaman
|
|
|
|
|
|
Thanks...
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
Thanks
Md. Marufuzzaman
|
|
|
|
|
Please do not cross post. You have posted this (correctly) in the General IT Issues.
CCC solved so far: 2 (including a Hard One!)
|
|
|
|
|
Thanks for the suggestions...
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
Thanks
Md. Marufuzzaman
|
|
|
|
|
Hi,
I want to build one MFC dll which will act as a server using socket or any other concepts...
And then want to build one windows application using c# which will act as a client. If i click a button from the c# application, one of the server function want to invoke!.. Is it possible? If anybody know, please guide me...
Thanx in advance
Surez
|
|
|
|
|
MFC ???
This is C# WinForm, not MFC forum...
|
|
|
|
|
sorry! i'm having MFC dll, which act as a server by the way of socket concept. Could i communicate that server from my c# application?
|
|
|
|
|
You already asked this question in the C++ forum. Please follow the rules.
|
|
|
|
|
|
Hi,
yes it is possible to communicate with C# via sockets. Have a look at this article (scroll down to the middle to find the interesting socket part.
A Simple Crawler Using C# Sockets[^]
More interesting than the server is using sockets is the protocol the server speaks. So what command do you have to send to let the server do this or that. Keep that in mind while programming.
Regards
Sebastian
|
|
|
|
|
Hello I have created an application with windows form which display the camera connected to my PC via BNC.
With one of my camera everything's fine but with another one the picture is Black and white and sometimes it display pixel sh*t.
I want to know if I can change the settings for the second camera (change PAL to NTSC, color, frequency...) with my program, I display the camera with the user32 and avicap lib and I already look for all the parameter I can send in the SendMessage method. (WM_CAP_DLG_VIDEOSOURCE, WM_CAP_GET_VIDEOFORMAT and so on)
Can anyone help me?
|
|
|
|