PublicError's Q&A profile
Visual C# How to find / locate a control on a form?
Hi, I have a configuration file, which specifies which controls should be disabled based on certain criteria. The only way I know of getting a refernce to the control in the form is to recursively go through every control. Unfortunately, this is not a viable solution for me. Does anybody know if there is another way to access the control I need based on its Name property, or any other property Any outside of the box solutions are welcome. Thanks a lot. Lidiya If I have to recurse, does anybody know what search algorithm is used in the ControlsCollection.ContainsKey method Since ControlsCollection is not implemented as a hashtable, I'm trying to figure out performance implications. Thanks again! ...Show All
Visual Studio Team System Code Analysis Check-in failed. The Code Analysis Policy requires you to check in through Visual Studio with an open solution.
Hi I have implemented Code Analysis on my Team Project. I am getting the below policy error when i try to check in ".sql" files. Code Analysis Check-in failed. The Code Analysis Policy requires you to check in through Visual Studio with an open solution. Work Around I found: Open any solution in VS IDE eventhough it is not related to .sql file and try to check-in the .sql file. Result No policy warning thrown and succesfully check-ins. Can i know is there any direct solution where i can check-in .sql file just whithout opening unnecessarily any unrelated solution. Thanks Murali Hi Mario, I have implemented two policies on my Team Project (1) Code analysis, 2)Custom check- ...Show All
Smart Device Development An alternative to Netshareadd
Is there an alternative to NetShareAdd method in the Windows Mobile API Can we share files on a Smartphone regards, shailender No, there's no SMB server on WM, so no shares. PPC has SMB client which can access shares on Windows PCs, SP does not have it. ...Show All
SQL Server Alter column with data
I am trying to use T-SQL to alter a column with data already in it from char to varbinary. This is very easy to do in Enterprise Manager, but just for my own knowledge I'm trying to figure out how to do this in T-SQL. I don't mind losing the data (I'm using a temp table to bring the converted data back in), but I want to keep the column in the same place. Here's what I have so far, but I keep getting an implicit conversion error: UPDATE UserProfile SET PassID = CAST(PassID AS VARBINARY(128)) GO ALTER TABLE UserProfile ALTER COLUMN PassID VARBINARY(128) GO In Enterprise Manager, there is an option to preview the code that will be executed. If you check that you will often find to make a change tha ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Blitting?
I've checked through the XNA Documentation, but there doesn't seem to be any way to 'blit'. For those of you unfirmiliar with 'blit': Blit is a way to draw something. For example, say you create a "Texture2D" variable, set the size etc... But the texture is blank. The normal way to create a texture to this is to load up a bitmap image with it through the ContentManager, right But what if you want to use a whole sprite-sheet with many images Back to the blank, say, 65 x 65 bitmap image, you obviusly don't want this 2D image of the player to be a whole 1024x768 sprite-sheet. So this is where I used blitting in other programs, it basically asks for the x, y co-ordinates, and the length of the bitmap and takes a picture from that x,y and 'c ...Show All
Software Development for Windows Vista LessThan cannot be used on decimal type ?
How do you do comparisons on currency values in rule conditions I want to do a simple discount test for a price < 50.00, where price is decimal type. Am I missing something easy Hi Kavita, Just realized you write using an int order value. In order to see the error you need to use a decimal order value. Maurice ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Animation sample?
Great work on XNA GSE 1.0! I downloaded it today and signed up for the 360 Creator's Club. Getting the basic engine code I've been working on under Windows for the past few weeks compiling and running on 360 was far easier than I was expecting (though it would be nice if the IDE had better support for projects that target both platforms). One aspect of the engine I've been avoiding for a while is mesh animation, as there has been talk around here for weeks that a sample would be released and I'd much rather start from a sample, even if it is very simplistic, than dig though the documentation enough to figure out how all the classes fit together. So my simple question is.. any updates on this sample Has it been made available and I'm j ...Show All
Visual Studio Team System Server not referred to by the FQDN
I want the server to refer to itself ONLY by the FQDN. http://img116.imageshack.us/img116/2330/properties9sk.jpg if you have a look in the image - the server name is Fully Qualified, although the link that it will send the user to is not. how do i make them both be the same FQ thank you. The link that the server sends to the client is generally constructed based upon the prototocol and server name used to connect to the server. If you clear the TFS cache on the client and then reconnect using a FQDN, you should see that the client uses that FQDN. There are a few places where TFS uses "absolute" URLs, and if you want a complete FQDN solution, you will need to upda ...Show All
Visual C++ finding the root path
Hi, i am working in VC ++ 6.0. i have some problem in hardcoding the path saving the files. My application saves the log files on hard drive (exception handling). for the time being i have hardcoded the path (e.g : c:\programfiles\abc\log) i don't want to hardcode the exact path. i want that my application should save the log files automatically in a folder (application root folder). wherever user installs the application either it should be c:\program files\abc or d:\program files\abc, my log file should automatically pick the root path and save the files in log folder in that root path. Pls help me in doing this. In my opinion, first you should obtain the path of your execut ...Show All
Windows Forms Capturing Keystrokes
Is there a way i can capture application-wide keystrokes in my application Basically, i want an event to fire whenever i press Ctrl+Shift+C anywhere in my application. It only needs to capture it if the application has focus i.e. i dont need to capture keystrokes sent to other applications. Is there an easy way to do this, or an example someone can give me for it If only there was a in MyApplication_Keydown in the application events section... Great - thats exactly what im looking for but with a slight problem... Are you able to convert that into vb.net ...Show All
.NET Development ExecuteNonQuery not working within CLR Stored Procedure
I've written a CLR stored procedure that pulls the results from a SQL stored procedure using a SqlDataReader. I send out the information via a web service and then try to log information returned by the web service using another SQL stored procedure via the SqlCommand.ExecuteNonQuery method. The information never gets written back and I get no exception. Any thoughts on how I can get this to work Thanks. I don't think permission is a problem because if it is, usually you'll get an error. I suspect if the insertion code is correct or actually gets executed. You might want to add some tracing or logging to your applicaiton. Also it's better to show some code snippets. ...Show All
Windows Forms Custom Control On_Load
I have a custom control and I want to run some code associated with it in the Parent Form on Panels On_Load event. (Similar to what happens when you drag a datasource onto a window, it adds the DataTable.Fill code to the Load event.) I want to do something very similar and I want the Designer to add the code to the parents Load event for me. Note: I do not want to attach a Handler to Parent.Load I want the code to in the load event so it can be easily modified by the end user of the control. Thanks, Martin Shane Horn Ummm... It is seen that it is possible to use the class CodeDomSerializer to realize what you want. Check the help related to this topic. See following articles: htt ...Show All
Windows Forms Runtime Loading/rendering of control takes time ?
Hi friends ! I do have some strange problem. I am loading some my own control at run time and i do add then in Panel (FlowLayoutPanel). But when i do run my project i am able to notice rendering of those controls. I am not able to understand whether it takes time to load control (using new MyClass ) or to render them (when I am dointg " panel.Controls.Add(MyControlArray(IndexOfArray)) ") MyControls Contains Label,SplitContainer and Object of may be textBox, ComboBox etc. Some code is listed here ! Sub setProjectScreenControls() Dim index As Integer = 0 On Error Resume Next index = 0 'editScreen is my Flow layout panel If editScreen Is Nothing Or editScreen.IsDisposed Then editScreen = New FlowLayoutPanel ...Show All
Visual Studio 2008 (Pre-release) Drag and drop in different applications
Can we drag a control on a window and drop it in a window in another wpf application the following addresses the issue http://blogs.msdn.com/marcelolr/archive/2006/03/06/544925.aspx http://blogs.msdn.com/llobo/archive/2006/04/11/573560.aspx ...Show All
.NET Development ADO Code not updating issue -- Help!!!
Hello, This is my first post -- I can not seem to write back my changes to the database.... if anyone sees anything out wack, please let me know. ' Not sure about the table mapping statment - or AcceptChanges() vers :: GetChanges(DataRowState.Modified) thx. Dave Gilden MCSD -- FT. Worth Tx ' this part of a ASP .Net 1.1 web app Private Sub btnUpdate_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click Dim SelectedServiceOrder As String ' assign service order SO Type number from selected value posted back from the drop down menu SelectedServiceOrder = Request("ddlSOTypeDesc") Dim AllowedServices As New ArrayList(7) Dim rowC ...Show All
