white2grey's Q&A profile
.NET Development How to use Configuration.GetSection() and ConfigurationManager.OpenMappedExeConfiguration()
Hi all, I want to access a custom section located in a different config file than the current default one and I managed to use ConfigurationManager.OpenMappedExeConfiguration() to retrieve a Configuration object for that config file after supplying it with a properly constructed ExeConfigurationFileMap object. From the Configuration object, I managed to use the Configuration.GetSection() to retrieve the correct custom section, which uses NameValueSectionHandler. But after that, I don't know how to obtain the data in the form of NameValueCollection. Can someone help If it is the default config file, I can simply use the (NameValueSection)ConfigurationManager.GetSection(...). I managed to use ConfigurationSection.SectionInformatio ...Show All
Windows Forms Combo Box Items Value
Hi Guys, I wanna have a combo box that returns a value other then its text to its data source. Basically, I have a textbox that has the values 'Male' and 'Female' and I have it bound to a datasource and I want it to return a value of just m or f. Any ideas Thanks in Advance That does help but I need one more thing. I need the value of the selected item to be bound another field in a database. I have tried doing this through the form designer but when I change the field and then click my update button the text changes to F or M respectively. Any ideas ...Show All
SQL Server Infinite Loop in cursor
Hi I have an infinite loop in a trigger I and I cant reslove it. In my system the user updates a stock table from the GUI and on the update I need to check values to see if I need to add records to a StockHistory table. For Example: If the user changes the grade of Product X from A to B then I need to add a new line in StockHistory for product X grade A that decrements the total number of products in the warehouse. Similary I need to increase the quantity of stock for Product X grade B. I had the trigger working for single updates but now when stock is added to the database (from another db) it has status of 'New'. This isn't actually 'in stock' until the user sets the status to 'Goods In'. This proces ...Show All
.NET Development stack overflow and memory corrupt when use DsBrowseContainer
[DllImport("dsuiext.dll", CharSet = CharSet.Unicode, SetLastError = true)] public static extern int DsBrowseForContainer(IntPtr infoHandle); public delegate int BffCallBack(IntPtr handle, uint message, IntPtr param, IntPtr data); [StructLayout(LayoutKind.Sequential)] public struct DSBrowseInfo : IDisposable { /// <summary> /// size of structure in bytes /// </summary> [MarshalAs(UnmanagedType.U4)] public int size; /// <summary> /// dialog owner /// </summary> public IntPtr handle; /// <summary> /// dialog caption text (can be NULL) /// </summary> [MarshalAs(UnmanagedType.LPWStr)] publ ...Show All
Visual Studio Express Editions Registering after trial period
In the past I have used this program, but did not register. Now, a few months later, after coming back to this program (Microsoft Visual C++ Express Edition Beta 2) it says my trial period has expired. I now have a legit key to use, but cannot enter the program to input it as it says it has expired. Is there another way to register I have already uninstalled the program, then reinstalled it, to the same result. And I don't feel like reformatting my computer just to get this working either. Any ideas If you install from the manual installation you will not have to register the product. Go here and follow the instructions: http://msdn.microsoft.com/vstudio/express/support/install/default.aspx Thanks. ...Show All
Visual Studio Express Editions Dropdown-Button
Hi, is there a win32 equivalent to the C# ControlPaint.DrawButton command I'd like to create a window-theme-aware dropdown-button and i don't think that writing my own drawing-code for the WM_PAINT-handler is the right solution. regards Christian thanks for the quick reply, that is the function i was looking for, but i am wondering what to do to make this function use xp-style. after including this "xp-style"-manifest file in the project all the other controls are painted in xp-style, but not the components that were painted by the DrawFrameControl()-function... ...Show All
Visual Studio Express Editions saving decimal number to database
Hi I have a problem I can't save decimal number to database. that's my code: dim x as decimal x = textbox1.text Dim datasave As New MaintenanceDatabaseDataSetTableAdapters.MaintenanceTableTableAdapter datasave.Insert(x) I also changed data type in table definition to Decimal what should I do Thanks Hi. The data type on table defenition, is it Decimal(18,0) ! If so change it to Decimal(18,2) for example. Changing the 0 for the 2 will allow the sql table to store a number with 2 decimal places. Best regards. dp ...Show All
SQL Server Parameterize flat file connections
I have some flat file connections that I want to parameterize the ConnectionString. For the ConnectionString expression, I am using the value @[User:V_Root_Path] + "SomeFileName" + ".txt" where "SomeFileName" is the Name property of that flat file connection. How to replace the now hardcoded "SomeFileName" to point to the Name property of the flat file involved Something like This.Name, or Me.Name, if you get what I mean. Thanks for help. You can create a variable, let's say @[User:V_My_File_Name] and then change your expression to @[User:V_Root_Path] + @[User:V_My_File_Name] + ".txt" this would give you the flexibility of havin ...Show All
Windows Forms MessageBox not given Focus
I'm having a problem with my message boxes displaying properly in an application. It was originally written by someone else in C# and I'm not sure why I'm getting this error or even where to look for a culprit. Here's a description of the steps involved to replicate the problem: 1. Open a standard SaveDialog 2. Pick an existing filename to save over 3. Prompt for overwriting does not appear on top of the screen 4. Hitting the ALT key brings the message box to the foreground and allows for the program to continue. I get this same error whenever I call a message box anywhere in the program. I originally thought it was being obscured by controls but that was not the case; the messagebox is not rendered in the foreground ...Show All
Visual Studio Tools for Office ThisDocument.Close raise an unhandeled exception "this method or property is not available ..... another application"
Hii all, I really appreciate any help or suggestion guys ... i am just facing a really hard time with this one. I opened a VSTO document from internet browser ... something like this URL :http://testSRV/WordDocument1/WordDocument1.doc the server (testSRV) is on another machine and so does the document (there is no local copy ). I implemented a close button in the actionPane that is supposed to close the Word Document using the method Globals.ThisDocument.Close() however, when the user click on the button the following error appear (This method or property is not available because this doucmetn is in another application ) Exception Text:- System.Runtime.interopServices.COMException(0x800A11FD) at micr ...Show All
Visual Studio Team System Email notification per folder per user
Hello! Is there anyway we can restrain the email notifications for only certain folders in the Team Project Also, not the every member of the development team checkin but just a particular developer checkin should instigate these email notifications. Thanks! Hi sunny: It seems that we have tried everything we thought of so if possible can you contact tech support and see if they can help you. Mention or reference this thread so they can contact us and we can then work to troubleshoot your setup. thanks, mario ...Show All
Windows Forms Display multiple fields in a DataGridView cell
Hi All! How do I display multiple fields (1 line per field) in a DataGridView cell (more like ASP .NET's repeater or GridView's ItemTemplate capabilities)... i need to display it like below: Cell1 | Cell2 ------------------------------------------- ID | Desc Name | Other Field Address | etc. ------------------------------------------- ID | Desc Name | Other Field Address | etc. -------------------------------------------- Any help will be very much appreciated. You asked already this 2 days ago: The best aswer was from Zhi-Xin Ye. " Use virutal mode and use the CellValuesNeeded" Here is the link to the original post http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1197954&SiteID= ...Show All
Visual C# how to save something in my application...
this application help me to save time opening alot of other application . by add applications I want to open in a list and open it all by one click .. the problem is how can I add application and save it , so when next time open the applicatin it still in the list ... e.g. app=app1&app2&app3 i want to add app4 to the list... so app become app=app1&app2&app3&app4 next time when run app >> the four another apps is still there in the list this is my code up to now using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; namespace ...Show All
Visual Studio Express Editions How to set \clr in Visual Studio 2005?
How to set \clr in the project properties in Visual Studio 2005 Thank you!!! ...Show All
SQL Server Deploying SSRS 2005 Reports Using .NET 1.1 Application
Hi, We have a bunch of reports for SQL Server Reporting Services 2005, and we need to deploy them programmatically. However, our installation application is written using .NET 1.1. Does anyone know of any problems/issues with using a .NET 1.1 application to deploy SSRS 2005 reports We're just needing to know if we should upgrade our installation application from .NET 1.1 to .NET 2.0. Thanks. Supposedly you are using the RS 2000 SOAP endpoint in your .NET 1.1 application to deploy reports. This SOAP endpoint is still supported in RS 2005, so your existing application should work fine. -- Robert ...Show All
