|
|
Thanks for the response.
Why would I need to use the HashTable? The way I had it setup didn't use one. I simply checked whether or not the form was active or not. It seems like there would be an easier way of doing this. I really appreciate your help.
|
|
|
|
|
That's because you wanted a generic method to do the job. If you don't have a hashtable, how will you know if a form a has been instantiated or not? In other words, from where will you get the instance of the form to check if it's null or disposed?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I'm working on a project in which I have two DLLs, one Managed C++ - a bridge to some unmanged code, and one C# dll which is linked to the MC++ DLL to do the real work. Is there a way in thew new .Net world of static linking the C# dll to the MC++ one? It would be more elegeant than having two files drifting about.
Joel Holdsworth
|
|
|
|
|
Hello,
Is this[^] what you are looking for?
Hope it helps.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
|
Joel Holdsworth wrote: Thanks for your quick answer, that's helpful!
You're welcome!
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Hie all
I am new to c#. I wonna know how I can save data from the website text boxes to a db (sql server)
Anyone who can help? thanks guys..
|
|
|
|
|
Does somebody know if it is possible to open a Collection Editor window programmatically using a ControlDesigner?
|
|
|
|
|
Hello,
I'm using Visual Studio 2005 Standard Edition and I'm writing an application with C# using the .NET 2.0 framework. I've come across a little problem when I want to create my remote objects.
The problem is that I cannot create a TcpChannel . I use the following code:
using System.Runtime.Remoting.Channels.Tcp;
m_TcpChanServ = new TcpChannel(10000);
The problem is that the compiler complains that it doesn't know the Tcp namespace. It worked with VS2003. Was the Tcp namespace moved under .NET 2.0 or is it unavailable for the Standard Edition of visual studio?
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Did you try explicitly adding a reference to System.Runtime.Remoting.dll?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hello,
I din't try this, yet... I think that the reference is the problem. I'm still used to C++ and that headers do all that magic for me.
I'll let you know if this doesn't work.
Thanks for the reply!
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Hello people,
I'm gonna go right to the problem.
Using the eventlog class I'm reading the entries from the Windows Event Apllication Log. If I then look at the TimeGenerated property of every entry and I compare that value against the value from the Windows Event Viewer application, I stumble upon something weird.
Event1:
Time in event viewer = 1:53:34 PM
Time from Eventlog class = 2:53:34 PM
Time from Eventlog class, ToUniversalTime = 12:53:34 PM
Event2:
Time in event viewer = 10:12:39 AM
Time from Eventlog class = 10:12:39 AM
Time from Eventlog class, ToUniversalTime = 9:12:39 AM
Does anyone know how this is possible? Who is right, the Event Viewer or the EventLog class? I'm thinking it may have something to do with the regional settings during event1 being different from these settings during event2?
anyone?
thx!
|
|
|
|
|
when i am trying to connect to a Sql Server 2000 database from VS.Net 2005 i'm getting the following error :
An attempt to attach an auto-named database for file c:\inetpub\wwwroot\casterVB\App_Data\aspnetdb.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
so what is this aspnetdb.mdf file ?
|
|
|
|
|
|
thanks you Igor for replying,
I already used the same connectionString in a ASP.NET 1.x project and it works good
but when i trying to use it in ASP.NET 2.0 it gives the previous error.
connectionString="data source=localhost;initial catalog=dbname;persist security info=False;user id=sa;password=;"
|
|
|
|
|
thanks you Igor for replying,
I already used the same connectionString in a ASP.NET 1.x project and it works good
but when i trying to use it in ASP.NET 2.0 it gives the previous error.
connectionString="data source=localhost;initial catalog=dbname;persist security info=False;user id=sa;password=;"
Do u know if ASP.NET 2.0 works with SqlServer 2000 properly?
|
|
|
|
|
There's nothing in ASP .NET 2.0 (actually, to connect to the database you're using ADO .NET from ASP .NET) that shouldn't work with SQL2K.
This error message is quite weird (provided you're using connection string you've posted). Try to debug your web app to identify the particular line of code causing the error.
Best regards,
-----------
Igor Sukhov (Brainbench/Tekmetrics ID:50759)
ICQ:57404554 | http://sukhov.net
Russian Software Developer Network
-- modified at 9:10 Wednesday 16th November, 2005
|
|
|
|
|
Igor,
This is the function i made to select the data i want,
and the debugger stop at "Conn.Open()"
note: i don't have this problem in vs.net 1.x
Public Function CheckCompanyByCompanyName(ByVal CompanyName As String) As Integer
Dim SelectCommand As SqlCommand = New SqlCommand
Dim Conn As SqlConnection = New SqlConnection
Conn.ConnectionString = ConfigurationManager.ConnectionStrings(0).ConnectionString
SelectCommand.CommandType = Data.CommandType.StoredProcedure
SelectCommand.CommandText = "CheckCompanyByCompanyName"
SelectCommand.Connection = Conn
SelectCommand.Parameters.AddWithValue("@CompanyName", CompanyName)
Dim ID As Integer
--> Conn.Open()
ID = CType(SelectCommand.ExecuteScalar, Integer)
Conn.Close()
Return ID
End Function
<connectionstrings>
<add name="CasterConnectionString" connectionstring="Data Source=localhost;Initial Catalog=dbname;User ID=sa" providername="System.Data.SqlClient">
thanks in advance
Lebanon is a very nice country
|
|
|
|
|
i have a problem with deployment a crystal report in windows applection, the problem is whin i deploy the applection and run it it give me the following exception " cannt find CrystalDecisions.* DLL files"
i need to know how to deploy the crystal report in the client machine , i use V.S.net 2005 beta 2 and i face the same problem in V.S.Net 2003
|
|
|
|
|
i traid to merg the CrystalDecisions.* DLL files in the deployment project and add it asemply files.
but i have the following exception
"The type initializer 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. ---> System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {11BD5260-15B6-412D-80DB-12BB60B8FE50} failed with HRESULT: 0x80040154(Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)))."
so i dont know if i can do anything else to solve this problem
|
|
|
|
|
Hello
I want to have an integrated progressbar with number in it.
Do you have a component???
|
|
|
|
|
Hi
Thank you for your help.
|
|
|
|
|
I have to make windows service in C#
i am having Visual Studio.Net
a Com Dll is given to me i add it by reference
and able to access its methods and properties
now i want to give some commands to this service using User Interface
and get appropriate results
Will i have to do socket programming
if yes where will i write my socket server code
will it be in OnStart
protected override void OnStart(string[] args)
{
// TODO: Add code here to start your service.
EventLog.WriteEntry("start first service");
}
Please put me in right direction I am not getting what to do
Ankit Aneja
"Nothing is impossible. The word itself says - I M possible"
|
|
|
|
|
Ankit Aneja wrote: if yes where will i write my socket server code
will it be in OnStart
You don't give enough information about your problem to know if sockets will solve it, but if you do end up writing a TCP server in your service, you can't put the listening code in OnStart .
The simplest way to do this is with a blocking listener socket, and if you put it in OnStart , your service will never completely start. Put the listener on a different thread, and spark up the thread in the OnStart event. OnStart completes, and your service is off to the races.
This isn't scalable but works well for, say, proxying requests for remote resources by a single application.
private static TcpListener _listener = null;
private static Thread _listenerThread = null;
...
protected override void OnStart(string[] args) {
_listenerThread = new Thread(new ThreadStart(MessageQueue));
_listenerThread.Start();
}
...
private static void MessageQueue() {
_listener = new TcpListener(System.Net.IPAddress.Any, 4242);
_listener.Start();
while (true) {
TcpClient client = _listener.AcceptTcpClient();
NetworkStream stream = client.GetStream();
Dig?
Share and enjoy.
Sean
|
|
|
|