Rob Davis38041's Q&A profile
Visual C# How can you get a reference to a property by name?
I need to get a reference to an objects property by name. I know how to use the PropertyDescriptor's GetValue and SetValue methods to get and set the value of an objects property. But my issue is I need to get a reference to the property itself. For example I need to do this: public Person PopulatePerson(Person p) { GetReference(p, "FirstName") = "Chris"; return p; } The above example is over simplified compared to what I need to do, but the end result is the same. I wont know what the property is I need to set until runtime. Please keep sample to either C# or VB.NET. Thanks Instead of using a PropertyDescriptor, you can use a PropertyInfo (which also has GetValue and SetValue) returned ...Show All
Visual Studio Microsoft Visual Studio cannot shut down because a modal dialog is active. Close the active dialog and try again.
I am facing this problem most often..When i am in view code of SQL Server Business Intelligense Develpment enviorenment..its stop to open Ctrl F to open the Quick Find message box on key stroke whicle from main menu its opening the same quick find message box ..and though i try to close the project its giving error below.. --------------------------- Microsoft Visual Studio --------------------------- Microsoft Visual Studio cannot shut down because a modal dialog is active. Close the active dialog and try again. I have to manually close the window from TASK MANAGER.. Please look into matter or guide me where i sud put this matter.. This a aborant behaviour and should be addressed before the next release. I am trying ...Show All
.NET Development ADO.NET book recommendations
Thanks anyway; but, I've already searched Amazon and other online book sites. Many of the books listed by those links were pre VS2005 and/or the types of books that did not meet the above mentioned criteria. That's why I was asking for specific recommendations. Perhaps I should have added that I was interested in books with which the recommender had personal experience. Here's a copy of my orginal question: Can anybody recommend what I would consider a good book on VB8 and ADO.NET If it exists, such an animal would have the following qualifications: does NOT simply repeat what is already available from BOL, MSDN, etc., does explain how to programmatically use ADO.NET rather than just demonstrating how to use wiza ...Show All
Visual Studio Team System Locating Work Item Attributes In TFS Databases
We've written several custom reports against the TFS databases. I've been using the brute force approach to determine where the work item attributes are stored in TfsWarehouse and TfsWorkItemTracking (i.e. manually reviewing the databases). Is there an easy way that I can accomplish this ... either a mapping document or search capability within Server Management Studio Thanks in advance. I would strongly advise against writing reports directly against the databases themselves, since the schema of the DB is subject to change. It is not a publicly supported interface of the TFS system. You could also potentially introduce perf problems in your system. That said, if you do want to read values of Workit ...Show All
Smart Device Development Disable context menu in browser
I saw this . But I'm not satisfied. I don't care if I use WebBrowser, something else, hack the registry or whatever, but I must shut off the right click menu. I'm writing a kiosk-like webbrowser and users can't go open the context menu to open up bookmarks etc. Is there really no way to turn it of, or make a browser that doesn't have it Any tips are appreciated. Hey, I have been researching the same thing. This is about as good as it gets and it should work for what you are wanting: http://blackbeltvb.com/free/webbmenu.htm - Robert From http://www.seorulebook.com ...Show All
Visual Studio Team System Question about CA1002 - Do not expose generic lists
Hello I have a question about the behaviour of rule CA1002. I use VS.NET 2005 and the following code illustrates the basic idea of my problem. public class MyClass { private List<int> intList = new List<int>(); /* * This raises a CA1002 warning which we all can agree with. */ public List<int> IntList { get { return intList; } } /* * This also raises a CA1002 warning ... but should it . * Rule CA1819 allows an array to be returned from a function. We believe * that it also should be allowed to return a generic list from a function. */ public List<int> GetPrimeNumbers() { List<int> primeList = new List<int>(); primeList.Add(3); prime ...Show All
Visual C++ Abstract class object
i hav read in all books dat we cant create object of abstract classes.. . and reasons like they are too abstract to create an object.. .. i want to know more of these reasons why we cant create objects...... . . . . manish in above case comiler is having each information to create an object then why cant we create an object of above class .. good question :) in this scenario, YES! it has enough information to create an instance, but can compiler always feel confidence to do so or you may suggest the compiler to validate the abstract class and make a decision afterwards, again YES!, you can implement an compiler that allowing you to do this, but this is an contravention to the concept of abst ...Show All
Visual Studio 2008 (Pre-release) navigate between windows
hi everyone, i created more than one window in a wpf project and i need to know how to navigate from one to another.. is there something like response.direct or even setVisible thank you Hey, I'm with her in the same project, thx a lot for the quick reply... but actually I need to modify the question a little bit.. Firstly, If i do that.. using window show and hide...is it correct for an application I mean should I browse through windows or pages Meaning: Should I have a main window, then browse through pages, or is the window thing ok And if so, then should i copy properties each time Also, I found something relating to stacked windows maybe that's it Really, thanks a lot... ...Show All
SQL Server SQL Select
Hi, I've got 2 tables with 2 fields each; Table1 is the master account list with fields: AccNo and AccDescr Table2 is the account balances with fields: AccNo and AccBal If an account has no transactions and no balance it doen't appear in Table2; Table1 is a complete list of all the accounts; I want all the accounts to appear on my report...if there is no balance (doesn't appear on Table2) it should still be on the report with a 0 balance; How can I achieve this Currently only accounts with a balance displays; This is my SQL statement: SELECT Table1.AccDescr, Table2.AccBal FROM Table1 INNER JOIN Table2 ON Table1.AccNo = Table2.AccNo Thanks Thanks for the reply. But it di ...Show All
Windows Forms Combobox in DataGridView Cell problem
Hi all, I hope this is a simple problem that someone can help with. I have a windows application with a DataGridView. The last three columns of this grid contain combo boxes in each cell linking to three different lookup tables on our SQL server. When a useris using the application and they select one of the options from the drop down list it displays no problem, they can then click a button to save changes. The problem lies if the user makes a mistake with the drop down choice. If i want to leave the field as a null value there is no way they can delete the choice in the combobox. To try and get round this i created a null entry in the lookup database but this created a different problem. With this in place when a user selects the values ...Show All
Visual C++ error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup MSVCRTD.lib
Hello, I am pretty new on VC ++ 2005. I use VC++ 2005 and created a Win32 console application. I got the error messages: Error 1 error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup MSVCRTD.lib Error 2 fatal error LNK1120: 1 unresolved externals C:\C++ Projects\ImageStore\Debug\ImageStore.exe 1 Here is the code. Thanks in advance! //Imagestore.cpp #using #using using namespace System; using namespace System::Collections::Generic; using namespace System::Text; using namespace System::Data; using namespace System::Data::SqlClient; using namespace System::IO; namespace ImageStore { private ref class Class1 { public: static int Main(array ^args) { int errorCode = 0; Class1 ^oMain = gcnew Cl ...Show All
Game Technologies: DirectX, XNA, XACT, etc. seeking for Alpha Blending code,when draw subjects with "front to back" order in stead of "back to front"
hello everyone! In my project, there are many slices, and now I Draw them in the order of "back to front" ,and use the following codes to achieve alpha blending, the result is correct! pass P0 { ZENABLE=TRUE; ZWRITEENABLE=FALSE; CULLMODE=CW; DITHERENABLE=FALSE; ALPHABLENDENABLE=TRUE; BLENDOP=ADD; DESTBLEND=INVSRCALPHA; SRCBLEND=SRCALPHA; ALPHAREF=0x00000002; ALPHATESTENABLE=TRUE; ALPHAFUNC=GREATEREQUAL ; ColorOp[0] =SELECTARG1; ColorArg1[0] = DIFFUSE; AlphaOp[0] = SELECTARG1; ALPHAARG1[0] = TEXTURE; VertexShader = compile vs_3_0 VS(); PixelShader = compile ps_3_0 PS(); } But when I Draw Them in the order of "front to back",and use the following code to achieve alpha blending, there was nothin ...Show All
Visual C++ Creating a function in a COM DLL.
Hi. I am new to creation of COM DLL. I have created a COM DLL but i really confused about creating a function and using it in a VB application. Can someone please guide me and give an example code for a sample function. Thanks in Advance. Can you tell us what your requirement is From this and the previous post I have figured out that you are actualy trying to get some chunk of data to transfer from the VB dll to C dll or vice versa. If you are not very bent upon COM, there are other easier ways of doing the same. It would be better if you elaborate requirements here so we can provide more help. ...Show All
SQL Server Sorting Reports with ReportExecution2005 web service
I've been banging my head against this for a while now and have searched through the documentation and google and posted to the newsgroups with no luck. The ReportExecution2005 namespace contains a sort method, but the documentation doesn't indicate how it's used. The method accepts a string for the sort item, but that string apparently has to be an integer. I've called the method and regardless of the input, the result is the same: * The sort method returns 1 and the report item passed in is the report item returned in the 'out' variable. * The sorting is not reflected in the output of the Render method. I can't simply use interactive sorting because, in our deployment, the SQL Server and Reporting Services are not accessible ...Show All
SQL Server SQL SP1 build 2047 installation error
Hello, I am having problems installing the SP1 for SQL server 2005 on a W2K3 R2 server. It appears that the Database Services and Analysis Services are not being updated. I would appreciate any help with this if anyone has seen or had experience with this issue. Thanks, the basic log file is listed below. Redist9_Hotfix_KB913090_3.log 09/17/2006 19:15:53.408 ================================================================================ 09/17/2006 19:15:53.408 Hotfix package launched 09/17/2006 19:16:57.719 Attempting to install instance: SQL Server Native Client 09/17/2006 19:16:57.735 Attempting to install target: HOSPSQL 09/17/2006 19:16:57.735 Attempting to install file: sqlncli.msi 09/17/2006 19:16:57.782 Attempting to ...Show All
