|
Sounds more like your COM port settings are wrong and/or mismatched. That said, I could neither get my infrared serial port dongle worked reliably on the beta. I recall seeing a bug somewhere related to my issue that could have been the cause.
xacc.ide-0.1.1.11 - now with Settings & AutoComplete(kinda)
|
|
|
|
|
Hi all,
in the Express version , how can i make a deployment package ?
on .Net 2003 i just added a new deployment project.
Thanks,
Ran.
R.Z
|
|
|
|
|
The Express Editions don't have Setup and Deployment projects. They only support ClickOnce deployment. You can get to the Publish Wizard by clicking on its button on the Publish tab of the Project Designer, which is accessible from the Project menu, Properties menu item.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
thanks.
i tried it.
it downloads Framework2.0 for me and install it (thats great).
but it only runs the application and do not install it on the PROGRAM FILES directory and do not add anything to START menus..
why is that?
Thanks in advance.
Ran.
R.Z
|
|
|
|
|
No idea. I don't use the Express versions and I haven't used ClickOnce deployment yet.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm developing a C# application where I need to find out if the left shift key has been pressed down or the right shift key.
I've tried to use the KeyDown event with the following code:
private void KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
if(e.Control && (e.KeyCode == Keys.D1) && (e.KeyCode == Keys.LShiftKey))
{
//Do stuff here
}
}
I can read the keypresses but I can not see if the left shift key is pressed, only that a shift key was pressed. The e.KeyCode == Keys.LShiftKey doesn't work since it seems that KeyCode don't collect info about which shift that was pressed.
Any help appreciated! Thaks!
Andrew
|
|
|
|
|
Declare the function somewhere inside your class:
<br />
[DllImport("user32")]<br />
public static extern short GetKeyState (Keys VirtKey);<br />
On your KeyDown event, you can check which shift key is pressed in this way:
<br />
bool lshiftpressed = ((GetKeyState(Keys.LShiftKey) & 256)==256);<br />
bool rshiftpressed = ((GetKeyState(Keys.RShiftKey) & 256)==256);<br />
DevIntelligence.com - My blog for .Net Developers
|
|
|
|
|
It worked perfectly! Thanks!
-A
|
|
|
|
|
Hi everybody!
Currently I'm developing a simple mail server. It works fine so far, but I have a design issue due to the heavy threading my app uses:
I have a number of SMTPClientThread s, which all may open the same MailBox at the same time to add mail oder query existing data. It looks like this (inside of a SMTPClientThread):
MailBox box = new MailBox("username");<br />
box.AddMail(mail);<br />
box.Save();
new Mailbox() will load the mailbox from an XML file, save everying into a List<Mail> and close the file handle, Save() will write the List back to the XML and save the handle.
Now one or multiple SMTP Clients might want to add or query data from the same mailbox at the same time.
How do I handle this correctly? I've read about the lock statement, but I don't know how to use it correctly in this case.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
You could use a static variable as a semaphore that locks the code while doing the update:
static object dummy = 42;
lock (dummy) {
MailBox box = new MailBox("username");
box.AddMail(mail);
box.Save();
}
This will however lock the update of any mailbox, and I suppose that you would rather want to lock only the specific mailbox. That takes some more work, perhaps a hashtable containing one object for each user, so that you could do the lock on an object for a single user.
Well, at least the code above is a step on the way, it will keep the mail server from corrupting the files.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks, that looks okay.
So you suggest to create a Hashtable (or any other list) with variables that will be used to lock the user mailboxes? Something like this?
static Hashtable boxes = new Hashtable();
boxes.Add(user1, 1);
boxes.Add(user2, 2);
...
lock(boxes[userX])
{
MailBox box = new MailBox(userX);
box.AddMail(mail);
box.Save();
}
Do I need to lock anything inside the MailBox -class, or is the lock inside the MailServer class enough?
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Yes, something like that. What is most convenient depends on how you manage the users.
As long as the object you lock is unique for the user, that is enough. Any other thread trying to lock the same object will have to wait until it is unlocked.
---
b { font-weight: normal; }
|
|
|
|
|
Okay thanks, that's how I will do it.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I want to show window that it's like open.showmodelessdialog in web application. The second window always on the first window. besides, the first window can be operateed. Modeless Dialog, not mdi.
|
|
|
|
|
You can't do it from ASP.NET. It's got to be done using client-side JavaScript. There's no such thing as a modal window in ASP.NET.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 11:27 Friday 27th January, 2006
|
|
|
|
|
I found out the solution.
private void button1_Click(object sender, System.EventArgs e)
{
SecondWindow frm = new SecondWindow();
frm.Owner = this;//'this' is the first window's handle.
frm.Show();
}
|
|
|
|
|
Can anyone tell me how can i update via GridView1_RowUpdating Event
regrads
|
|
|
|
|
I m using crystal Reports in C#. Every thing is working fine but when i run that program it gives me following message in a window
Main Report
Table Name ..........
Server Name ..........
DataBase ..........
Login ..........
Password ..........
why is it giving this message?
Day by Day Everyone is moving towards graveyard
|
|
|
|
|
you should test againt connection string, i think connection string database server not the same, you not permiss logon server or server name and database name not exist.
Good luck.
|
|
|
|
|
Connection string is working fine. I am using access database to create a crystal report in C#
when I run on my machine It is asking for database server
name and logon information. The problem which I understood from this
is that the path is hardcoded in the crystal report and the database
Day by Day Everyone is moving towards graveyard
|
|
|
|
|
Does anyone know how to create a tooltip popup when we point a mouse over a "text" for a period of time. This is normally seen in visual studio. When we point the mouse on a function name or so for a period of time, it will show its declaration in a small tooltip popup window. How can we customize this to show some tooltip information, upon pointing to some of the words for which we want some info. I want to create this as plugin/add-in in Visual Studio .NET so that on pointing to certain words I can get some information about those words. Coding in either VC++/C#(preferrably VC++). I need some help for this urgently...can anyone help me out???
Alan K. George
|
|
|
|
|
I need a method like
g.FillEllipse( pbImage.image , New Rectangle(100, 100, 10, 10))
This method will fill an ellipse with an image in picturebox named pbimage.
Thank you.
|
|
|
|
|
|
yes you r right, i am damn , how i forgotten it :S
Thanks a lot
|
|
|
|
|
Hi guys,
I have got a CD installing a C# project and copying an access database to the path.
The access file however is always read only - is there a way of chaging this at creating the set up project?
If not, has anyone has those same problems how have they tackled them?
Thanks,
|
|
|
|