.net

Creating UI problem

I am creating a program which has an installer-like interface. Is it better to implement it with ShowDialog method of Form class or doing an MDI interface? Below are the ways I tried to do it using the ShowDialog method, and the problems I have with them: 1) First form ShowInTaskbar property is set to true, other form is set to false. ...

String Matching.

I have a string String mainString="///BUY/SELL///ORDERTIME///RT///QTY///BROKERAGE///NETRATE///AMOUNTRS///RATE///SCNM///"; Now I have another strings String str1= "RT"; which should be matched only with RT which is substring of string mainString but not with ORDERTIME which is also substring of string mainString. String str2= "RAT...

Resource for Microsoft beta certification exam 71-515 Web Applications Development with Microsoft .NET Framework 4

I am looking for good resources to study this beta exam. Until now the best I have found is this list of post gathering links covering the topics. These are mainly MSDN documentation links and is not always ideal to face the exam. Do you have any resource/tests to train against the corresponding 3.5 exam? is it the 70-528? Any help/adv...

Pass MSI parameters to .NET installer class

Hello Gentlemen! I have an exercise for you ! :) I need to get an [INSTALLDIR] MSI property in my Installer class implemented in C#. Using InstallShield 2010, I created a component with a .NET assembly defined as key file of the component. Specified that the component is a .NET Installer Class, implemented required interface and made s...

How to programmatically execute the Network Setup Wizard and cofigure a lan connection with static ips using C#

Hi, I am creating an application that is connecting to another computer through an Ethernet cable in XP. I need to execute the network setup wizard to setup a local area connection (with File sharing Turned On) and then set static ips and the default gateway; all this programmatically using C#. How can this be achieved? ...

unable to find an entry point named 'interlockedexchange'

Hi , I built an application in c# vs2005 .net . Everything works fine when i run the application in win 32 bit, But when running the application in win 64 it crashes while trying to call the pinvoke interlockedexchange(which is within the kernel32.dll) function . This is the exception : unable to find an entry point named 'interlocked...

DataContractJsonSerializer set value extension point

using System.IO; using System.Runtime.Serialization; using System.Runtime.Serialization.Json; using System.Text; namespace ConsoleApplication1 { internal class Program { private static void Main(string[] args) { var pony = new Pony(); var serializer = new DataContractJsonSerializer(pony.GetType()); var example = ...

Need help to debug application using .Net and MySQL

What advice can you give me on how to track down a bug I have while inserting data into MySQL database with .Net? The error message is: MySql.Data.MySqlClient.MySqlException: Duplicate entry '26012' for key 'StockNumber_Number_UNIQUE' Reviewing of the log proves that StockNumber_Number of 26012 has not been inserted yet. Products in...

How can I install a windows service onto a machine that doesn't have Visual Studio installed?

The only way to install windows-service I know is using "Visual Studio 2008 Command Prompt", Is there a way to install windows-service on a machine which isn't having Visual Studio installed (assume that .Net version 2.X is installed.) ...

getting a gridview and dropdownlist to remember their states after navigate away and back button scriptmanager

hi i have a page filling a gridview which is all working fine. the grid is basically the result of a search .. the filters for which are a number of dropdowns and a couple of textboxes the data from the grid and dropdowns are saved in the session and the whole page lives inside an updatepanel when i navigate away from the page (as i...

Using VSTO in a standalone application to access Excel sheets

Dear all, tried to research on that but sometimes I seem to lack some googling skills... I want to develop a (standalone) WinForms application which uses automation for communicating with Excel. I already know how to use the Interop, but I thought the VSTO tools would provide a more comfortable or sophisticated way to do that. My idea...

Are there more secure alternatives to the .Net SQLConnection class?

Hi SO people, I'm very surprised this issue hasn't been discussed in-depth: This article tells us how to use windbg to dump a running .Net process strings in memory. I spent much time researching the SecureString class, which uses unmanaged pinned memory blocks, and keeps the data encrypted too. Great stuff. The problem comes in when ...

How do I extract a substring from a string until the second space is encountered?

i have a string like this: "o1 1232.5467 1232.5467 1232.5467 1232.5467 1232.5467 1232.5467" How do I extract only "o1 1232.5467"? The number of characters to be extracted are not the same always.. hence I want to extract until the second space is encountered. ...

Change Windows user password remotely using .NET

How do I change a local user account password remotely using VB.NET/C#? I have looked into the DirectoryEntry class and know how to add users to a group but cannot figure out how to change a (local) password. ...

Why need to mention "Supported by the .NET Compact Framework" for classes members ?

In MSDN documentation, many .NET classes methods (like ArrayList ) mentioned that "Supported by the .NET Compact Framework". How internally it has been modified so that it has been supported by .NET compact Framework? I assumed all the .NET Base class library can be used on .NET compact Framework. ...

Best practice for secure socket connection.

What is the best practice for a secure socket connection (without SSL). I will be moving sensitive data (logins/passwords/accounts) across TCP Socket connection, and wondering if there is a good/fast way of Encrypting/Decrypting and avoiding malicious injection. ...

Winforms: How to Skin Scrollbar in ComboBox?

Hi, I have skinned most controls in my Winform app, except the ScrollBar in ComboBox, Any ideas? Thanks. (I use C#/.NET 2.0) ...

Winform and ValidateChildren()

Probably a stupid simple question but here goes. If I have a winform app and on the Validating_Event for a container control I call ValidateChildren(). I am assumming I need a Validate_Event for each child control that I want validated, correct? I know I need the control to have Causes Validation = True but I would still need to put...

Reporting Services add empty newlines when converting to word

Hello, I am facing a problem where "Reporting Service" show me the report perfectly in reporting manager but once I export to word document I get unwanted new lines in table cells when the cell contains a plain text and a place holder. ...

Why aren't .NET "application settings" stored in the registry?

Some time back in the nineties, Microsoft introduced the Windows Registry. Applications could store settings in different hives. There were hives for application-wide and user-specific scopes, and these were placed in appropriate locations, so that roaming profiles worked correctly. In .NET 2.0 and up, we have this thing called Applicat...