Holm76's Q&A profile
Windows Forms displays the ValueMember after selection in DataGridViewComboBoxCell
Hi, in the datagrid i have a DataGridViewComboBoxCell column. i populate dynamically using dataset. i have defined the ValueMember , and DisplayMember. in the program when i select the one of the item, after i move to another control, it shos the ValueMember rather then DisplayMember. if any one come across this problem or know solution please advice me. Thanks Pushpa ...Show All
.NET Development Assembly.Load(): Fails once, fails always ?
Scenario: Dynamic assembly loading: If an assembly does not exist, install it from the network. Consider the following code: 1: Assembly oAssembly; 2: try 3: { 4: oAssembly = Assembly .Load( "ClassLibrary1" ); // Will fail since assembly is not available. 5: } 6: catch ( Exception ex) 7: { 8: // Copy ClassLibrary1 to AppPath\ClassLibary1 folder 9: } 10: oAssembly = Assembly .Load( "ClassLibrary1" ); If you run the code above it fails at line 10, although the assembly is available at that time. It seems that when an assembly can't be loaded the 1st time, the application will not try to load it the 2nd time, even when it is available at that time. Is it possible to force the application to try to load it the 2nd ti ...Show All
Visual Studio 2008 (Pre-release) WCF Client blues (MSDN Subscriber)
Hello. I have been trying to write a WCF client to consume a java-based web service secured by Apache WSS4J but have not been successful. The web service requirements are: 1. Must be accessed via https (i.e. SSL). 2. Request must use SOAP 1.1 format. 3. The SOAP Body in the request must be signed, with the BinarySecurityToken (X509 certificate) embedded in the headers, per WS-Security 1.0 spec. 4. However, the web service itself does NOT sign the responses. So, the client must NOT expect the response to have any WS-Security headers in it. First off, how would you implement your WCF client given the above requirements If only someone can answer this question, I'd be in heaven.  ...Show All
.NET Development Remote MSI install using c# and WMI
Hi, I having a problem whilst trying to install an application on remote machines using WMI. The code im using seems right, but it just isn't working. Can anybody,please, help point me in the right direction Or maybe post a link/script i can have a look at Just to note the strings.. _DOMAIN _USERNAME _PASSWORD _MSIPATH _ARGS _MACHINE are all set correctly before they are passed to the method... Here is the code I'm working on...The thing is it doesn't throw any Exceptions at all, but it dosen't work either. So i am at a bit of a loss as how to fix it... Any help at all would be greatly appreciated. CODE: ----- public void installMsi(string _DOMAIN, string _USERNAME, etc, etc) { ManagementScope ms = null; // Connect ...Show All
.NET Development Using single instance of custom CacheDependency class for multiple cached items
I've written a DBCacheDependency class that inherits from CacheDependency to address specific business needs not covered by SqlCacheDependency. I'm have a shared collection of DBCacheDependency objects (in a custom BasePage class that inherits from System.Web.UI.Page). When an item is being inserted into the data cache, an instance of DBCacheDependency is required. I first search the shared collection to see if an existing DBCacheDependency instance exists, otherwise I create an instance and insert it into the collection. When the resource monitored by one of these DBCacheDependency objects changes, NotifyDependencyChanged is called, which sets the HasChanged property to True and expires items in the cache that were dependant on it. Th ...Show All
Visual C# String to bool Conversion
Hi, I am a beginner of C#, let alone programmin in general. I was practicing some for loops and if statements. So I came up with the following code: using System; namespace ConsoleApplication1 { class For { public static void Main() { int sum; int i; Console .WriteLine( "Hello and welcome to the randomonitator" ); Console .WriteLine( "You have two choices, (1) or (2)" ); Console .Write( "Pleace select a choice: " ); string enter = Console .ReadLine(); if (enter = "1" ) { for (i = 0; ; ) { sum = i * i; i++; if (sum > 500) { break ; } Console .Wri ...Show All
Visual Basic VB.Net generated EXE
I developed a windows application in VB.NET. If I place it's EXE in my desktop it works fine. If I place it on a network location it gives me this error: http://img53.imageshack.us/my.php image=mserrorxc1.jpg I have a write access to network place, so I don't know why exe file won't work there. Thanks! What I can tell is that there's some policy on your app. Example, in IE, you cannot open ActiveX controls on a web page locally, unless you authorize it to. look at this http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=335458&SiteId=1 ...Show All
Game Technologies: DirectX, XNA, XACT, etc. can't build space wars; attempt causes VS 2005 to hang
I have Visual C# 2005 Express and Game Studio Express. I've been working with random projects in 2005 Express and they compile and run fine. I was able to build and run the "Your First Game" tutorial without any problems. I created a new SpaceWarWin project; this seemed to go fine. But when I start to build it (F5, F6, ctrl+F5, right-click+build), the status output (lower left) says "Build Started...", but no build appears to actually start, and my entire machine slows to a crawl. No freeze/hang, mind you, just everything very, very slow. Task Manager shows 2005 Express as "Not Responding", and my CPU jumps to ~50% and just stays pegged there, though there's no disk activity and nothing apparently happening ...Show All
Visual C++ error C2440: Converting to managed: objects cannot contain NULL pointers?
Sample unmanaged code: OleDbConnection *dbConn=NULL;| if(dbConn == NULL) { ... } Sample managed code: OleDbConnection ^dbConn=NULL; //C2440 "cannot convert from 'int' to System::Data:OleDb::OleDbConnection ^" if(dbConn == NULL) //C2440 Similar problems exist when attempting to return a NULL pointer from a function which normally returns an object pointer. I attempted to use const but that only increase the amount of debug errors by a gross amount. What is it with C++/CLI and NULL There must be a workaround. -Ryan You're looking for nullptr. In C++ NULL resolves to 0 which has lots of meanings depending on context. In C++/CLI things got w ...Show All
Smart Device Development Single Instance Application and Compact Framework 1.0
Hi, First off, I have looked around and struggled with this problem, massive apologies if I have missed something obvious! I am finding that when I launch a compact framework 1.0 application from my device I am able to launch multiple instances by simply clicking the exe quickly. It will load several although a few will crash. If I launch an exe, wait until it's finished loading and then try and launch it again it will just bring the already open application to the front (this is what I want). I looked through a few tutorials, one which used the Mutex class. This didn't work as the overloaded constructor used in the example doesn't seem to be available to the compact framework 1.0. If I hammer away opening lots of instances several will c ...Show All
Windows Forms Application losing focus on debug.
Hi all, When I run this test method in debug mode and walk through the code, the send keys try and edit the source code instead of the test application. Is there a way to force the sendkeys to the application I.e. What I was trying to do with the MainForm.select() Mainform is a system.windows.form.mainform. Thanks Dan [Description("Test help desk login was successful."), TestMethod()] public void TestLoginAsHelpDesk() { MessageBox.Show("Starting"); Class.Settings.EnableHelpDeskLogin = true; MainForm.Controls .Select(); System.Windows.Forms.SendKeys.SendWait("{ENTER}"); MainForm.Select(); Application.DoEvents(); System.Windows.Forms.SendKeys.SendWa ...Show All
Visual C# Accessing another app's message queue in C#
I'm not actually sure if this is possible, but how would you go about this in C# if it is possible Say I wanted to minimize every occurence of Notepad, how would I code it so that it posts a message into the message queues of every instance of notepad.exe telling it to minimize Thanks in advance! - Javawag You need to use PInvoke and send the messages. Here is a code sample of how to close a Window http://forums.microsoft.com/msdn/showpost.aspx postid=935502&siteid=1 changing WM_CLOSE to WM_MINIMIZE will do it for one window. Changing FindWindow for EnumWindow like in http://pinvoke.net/default.aspx/user32/EnumWindows.html Should do it for more than one window. ...Show All
Architecture BPEL, XPDL and BPMN
"BPEL is a standard which supports webservices and system to system applications workflow. For more of a human workflow, XPDL promoted by WFMC is the best." "BPMN is for modelling and supports both XPDL and BPEL. Simple BPEL based modelling tools for BPMS systems lacks a lot compared to BPMN based systems" Please provide me with your comments on the above statements. Also that, what standards are been followed in WF. Regards " We are in talks with partners to add BPMN modeling for WF" Are there any partners that have currently done this to date Can you provide your thoughts about approaching a BPMN to XOML conversion given a BPMN modeler tool for which the outp ...Show All
Visual Studio Express Editions File Path Error
At compile time, the application read the source file from the correct path. But, when the application is deployed, the source file will be included in folder of the project. As a result, the "can't find file" error at the client computer. Example: at run time, the application is in this location; C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\TestProject\TestProject\termFile.txt But, when the application is deployed, the termFile.txt file will be included in the c:\TestProject\Deploy\termFile.txt instead. When the client setup and installed the application, the program still try to access the old location C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects ...Show All
SQL Server WHAT NEXT AFTER INSTALLING SQL SERVER EXPRESS?
I have installed SQL Server Express with Advanced Services SP1 option. I am not really sure if I should have done this but I could not resist the temptation to have as many options as I could get. I even installed some samples/sample databases. However, I cannot understand how to start using the SQL Express package which (unlike the Visual Basic 2005 Express or the Web Developer Express I also downloaded) does not show me a start up page. I get SQL Server Configuration Manager, SQL Server Error and Usage Reporting and SQL Server Surface Area Configuration, all from Configuration Tools. I have no idea how to proceed. Could I have downloaded the wrong package If you download the SQL Server Management ...Show All
