|
Sounds like a question best asked in the Visual C++ forum.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
hi all,
can somebody let me know what is Singleton Application in .net ?
what is the importent role of this Architecture?
Please help me...
Pavan Pareta
|
|
|
|
|
It is a way of saying that no matter how many times you run the app, it will only run once, only one instance of the app will ever be running.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
thanks
can you give me a simple example about it.
Pavan Pareta
|
|
|
|
|
The following code demonstrates the main concept:
class Singleton
{
private bool instanceExists = false;
private Singleton()
{
}
public Singleton CreateInstance()
{
if (!instanceExists)
{
instanceExists = true;
return new Singleton();
}
else
return null;
}
}
Singleton s1 = new Singleton(); //compiletime error, constructor is not public
Singleton s2 = Singleton.CreateInstance(); //success
Singelton s3 = Simgleton.CreateInstance(); //s3 will be null
|
|
|
|
|
Hey, I think your code is for singleton object, not for singleton application, as you may run this application many times and thus get many instances
I've found an CP article on singleton application: http://www.codeproject.com/cs/threads/SingletonApp.asp[^].
There are other approaches as well. The approach I prefer is using a named "memory-mapped file".
-- modified at 20:45 Thursday 11th January, 2007
Best,
Jun
|
|
|
|
|
How can I make my Web User Control have a custom display when it is viewed from the design surface? IE. When you place an Atlas extender on your page it renders a box at design time but not at run time. I want to be able to do the same sort of thing.
|
|
|
|
|
There's a property called IsDesignMode or something, you can check for that in a paint event.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Do you get a paint event for a web user control? I was thinking that you get the Render event
what would this be a property of?
|
|
|
|
|
I am not sure about the web user control but for a generic class inheriting from WebControl or Control (this is called a server control???) you can define a Designer class for your control that inherits from CompositeControlDesigner in the System.Web.UI.Design.WebControls namespace. Inside that class you can override the GetDesignTimeHtml() method and return whatever you want. Back in your class you will need to add [Designer(typeof(NameOfYourDesignerClass))] to your class.
|
|
|
|
|
Hi All,
I need to know whether Visual Source Safe works on VS.Net 2005 or not.
I'm migrating an application from .net 2003 to .net 2005 & want to know how to use source control in .net 2005
Thnx a lot
|
|
|
|
|
It works the same way in 2005 as it does in 2003.
only two letters away from being an asset
|
|
|
|
|
Hello!
I would like to capture video from a camera, but I just can't find information about it... I found some articles, but there are no explanations there...
Maybe anybody knows where can I find information about it?
Thanks in advance!
|
|
|
|
|
hi friends,
this is srichand.
well i am thinking of developing of an addin component in vb.net which will be as an plugin to outlook..
can any one help me regarding this isuue....
srichand.
srichand
|
|
|
|
|
hi srichand,
You can use the Visual Studio Tools for Microsoft Office Applications (VSTO) if you're developing for Office 2003. It's an add-on for Visual Studio 2005.
Talal
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
hi sultan
is any downloadable version for Visual Studio Tools for Microsoft Office Applications is available. if so can you send me that link please
thanks for ur suggestion and help
sri.
|
|
|
|
|
Hello again,
You can find VSTO here http://msdn2.microsoft.com/en-us/office/aa905533.aspx[^].
Hope this helps
Talal
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
hi sultan
thanks for your help..
srichand
|
|
|
|
|
hi sultan
does this Visual Studio Tools for Microsoft Office Applications contains ADX components for developing new thing which could integrate as a plugin for outlook
may i know your yahoo messenger id so that i can chat and clarify my doubts regarding this with you..
that to if you are willing only
thanks yar...
srichand.
|
|
|
|
|
Well, I don't know what ADX is and the fact is that I'm not really familiar with VSTO, I just installed it this morning because I wanted to learn it for Word All I know right now is that I got a code-behind page for the Word document. You can add windows forms controls to your document and for example, implement the click events for buttons, contact a web service, etc...
Sorry I can't help you more on that.
Talal
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
I am getting 2-Errors in creating an as here 1. "Could not find 'D:\Aleem\DSOControl1\obj\Debug\DSOControl1.dll' and 2. Error creating
assembly manifest: Error reading key file DSO.snk - the system cannot find the file specified.
As I didnt use assemblies till now, I dont know much about it. I will put the step by step process how I did I try it.
1. Created a Windows control library, and put all the required controls and functionalities in it.
2. Build it, and successfull.
3. Then at vs.net command prompt put "sn -k DSO.snk". It is also successful.
4. Then <assembly: assemblykeyfile("dso.snk")=""> put this in the assemblyinfo.vb file in the Control application(like
DSOControl1).
5. Then again I tried to build the application its giving errors as I mentioned above. Please tell me which step I miss and I did mistake.
Thank you.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Check that the key file is in the specified directory. I suspect that your assembly file lists it as "DSO.snk". Try putting in the absolute or relative (to the DLL) path instead. For instance, if it is in the DSOControl1 directory, you would reference it in the assembly file as "..\..\DSO.snk".
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I put it like this
sn -k "d:\Aleem\DSOControl1\Bin\DSO.snk", still its giving me the same error. What may be the reason. And If its correct, whats the next step that I should do. Please tell me, Thank you.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Now its giving error as this : 1. Unable to emit assembly: Referenced assembly 'Interop.DSOFramer' does not have a strong name.
Please tell me what may be the cause for this. Thank you.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
That just generates the key. It doesn't do anything to bind the key into the assembly. In your assembly file (and I'm assuming that you're using VB.NET here) you need an entry like this in AssemblyInfo.vb:
<Assembly: AssemblyKeyFile("d:\Aleem\DSOControl1\Bin\DSO.snk")>
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|