Victor Luo's Q&A profile
.NET Development Is it possible to manually control the assembly version numbers when creating & building a class library?
Is it possible to manually control the assembly version numbers when creating & building a class library The first two numbers always remain "1.0" The last two numbers seem to increment automatically. How can I change the first two numbers Is it also possible to control all the numbers Many thanks! - Kevin Kevin, Simply change the AssemblyVersion attribute (typically located in the AssemblyInfo.cs/AssemblyInfo.vb/Assembly.cpp) and change the value from "1.0.*" to "1.0.0.0". ...Show All
Windows Forms The .net UserControl does not work in IE
Hi, I wrote a simple .NET UserControl to be an ActiveX control inside IE. The UserControl includes a textbox. In the web page, there is another html button to change the ActiveX's textbox value. The problem is: when the html button is clicked, the value of the ActiveX textbox does not change. I don't know why. This is the code for ActiveX user control: ----------------------------------------------------- using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Text; using System.Windows.Forms; using System.Runtime.InteropServices; namespace ActiveXDot ...Show All
Visual Basic Changing the Progress Bar Color
Anyone know how to change the color of the progress bar To change the Backcolor : ProgressBar.BackColor = Color Or to change the forecolor : ProgressBar.ForeColor = Color Hope this helps you. ...Show All
.NET Development Retrieve Single Value from DataTable
Hiya, I was hoping someone could explain how to retrieve a single value from a DataTable. I have a DataTable that is populated with a single row and I would like to assign a single value from that row to a textbox. I have seen plenty examples doing this with a DataSet but NONE using a DataTable directly. Any info would be greatly appreciated. Thanks! J.H. Hi, The sample which you have provided is great. I have a doubt in this line of code. Object o = dataTable.Rows[0]["ColumnNameOrIndex"]; Is that we need to give only a single ColumnNa ...Show All
Visual Studio 2008 (Pre-release) Bug: using a bool property in WHERE doesn't always work
Hi, I think I've found a bug in the DLINQ expression tree-to-SQL mapper. It's an obvious enough one so I guess you've already fixed it, but I want to make sure it doesn't continue to bug me in the next release . The third sample from 101 LINQ samples, when the condition "!p.Discontinued" is changed into "p.Discontinued", produces a strange SQL like "CONVERT(Predicate,[t0].[Discontinued])". It does work when "p.Discontinued" is the only condition in the WHERE part or if it's prefixed with a "!". I also tried using "p.Discontinued == true", but this doesn't even compile (which I ...Show All
Visual C# Multiple table fields as "DisplayMember" in a combobox?
I'm just testing C# with SQL, and have a little question... I have set up a combobox, to get it's data from a database table. The table have the fields ID, firstname and lastname. I want the dropdown to display (DisplayMember) firstname and lastname. Is that possible I can't choose more than one table field :( Using only one of them works fine (incredible how easy visual studio 2005 is!) Does anyone know how i can make it display both the firstname and lastname Create a new compute column , in your data table and set the value to firtsname + lastname. Otherwise you might want to add the itme manuall ...Show All
Windows Forms how to reference a routine or object in the form that contains a usercontrol?
I'm adding usercontrols to a container on a form at runtime. I want to have a button on the usercontrol (or any event) to access a routine (or any object) on the form that contains the control. Potentially this could be another control. I currently assume that a form is the parent object, and that a routine exists. I make a new instance  ...Show All
.NET Development .net 1.1 - datagrid -"endedit" problem
Hi, I am using .net 1.1 , .net 2003 and with c-sharp, window form designer . i have a form with one datagrid and a save button . i fill the datagrid with dataset (from database) . now scenerio :1 i edit a value in the datagrid after finishing editing , without press tab key ,i use my access key ( shortcut key) for the save button to save the modification, for my surprise - the last change i made in the datagrid did not reach the dataset. scenerio :2 but , if i edit a v ...Show All
.NET Development lock synchronization error using NetworkStream
Hello! I'm having a problem with using NetworkStream::BeginWrite() method. I've implemented a class CClient which contains a method SendMessage() which uses BeginWrite() method. The code is like this: void CClient::SendMessage(String^ message_) { //we convert the data from String to byte array: Monitor::Enter(sentData); sentData = Text::Encoding::ASCII->GetBytes(message_); Monitor::Exit(sentData); //we start writing data to the stream; tcpClient->GetStream()->BeginWrite(sentData, 0, sentData->Length, gcnew AsyncCallback( this , &CClient::SendData), nullptr ); } //... ...Show All
Visual C# how to convert array into an array of bytes?
Hi, I'm busy in C# trying to send an array (of string) structure from a server to a client app. I cannot find anywhere how to do this. Im using sockets to do this. but there isnt any method to convert the array into byte[]. Any suggestion would be appreciated. byte[] buffer = System.Text.Encoding.ASCII.GetBytes( "Diego" ); You can use Unicode if your string contains non-ASCII characters. Another handy method is int System.Text.Encoding.ASCII.GetByteCount( string ) if you want to make buffer calculations before the conversion takes place. Regards, Diego Gonzalez Lagash Systems SA ...Show All
Visual Studio Team System FxCopCmd.exe returned error code 1024
I am getting this at the end of running code analysis: FxCopCmd.exe returned error code 1024 Any help would be appreciated. Are you attempting to invoke the FxCopCmd.exe tool directly 1024 (0x400) is a special result code that indicates a message has occurred that should break the build. Can you provide more context for your execution scenario ...Show All
SQL Server CeWriteRecordProps failling with a empty FILETIME field..
Hi All, Does anyone have already made an application that writes some data into the EDB Pocket database I’m trying to insert a record with a empty FILETIME field and I’m getting the Error 87 (INVALID_PARAMETER), I’ve tested with some date in the field and the record is added sucessfull, it seems that the database doesn’t accept anymore empty FILETIME fields Is it true I didn't find anything in the docs. thanx in advance. Hi Laxmi, Thank you very much for your reply, I’m passing now a non-empty FILETIME and it's working very well, now I'm stuck in another function, a similar problem with the CeSe ...Show All
Visual Studio Team System Unable to call a target from overidden CoreCompile
Hi, I would like to perform a specific target just before each solution is compiled. Unfortunatly, team build performs a build including all solution in an atomic MSBuild call. To correct this behavior, I tought I could overide the default CoreCompile with my own version, in order to call a private target just before each solution is built. However, I can't get CoreCompile to call my target. Wondering what is wrong, I tried overloading CoreClean... and it worked beautifully! Questions: 1. Is there anything special about CoreCompile 2. What is the purpose of the constant _TEAM_BUILD_ defined just before CoreCompile 3. Is the ...Show All
Visual Studio Shared files are not marked with any special icon
I noticed that source safe shared files are not marked with any special icon in the solution explorer. This is very inconvinient, since anybody can forget that a file is shared and harm other projects using it! Thanks for reporting this. I opened a suggestion bug for this, but it's unlikely we are going to change this behavior for VS 2005 release. Hopefully we'll fix it in next realease... Thanks, Alin ...Show All
SQL Server Lost link to Report Manager
I have lost the menu link to report manager. Can anyone tell me what the file name is to run manager so I can search for it. I have looked in all the obvious places but can not find it. Thanks Robert, Thank you for the reply. It looks like I will need to re-install reporting services. Unfortunately I can not find the media. Any ideas how I can get hold of a copy (download or otherwise) Thanks again Jon ...Show All
