|
And what is the problem?
---
b { font-weight: normal; }
|
|
|
|
|
the problem is because i don't know what framework exacly witch version i shoot download.I download some frame work and now give me error when i start it the error is " mscorwks.dll cloud not be loaded" i look for this file and the file was there ???
|
|
|
|
|
Hi buddies,
If more than one thread may enter .NET collections (ArrayList, NameObjectCollectionBase, ...) Add() methods should I enclose the code that calls Add() in a lock statement?
Also can you tell me a general rule to underestand when I SHOULD call some method only inside a lock statement in a multi-threaded app?
Thank you so much,
- Mohammad
---
"Art happens when you least expect it."
|
|
|
|
|
From MSDN documentation on ArrayList:
"Public static members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe."
As Add() is an instance member, it's not guaranteed to be thread safe, so you should use lock.
The documentation should contain thread safety information for all classes.
---
b { font-weight: normal; }
|
|
|
|
|
Yes, thank you Guffa.
---
"Art happens when you least expect it."
|
|
|
|
|
|
Thank you leppie
---
"Art happens when you least expect it."
|
|
|
|
|
Thank yo leppie
---
"Art happens when you least expect it."
|
|
|
|
|
Hi
I have to use Microsoft.ink in c# and , and just draw a image .. for example: just write a letter say egg using ink and save that image as .jpeg file..
How can i do it . Please anyone tell how to do this..
Dhol
|
|
|
|
|
Hi All,
I have a datagrid in an aspx page. From footer i am adding new row to the data grid. How do i make that datagird is scrollable as well as with Fixed Header and Footer? The header and footer should be visisble aslways then only the end user can add new records.
Could you guys please help?
Thanks
Thennarasu
|
|
|
|
|
Hi
I have a Sql Server datebase in our company on a Server.
I want to read the server Time from the clients and i don't want users can change their computer time .
but I don't know how can i do it.please help me
|
|
|
|
|
With SQL Server, you can run the following select statement to get the time:
SELECT GETDATE()
To set the time, read the source code of the NTPClient class from the article SNTP Client in C#.
To prevent users from changing the clock, investigate the "Change the system time" policy for users in your domain/local computers.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
I have an problem in converting the desktop coding in Windows Serice. all the code was translated successfully but the problem i m facing in below code of line when i trying to write this line of code in wnidows service its getting error in Invoke method, its compulsory for me to call this (INVOKE)method cause the parameter inside this are delagate and collection of parameters that i have to pass these in any case, so can any one tell me what should i do to access this INVOKE method in windows service.
Code: this.Invoke(new PingStartedEventHandler(netMon_PingStarted), new object[] { sender, e });
|
|
|
|
|
I presume you're moving this code from a Windows application? If that's true, then the Invoke you are talking about would be Control.Invoke , which I *think* won't be available in a Windows service.
If you're not updating UI elements, I guess you can safely skip the Invoke and directly call the method using the delegate.
PingStartedEventHandler pe = new PingStartedEventHandler(netMon_PingStarted);
pe(sender, e);
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
hi everybody,
I would like to ask a question here.
Is Static function advantage or disadvantage ?
How are they disadvantage ?
Shuold I use many static function in a program ?
Thank for answering my questions ,
Sincerely,
|
|
|
|
|
dinh van hai wrote: Is Static function advantage or disadvantage ?
Depends on the context. Static functions are useful for factory methods like Create, which create and return appropriate objects.
dinh van hai wrote: How are they disadvantage ?
Static functions are like global functions, only that their scope is restricted to the class. So too many static functions and the class then becomes a dumping ground where you keep adding functions that don't fit elsewhere.
dinh van hai wrote: Shuold I use many static function in a program ?
Of course you can. You can take the system defined static functions, like File.Create as a starting point.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
how do static functions affect the performence and memory of our program ?
|
|
|
|
|
If the function doesn't use any data from the instance of the class, it should be static, so that you don't have to create an object just to call the function.
Declaring a function as static also supplies the information that the function is self-contained and doesn't need any data from an object.
---
b { font-weight: normal; }
|
|
|
|
|
Hi together!
I'm currently searching a way to get a Process by it's window title, not by it's classname...
in following code, the GameName would be, e.g. "sol" (means Processname of game "Solitär")
<br />
static ProcessMemoryReaderLib.ProcessMemoryReader pReader;<br />
static Process[] myProcesses;<br />
<br />
public static void InitRWCode(string GameName)<br />
{<br />
pReader = new ProcessMemoryReaderLib.ProcessMemoryReader();<br />
myProcesses = Process.GetProcessesByName(GameName);<br />
}<br />
that's the code i'm currently using...
but i'm looking for something like that:
in this case GameName would be "Solitär" instead of "sol"
<br />
static ProcessMemoryReaderLib.ProcessMemoryReader pReader;<br />
static Process[] myProcesses;<br />
<br />
public static void InitRWCode(string GameName)<br />
{<br />
pReader = new ProcessMemoryReaderLib.ProcessMemoryReader();<br />
myProcesses = Process.GetProcessesByWindowTitle(GameName);<br />
}<br />
Has someone an idea
I've already tried the GetWindowThreadProcessId together with the FindWindow, but it returns the wrong ID...
Thx for any suggestions!!!
Greets Ralf
FreewareFire
|
|
|
|
|
|
Hi! Thanks for your reply!
Yes of course - and that's the problem. In my case it's too slow - i'm working with hotkeys. And every time a hotkey is pressed, it needs to get the excact handle of the window. So every time GetProcesses is called. And that's very slow. So i have to get the window handle directly by it's window name - that's a lot faster!!! than GetProcesses!!!. So if anyone have a suggestion... Please let me know...
Thx!
FreewareFire
|
|
|
|
|
Hi everyone!!
Is anyone know how th change the background of a toolbar ?
Thank you?
|
|
|
|
|
Hello,
I am new here as far as posting goes.
Maybe someone can see what I'm Missing.
I keep getting build errors see the tut here.
I'm new to this Smartphone Development and vs2005.
http://www.microsoft.com/seminar/shared/asp/view.asp?url=/seminar/en/smartphone_apps_medua/manifest.xml[]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.WindowsMobile.PocketOutlook;
namespace TOYOURSPACE
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void menuItem1_Click(object sender, EventArgs e)
{
Microsoft.WindowsMobile.Forms.CameraCaptureDialog cameraDialog = new Microsoft.WindowsMobile.Forms.CameraCaptureDialog();
cameraDialog.Owner = this;
cameraDialog.Title = "Take a Picture";
if ((cameraDialog.ShowDialog() != DialogResult.OK)(cameraDialog.FileName == ""))
{
return;
}
string account = "ActiveSync";
string to = "";
string subject = "";
string body = "";
string[] attachments = new string[] { cameraDialog.filename };
Microsoft.WindowsMobile.PocketOutlook.MessagingApplication.DisplayComposeForm(account);
label1.Text = "Image sent sucessful!";
PictureBox1.image = new Bitmap(cameraDialog.filename);
}
private void linkLabel1_Click(object sender, EventArgs e)
{
Process.Start(" http://www.microsoft.com ")
}
}
}
-- modified at 17:10 Sunday 27th November, 2005
|
|
|
|
|
Hi, I'm using SgmlReader to obtain the XML data from a web page and I have an IndexOutOfRangeException exception when I execute the Load method from the XmlDocument class.
I had no problems before but now it started to happen.
Here is part of the code:
string path = @"C:\....";
StreamWriter w = new StreamWriter(path+"file.txt",false,System.Text.Encoding.Unicode);
SgmlReader r = new SgmlReader();
r.DocType = "HTML";
r.Href = "http://www.webpage.com/page.htm";
XmlDocument xml = new XmlDocument();
xml.Load(r); <-- Here the exception is threw.
|
|
|
|
|
ok, i'm almost done with what i am trying to do. 1 LAST question. heh. ive searched the articles this time, and google. i've found 1 thing on google, but i cant understand it. so heres the question: how can i send a mouse click (to something outside my application, such as windows or another program)?
thanks in advance,
sam kline
<a href="http://dying.about.com/gi/pages/poll.htm?poll_id=2068629450">YES</a>
-- modified at 14:15 Sunday 27th November, 2005
|
|
|
|