|
You could bind the LocationChanged from the ParentForm (property of control).
|
|
|
|
|
Hello! I'm .Net-developer from Ukrain and my English is bad.
In this article http://www.codeproject.com/cs/media/csharpfilters.asp i read about Gaussian blur, but i have red the matrix of Gaussian filter without Radius setting. Where i can read about real Gaussian filter with settings of tolerance radius.
Thanks.
|
|
|
|
|
I think the best option would be to ask the author of the article in the discussion board you linked.
Christian Graus is very active in this board, so I think you'll get a reply soon.
bye
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hello,
I am looking for a feature in .NET listView wherein you can start the Marquee selection from the
ListView Items. Is there a way to intiate the marquee selection using sendmessage.
Live Life King Size
Alomgir Miah
|
|
|
|
|
There's no support for it built into the .NET Framework. There are, however, methods to get something to work. The message you're thinking of, with the help of the Win32 SendMessage function, is LVS_EX_DOUBLEBUFFER. This message is only available in ComCtrl32 Version 6.00 (Windows XP) and above.
I'd give you a link to the documentation in the Windows SDK site, but it's Search function appears to be busted right now. http://windowssdk.msdn.microsoft.com/library/[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Would someone tell me how to read the data selected by the user in a comboBoxNames, and put the name into a variable string name; ?????
Thanks .
aPerfectTool
|
|
|
|
|
What I do is create objects (instantiated classes) of each item in the combo box, with ToString()'s. I add the objects to the combo box, the combo box shows the string representations of the object. Once I want to read the combo box, the SelectedItem property contains the object, not just the string so I don't have to match up the string to possible objects.
It's quite an elegant way to handle that type of selection.
|
|
|
|
|
I have a Dataset that has returned data from SQL Server. I would like to read in what the SQL Server type is for each Column and what the size is. For instance is the column is a nvarchar(20) I would like to be able to find out that the column has a size of 20. Is this possible? I can't seem to figure this out even using the DataColumn.
DataColumn.MaxLength is returning -1.
I tried also SQL Command:
SELECT COL_LENGTH('MyTable','MyColumnName') AS 'MyColumnLength'
it's running fine in SQL Query analyzer but it's returning 0 in C#
Any idea?
thanks
|
|
|
|
|
You can use SQLDMO to access specific DB Schema .Add reference to SQLDMO object - can be found under COM tab - add entry named "Microsoft SQLDMO Object Library".
The snippet shows how to get column details for table "Customers" in "Northwind" DB.
<br />
SQLDMO.SQLServerClass sqlServer = new SQLServerClass();<br />
sqlServer.Connect("MYSERVER", "username", "password");<br />
<br />
foreach (SQLDMO.Database db in sqlServer.Databases)<br />
{<br />
if (! db.SystemObject)<br />
{<br />
if(db.Name=="Northwind")<br />
{<br />
foreach( SQLDMO.Table table in db.Tables )<br />
{<br />
if(table.Name=="Customers")<br />
{<br />
foreach(SQLDMO.Column column in table.Columns )<br />
{<br />
Console.WriteLine( column.Name );<br />
Console.WriteLine( column.Length );<br />
Console.WriteLine( column.Datatype );<br />
}<br />
}<br />
<br />
}<br />
}<br />
}<br />
} <br />
DevIntelligence.com - My blog for .Net Developers
|
|
|
|
|
It's pretty good but it is working some slowly...
Anyway I'm using it...
thanks a lot
|
|
|
|
|
Hi ! I am looking for someone who have programmed Irda commnunication port between a Pocket-PC and the Microchip MCP2155. I have found some articles in C++ and some other in C# that doesn't work very well.
I can establish the communication but the transfer of good data is hard to achieve.
Visual Studio 2005, Compact Framework 2.0.
Is there any problem with the new Compact Framework ?
Thank you a lot !
Danny Gilbert, enginneer
Montréal, Canada
|
|
|
|
|
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.
|
|
|
|