|
Hello,
When I try to build my solution I get following error:
Error 165 Unable to copy file "<dll name="">". The process cannot access the file 'bin\Debug\"<dll name="">" because it is being used by another process.
The <dll name=""> is a project dll of the solution that I am trying to build.
The "Copy Local" property for all the references to above "<dll name="">" is set to false.
I get this error sometimes and when I get it, I have to close down VS.NET and then restart it to get rid of it. It really wastes a lot of time!
Any idea what it can be?
Thanks
|
|
|
|
|
before building ensure that svchost for ur application is running in the task manager i hope this will help u...
dhin chak
|
|
|
|
|
Thanks for replying.
Did you mean <app_name>.vshost.exe?
How do I run it ... Just by double click the
\bin\Debug\<app_name>.vshost.exe?
|
|
|
|
|
I did check that <app_name>.vshost.exe was running but still it gives error!
I see the error at build time, only if I have edited a form in the problem project. In other words, if I edit a form in the project which is giving error, then build the solution, it fails to build and gives the error described in previous posts.
|
|
|
|
|
Hi,
My application(a Windows Service) needs to create a complex xml, the values for which are retrieved from several tables of an oracle db.
In order to construct this, I can use wither datasets(probably typed) or business enitity objects which are XML serializable.
Also, requirement is to only use SPs at oracle end and direct SQL queries are not allowed
What is a better suggestion in terms of development ease and time and also performance. I need to have the design very soon. So please give your experiences in them also
-Rohan
|
|
|
|
|
I always prefer writing objects over strongly typed datasets in all but the most trivial of cases. There seems to be an MS trend to eliminate OO and it always backfires late into a the project.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
hi,
I have been trying to create tablet PC application to do handwriting recognition. We have Tablet PC SDK 1.7 installed and Win XP on a desktop. There is a panel where you can write with the mouse. We have a recognize button and for the button click event we have the following code:
MessageBox.Show(oInk.Ink.Strokes.ToString());
This didn't work and gave a unhandled exeception.
So we tried doing this:
Recognizers oRecognizers =
new Recognizers();
Recognizer oReco =
oRecognizers.GetDefaultRecognizer();
RecognizerContext oRC =
oReco.CreateRecognizerContext();
oRC.Strokes = oInk.Ink.Strokes;
oRC.EndInkInput();
RecognitionStatus iStat =
RecognitionStatus.NoError;
RecognitionResult oResult =
oRC.Recognize(out iStat);
This was the exception we got:
"An unhandled exception of type 'System.InvalidOperationException' occurred in Microsoft.Ink.dll
Additional information: The requested recognizer is not available with the current setup or configuration. "
Could you please tell me what is wrong?
Pls suggest an alternate way to do recognition. Its really urgent!
Pls suggest links where I can find sample working code.
Thanks
Bibhakar Ranjan
|
|
|
|
|
what's your default keyboard layout? google says it should work if it's english (united states)
|
|
|
|
|
Hi.
I need some help with creating a custom resizable contol in C#/XAML.
I am using groupboxes as the "windows" in my application. In the bottom right corner I have made a button that I want to use as a resize handle.
So the button itself needs to be dragable and then the groupbox´s width and height has to follow the button.
Is this the right way to do it?
/B
|
|
|
|
|
Moving the button with the mouse...
> On the button's OnMouseDown event, set a bool flag to true and store both the mouse's current position (MousePosition ), and the buttons current Location .
> On the button's OnMouseUp event, clear the bool flag.
> On the button's OnMouseMove event, (if the bool flag is set) set the button's Location to it's last stored location + the difference between the new MousePosition and the last stored mouse position.
A simple way of resizing the groupbox is setting its AutoSize property to true, and AutoSizeMode to GrowAndShrink. This will resize the groupbox to the location of the button (assuming it is the lowest and rightmost object in the groupbox).
This has always worked for me in the past... although you may want to look at using MdiParents (www.codeproject.com/csharp/mdiformstutorial.asp[^]).
MdiParents have much more to offer (layouts etc) and look more professional.
Hope this helps.
Matthew Butler
|
|
|
|
|
I need drawstring() to print a trailing blank space but it seems to be trimming the string... does anyone know a workaround to this???
|
|
|
|
|
AFAIK Graphics.DrawString() only paints the foreground, i.e. pixels belonging to the
characters in the string, so it does not paint spaces, it just skips them.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
see the prob is that...i need to format numbers such that they are aligned. -ve numbers are denoted in brackets
eg.
5000
(20)
here the nos are not aligned...so i need to print a blank space after the +ve nos so that they align properly.
eg.
5000
(20)
is this possible using drawstring() ??????
|
|
|
|
|
Hi,
Graphics.DrawString() will paint a string at the given coordinates (specified by either
a PointF or two floats, and indicating the top-left corner as always).
So it is up to you to specify the right x-value to get the alignment you want.
There are two possibilities:
1. using a non-proportional font, such as Courier New, where all symbols have the same width:
you can simply keep x constant and adjust the string, i.e. add spaces to the left and/or
the right, so the characters appear where you want them.
2. using an arbitrary font:
since character widths may vary now, you must find out how wide a specific string is,
and then adjust the x-value to get it to align properly.
The width can be obtained from Graphics.MeasureString(). Be careful to specify the
same parameters (text, font, brush, ...) you are going to pass to DrawString() later on.
If you want the unit digits to align, you should split the string in two parts, the left one
ending on the unit digit, the right one holding everything else (could be decimal point,
decimals, and/or a closing parenthesis). Then calculate the width of the left part,
and adjust it's x-value accordingly. The right part will have to be drawn at a constant
x-value, since that one needs to be aligned.
As you can see, with arbitrary fonts, spaces don't really come into the solution.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
thanks a lot..
|
|
|
|
|
Hi,
I have created a Local User Account programmatically say "MyUser" and then Iam Creating a process as MyUser. From within this process( which means Iam working as "MyUser") I have created a Pdf file and then Iam trying to open it Programmatically using DOS command "cmd /c start myfile.pdf". But the Pdf file is not getting opened. Even when I click on it. It Says "Access denied". The Same file if I login using "MyUser" it is being opened.Then after If Iam trying to Open it Programmatically or Normally I could open the File from my current user Account.
So,Is it a must for me to login as "MyUser" atleast once to work with that user Programmatically?
What I observed is once I login as that user, In Documents and Settings a folder is created under the name "MyUser".
So Is there any thing more I need to do apart from creating a user Programmatically?
Any suggestions would be helpful.
Thanks in Advance
Today is a gift, that's why it is called the present.
|
|
|
|
|
i had a program that use TAPI methods to answer a call ,it work correctly with SIP TSP and asnswer the call but this programm didnt work correctly in h323 TSP and didnot answer the call , so does h323 support the call answer if yes whats my program problem ???? tank you
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using JulMar.Tapi3;
using QuartzTypeLib;
namespace IncomingSample
{
public partial class IncomingForm : Form
{
public IncomingForm()
{
InitializeComponent();
}
private void IncomingForm_Load(object sender, EventArgs e)
{
_tapiMgr.Initialize();
foreach (TAddress addr in _tapiMgr.Addresses)
{
if (addr.QueryMediaType(TAPIMEDIATYPES.AUDIO))
{
try
{
// Supports audio -- attempt to select video as well if the provider supports it.
TAPIMEDIATYPES mt = TAPIMEDIATYPES.AUDIO;
if (addr.QueryMediaType(TAPIMEDIATYPES.VIDEO))
mt |= TAPIMEDIATYPES.VIDEO;
// Open - this owns inbound calls
addr.Open(mt);
}
catch(TapiException ex)
{
if (ex.ErrorCode == unchecked((int)0x80040004))
{
try
{
addr.Open(TAPIMEDIATYPES.DATAMODEM);
}
catch
{
}
}
else
MessageBox.Show(string.Format("Open(VOICE) {0}: {1}", addr.AddressName, ex.Message));
}
// Add any existing calls.
foreach (TCall call in addr.Calls)
{
lbCalls.Items.Add(call);
}
}
}
}
void OnSelectedCallChange(object sender, EventArgs e)
{
TCall call = (TCall) lbCalls.SelectedItem;
if (call != null)
{
if (call.Privilege == CALL_PRIVILEGE.CP_OWNER)
{
btnAnswer.Enabled = call.CallState == CALL_STATE.CS_OFFERING;
btnDisconnect.Enabled = true;
return;
}
}
btnAnswer.Enabled = false;
btnDisconnect.Enabled = false;
}
private void OnAnswerClicked(object sender, EventArgs e)
{
TCall call = (TCall)lbCalls.SelectedItem;
TTerminal captureTerminal = call.Address.GetDefaultStaticTerminal(TAPIMEDIATYPES.AUDIO, TERMINAL_DIRECTION.TD_CAPTURE);
TTerminal renderTerminal = call.Address.GetDefaultStaticTerminal(TAPIMEDIATYPES.AUDIO, TERMINAL_DIRECTION.TD_RENDER);
foreach (TStream stream in call.Streams)
{
if (stream.MediaType == TAPIMEDIATYPES.AUDIO)
{
if (stream.Direction == TERMINAL_DIRECTION.TD_CAPTURE)
stream.SelectTerminal(captureTerminal);
if (stream.Direction == TERMINAL_DIRECTION.TD_RENDER)
stream.SelectTerminal(renderTerminal);
}
}
try
{
call.Answer();
}
catch (Exception ex)
{
// MessageBox.Show(ex.ToString());
}
}
private void OnDisconnectClicked(object sender, EventArgs e)
{
TCall call = (TCall)lbCalls.SelectedItem;
try
{
call.Disconnect(DISCONNECT_CODE.DC_NORMAL);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
private void IncomingForm_FormClosed(object sender, FormClosedEventArgs e)
{
_tapiMgr.Shutdown();
}
private void OnCallStateChange(object sender, TapiCallStateEventArgs e)
{
if (e.Call.Privilege == CALL_PRIVILEGE.CP_OWNER)
{
lbCalls.Items.Remove(e.Call);
if (e.State != CALL_STATE.CS_DISCONNECTED)
lbCalls.Items.Add(e.Call);
}
}
private void OnNewCall(object sender, TapiCallNotificationEventArgs e)
{
if (e.Call.Privilege == CALL_PRIVILEGE.CP_OWNER)
lbCalls.Items.Add(e.Call);
}
|
|
|
|
|
Hello experts...
I am developing an game using desktop application in C#.net 2005.
In that I have 3 forms (No MDI form).
I want to show form1 then form2 and then form3.
But if user press cntl+f4 key form goes close and second forms show
how to prevent this..?
I also have close button on each form.
Regards
Pankaj Joshi
|
|
|
|
|
Handle the Closing event on the form, the event arguments will have a Cancel property. Set that Cancel property to true .
|
|
|
|
|
1. Set the form's KeyPreview property to true.
2. Add a KeyDown event to the form like this:
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyValue == (int)Keys.F4 && e.Modifiers == Keys.Control)
{
e.SuppressKeyPress = true;
}
}
That's it.
Hope it'll help.
Danny
|
|
|
|
|
Hello DannyAdler sir,
This is working fine. Thannks for the help.
I only have one question .. Is their any problem to using that code.?
I don't think so... But if any, please tell me points to be remember
while using this code.
Regards
Pankaj Joshi
|
|
|
|
|
Two things I can think of:
1. After setting the KeyPreview property to true, ALL the key-down events will first go through this function.
2. The CTRL-F4 will never work on that window, as long as the key-down is supressed in the if statement.
Just to keep in mind.
Danny
|
|
|
|
|
Hi all,
Trying to send mail with System.Net.SmtpClient, using very simple code
just for testing:
SmtpClient smtp = new SmtpClient("mail.server.com", 25);
smtp.Credentials = new
System.Net.NetworkCredential("user", "password");
try
{
smtp.Send("sen...@server.com",
"recipi...@server.com",
"Subject",
"Body");
MessageBox.Show("Mail Sent!");
}
catch (Exception ex)
{
txtErrorMsg.Text = ex.ToString();
}
BTW, the mail.server.com is not mine, it's an ISP mail server.
On my local machine, this code works fine and actualy sending the
mail.
BUT, on my remote server the same code produces the exceptions as
follows:
System.Net.Mail.SmtpException: Failure sending mail. --->
System.Net.WebException: Unable to connect to the remote server --->
System.Net.Sockets.SocketException: No connection could be made
because the target machine actively refused it
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot,
SocketAddress socketAddress)
at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean
connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress&
address, ConnectSocketState state, IAsyncResult asyncResult, Int32
timeout, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.ServicePoint.GetConnection(PooledStream PooledStream,
Object owner, Boolean async, IPAddress& address, Socket& abortSocket,
Socket& abortSocket6, Int32 timeout)
at System.Net.PooledStream.Activate(Object owningObject, Boolean
async, Int32 timeout, GeneralAsyncDelegate asyncCallback)
at System.Net.PooledStream.Activate(Object owningObject,
GeneralAsyncDelegate asyncCallback)
at System.Net.ConnectionPool.GetConnection(Object owningObject,
GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32
port)
at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32
port)
at System.Net.Mail.SmtpClient.GetConnection()
at System.Net.Mail.SmtpClient.Send(MailMessage message)
--- End of inner exception stack trace ---
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at System.Net.Mail.SmtpClient.Send(String from, String recipients,
String subject, String body)
at TestWindows.FrmSendSMTPMail.btnSend_Click(Object sender,
EventArgs e)
Weird stuff...
My remote server has Windows Server 2003.
So, am I missing something?
Sounds to me like a connectivity problem... How can I check that?
Thanks in advance,
Danny
|
|
|
|
|
I'd guess that your ISP rejects connections from IP addresses that do not belong to them.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
You may be able to authenticate to your isp's smtp server by passing it your user credentials.
Alteratively, consider using the windows server SMTP service.
"You're very clever, young man, very clever," said the old lady. "But it's turtles all the way down!"
|
|
|
|
|