JocularJoe's Q&A profile
.NET Development Security problem with addins
Hi all, I am trying to build an addon host in C#. Although I'm impressed with C#'s ability to handle addins even from untrusted sources, I have run into a problem. How can one prevent an addon which is either malicious or has a particular flavor of bug from running forever or consuming enormous amounts of memory From everything I've read, AppDomains can only be shutdown "cooperatively". Even if you do AppDomain.Unload(), a malicious addin could use catch the ThreadAbortException (or use a finally clause) or stay in a CER indefinitely. For example: .csharpcode, .csharpcode pre {font-size:small;color:black;font-family:Consolas, "Courier New", Courier, Monospace;background-color:#ffffff;} .csharpcode pre {mar ...Show All
Software Development for Windows Vista overload methods in WF
Hi all, i would like to know how can methods(activity) be overloaded in WF. For example i have a if-else activity, a sendMail() method. If the ToName is XXX then doSomthing() and then sendMail(XXX), else if ToName is YYY then doSomthing() and then sendMail(YYY). How can the parameter be handed over Should i use a queue for the parameter (or Dependence Property) But how can i choose at runtime the right parameter Thanks Emy_P, Just so I can understand what you have here, let me take a shot at describing what you have based on your description... You have created a custom If/Else activity: Is this derived from CompositeActivity or is this a SequentialActivity and you've dropped a base class If/Else ...Show All
SQL Server BCM with accounting 2007
I have bcm with outlook 2007 and accounting express. when i create an opportunity in bcm, everything is fine. when i click the convert to quote button, it dumps all of the item information (quantity, name, description, price, tax....) into the description field in accounting. Then I have to copy each piece out of the description field into it's appropriate field in accounting 2007 express. Where is the mapping for these fields, so that I can map each one correctly Is there something else i should be doing ...Show All
Windows Forms PictureBox1.Image = PictureBox2.Image
Hi, I am trying to copy PictureBox1.Image to PictureBox2.Image because I am streaming a webcam video. The webcam video is displayed on PictureBox1. In order to show the webcam video on other computer, I may copy the webcam video from PictureBox1. However, it can't be simplily achevied by making a button like private void button1_Click(object sender, EventArgs e) { pictureBox1.Image = picCapture.Image; } How can I copy the pictureBox1.Image to other pictureBox You could download my application at: http://www.yousendit.com/transfer.php action=download&ufid=CB1D2DAC74B050A3 Thanks cablehead, but the picCapture.Image property was not really set. Do you know how to ...Show All
SQL Server Application Role And SSRS
Hi dear reader I made an application that uses a Sql Server 2005 Express DataBase. In the database I made a application role. When the user logs into my application I run this procedure: If Not sqlConnectionCR Is Nothing Then If Not sqlConnectionCR.State = ConnectionState.Open Then sqlConnectionCR.Open() SqlConnection.ClearAllPools() ConsultasSqlCommand = New SqlCommand ConsultasSqlCommand.CommandType = CommandType.Text ConsultasSqlCommand.CommandText = "sp_setapprole 'appRole', 'drowssap" ConsultasSqlCommand.Connection = sqlConnectionCR ConsultasSqlCommand.ExecuteNonQuery() End If Else.... I understand that this procedure connects to my sqlserver database as ...Show All
Windows Forms Add a DataGridViewComboBoxCell to the Insertion Row only
I can add a DataGridViewComboBoxCell to a row in my DataGridView. I want this only to be added to the Insertion Row.. New Row.. Row with a star in front of it, whatever you call it. I do not want any rows above this Insertion row to display the ComboBox, but I do want the value to still be there. Any help Thanks. Hi, I'm thinking that it might be possible to change the style of the ComboBox so that the dropdown arrow doesn't show, and also make it read-only for all rows except the new row. I don't know if it'll work, but try setting those properties in the CellFormatting event of the DataGridView. You have access to the column and row indices from the arguments. Luc ...Show All
Visual Studio Weird output... What's going on?
All I'm getting is 2 columns of data that looks like letters that are half cut off Here's an example: C 1 l 2F I am just doing a very very simple test report. I am using a dataset and dragging two columns into a table. Saved it as report.rdlc Then I created a new webform, dragged over a reportviewer control. Made sure that the datasource was pointing to the right place, and am having it use report.rdlc. The two columns should be showing a date field, and an integer field. Thanks in advance! -Chris This is a known issue that only repros in Firefox (or other Gecko browsers). This does not repro in IE. We currently plan to ship a fix for this in Visual Studio SP1 ( http://msdn.microsoft.com/vstudio/suppo ...Show All
Visual Studio 2008 (Pre-release) Howto: make the Enter key work like the Tab key
What's the best WPF way to have a custom/user control move to the next control in the tab sequence. I'm writing a control that shows a popup list and when the user selects an item and presses the Enter key, the keyboard focus should move to the next control in the tab sequence. Thanks, MikeS I guess you could add something like this to your main window: (Constructor) ... this .PreviewKeyDown += new KeyEventHandler (MainPage_PreviewKeyDown); ... (/Constructor) void MainPage_PreviewKeyDown( object sender, KeyEventArgs e) { if (e.Key == Key .Enter) { if ( Keyboard .FocusedElement is FrameworkElement ) { ...Show All
.NET Development Strange SQL connection problem.
I am building a windows forms app and I get this error when I connect to the DB The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception. The strange thing is if I put a breakpoint at the line that causes the error ; SqlConnection con = new SqlConnection (ConnStr); Hit the breakpoint and then F5 to continue, the code runs fine . The code only fails if I do not have a breakpoint on that line of code. The database is a SQL2000 db on another box referenced by an IP. Thanks for any help or ideas on this. PatC I had the same problem. Checking the stack trace it mentions your config file. In my case I had the <connectionString/> section b ...Show All
.NET Development Typed Dataset Question #2
Hello All, I am creating a Windows Forms application (VS2005 and .Net 2.0) and I have a question regarding the best time / event to use to populate the form dataset. In most cases, the rowcount for the datatable in the dataset will be less than 200. In a few datatables however, there is the potential for hundreds of thousands (if not millions) of records. My questions are, "Do you use the form load event to populate the datatable " "What would the response be like during the form load if it was populating 1.2 million rows into a datatable " "Any better ideas on how to fill a large datatable " Thanks in advance. Roger You can use the forms constructor...I persona ...Show All
Visual Studio 2008 (Pre-release) Xbap download gets 404 not found for a DLL
I've setup IIS for deploying an xbap application. I navigate to the page and it starts to download, but I get a 404 not found error for a DLL I'm trying to include: ERROR SUMMARY Below is a summary of the errors, details of these errors are listed later in the log. * An exception occurred while downloading the application. Following failure messages were detected: + Downloading http://localhost/TaxBap/XamlUtils.dll did not succeed. + The remote server returned an error: (404) Not Found. However, this file is in the directory. I can see it from IIS as well. Why would I get a 404 here My application uses an Images directory and I got a 404 for that. I copied the Images directory and the 404 went away. I thought the same thing woul ...Show All
Windows Live Developer Forums Is there a way to import MSN messenger/Yahoo messenger/AOL messenger into a universal address book.
Is there a way to import MSN messenger/Yahoo messenger/AOL messenger into a universal address book. I was asked by my management to find out how some of the other sites have implemented this functionality. Hi, We have a website developed in asp.net 2.0, c#, sql server 2005. I need to provide users with a way to import their address books from gmail, yahoo, hotmail, and aol at the least. I searched the net, and found soooo many solutions, most providing code to be integrated with our code, some providing web sites that would do the conversion. Ideally I'd like to connect to some sort of a service where we would provide the service the user's email and password, and would get back a comma separated list of address info from their addres ...Show All
Visual Studio Team System Project Alerts for Work Items Assigned to you
Is there anyway we can create a project alert to alert users whenever a new work item has been assigned to them Thanks, Maggie Yes, we have modified the "task" and "bug" work items, exactly the work items that have a blank subject line. I am not sure about the System.Title field... I will check into it... Thanks, John ...Show All
Visual Studio Inline Text of SeeAlso
Hallo, the inline text within a seealso tag is ignored in the generated documentation for both styles, for instance /// <seealso cref="IComparable.CompareTo">IComparable.CompareTo</seealso> For this example a reference for CompareTo is displayed as a link and not for IComparable.CompareTo. With best regards Dr. Voss We aslo discussed See Also at http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=708404&SiteID=1 . Let me know the support you would like to see in Sandcastle transforms for See Also and I will make sure we support them. Anand.. ...Show All
Windows Forms Autocomplete dropdown not disappearing
I have created an autocomplete collection for a textbox, and it works fine when using the mouse i.e. when entering text the dropdown appears, select an item with the mouse, the drop down disappears and the item appears in the box. However when using the enter key, the item appears in the textbox but the dropdown still remains, is there anyway of making the autocomplete dropdown disappear when using keys, just like the mouse buttons. I also have the autocomplete set to suggest. I think the reason may be the fact that when the enter key is pressed, i catch the event in keydown method and call a search method. What do you think ...Show All
