misexpert's Q&A profile
Visual Studio Express Editions A little help is needed for getting started...
I tried to search the previous posts, but couldn't find any help. Could you tell me the exact orders what to do start a new project I'd probably try some C-stuff before going to C++. For example if I want to copy-paste the following code to the editor, and make it work, what to do #include <iostream.h> void main() { cout << "Hello world!"; } Probably new->win32 console application, but what next Or if you could give me a link for a good tutorial for Visual C++ Expression Edition, I would highly appreciate it. Sorry for being a n00b, but I just need this information for getting started. Thanks. 1) File->New->Project 2) In "Project Types", select "Visual C++&qu ...Show All
Visual Studio 2008 (Pre-release) Confused by a Binding/Converter problem....
I've created a control which uses databinding and a converter class. <local:BitArrayConverter x:Key="bitArrayConverter"/> <local:BestTimeToContactBox x:Name="BestTime" BestTimeToContact = "{Binding Converter={StaticResource bitArrayConverter}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Source={StaticResource BTTC}, XPath=/Root/Number}"/> (BTTC definition... <Number>////f2dm////f3R5////fyBi/7//f2dh////f2dr////f2di////HwAA</Number>...) The "BestTimeToContact" dependency property is an array of ContentControls, and the BitArrayconverter takes that Base64 string and transforms it into such. This all works very nicely, just as I hoped. But now I am tryin ...Show All
.NET Development safer method to read DateTime from database?
hey all, when i read DateTime data from database, currently what i'm doing is: //System.Data.DataRow row; //System.Data.SqlClient.SqlDataReader reader; try { System. DateTime t; t=( DateTime )row[ "DateColumn" ]; //or t= DateTime .Parse(row[ "DateColumn" ].ToString()); //or t= DateTime .ParseExact(row[ "DateColumn" ].ToString(), "formateString" , cultureInfo); //or t=reader.GetDateTime(0); } catch { //... } but the above mehtods will have format mismatch problem when the region/culture setting of sql server is different from the setting of the environment that application is running on. (eg. when date formatted as "MM-dd-yyyy" with "dd-MM-yyyy") therefo ...Show All
Windows Forms DataGridView Master/Slave bug???
I use a master/slave relation between two datagridwiew object. When both datagridview are on the same form everything works OK. If I put the slave datagridview on a different form, create of a new row on master form and a new row on the slave form fail. The primary Key is not copy from the Master row. Here is the BUG i can't fix. Create one form with a datagridview. Bind to the master table. Create one form with a datagridview. Bind to the slave table. Set the currency manager for the datagridview on the slave form to make sure datagridview are sync. Create a new row in the master table. Open the slave form and create a new row. The key from the new row in the master form is not copy to the foreing field in the new row. I ...Show All
Visual Basic How do I copy bitmap data to a buffer?
I have an application that displays some images using PictureBox. There is a requirement to toggle between colour and monochrome or grey-scale versions of the image, so I've created a class derived from PictureBox that contains extra bitmaps that hold the various versions of the image, and then when the user switches between them, I just assign the relevant bitmap to the PictureBox. When the image is first loaded, the application generates the monochrome and grey-scale versions from the loaded colour version. This is where the problem lies. For each version of the image, I make a clone of the original, and then loop through X and Y, using GetPixel and SetPixel to change the colour based on a conversion formula. That also works ok, b ...Show All
Visual Studio Team System error - Cannot create a connection to data source
Just deployed a report to the TFS Report Server --- myself and the other developers can view the report just fine. However, the PM and the QA team get the following error message when attempting to view the report: An error has occurred during report processing. Cannot create a connection to data source 'FuncAreaSummDS'. For more information about this error navigate to the report server on the local server machine, or enable remote errors Those who can view the report are members of: Developer 1 - Publisher Developers 2 & 3 - Browser, Content Manager, My Reports, Publisher, Report Builder Those who CANNOT view the report are members of: PM - Browser QA - Browser, My Reports, and Report Builder Any ideas Thanks! ...Show All
.NET Development C# problems with converting bytes to string and then converting back
I think this problem is weird. I'm converting a byte array into string and then coverting the string back to bytes. But they are not the same!!! why is that UnicodeEncoding encoding = new UnicodeEncoding(); byte[] a ={ 222, 12,22,33,44,55 ,23,45,65,33,55 }; string b = encoding.GetString(a, 0, a.Length); byte[] c= encoding.GetBytes(b); run the code above, byte array c is {222,12,22,33,44,55,23,45,65,33}, one dimension lost!! And i did several tests and found that if the length of converting byte array is over 10, then the converted-back byte array won't stay the same. Less than 10, it's just OK. Why is that Many thanks, Though it may be correct or not, in my oppinion it makes no sense to convert wild bytes to a string and I ...Show All
Smart Device Development How to clear message queue?
1)I need to clear message queue time to time. How to do this 2)In WinCE 5 hooks're not supported. Is there another way to capture global keyboard messages I tried to use subclassing windows. But this way system crashes very soon. ...Show All
Visual C++ C++ beginner
Okay what i have to do is (a) Code the implementation of a Person class (2 person object are equal if they have the same name) (b) Code the implementation of a Worker class (c) The program must read in the name age and workplace (comma delimited) from the console in to a worker object and store in a vector. (use method developed in part e.) (d) When the user inputs aname of "end" , the program must display all worker entries that have been previously read in and exit. (e) Write a method which stores each Worker object in a vector. This should be passed references to the Worker object and the vector. A Worker should only be stored in the vector once. Do not add to the vector if the obje ...Show All
Visual Studio Team System Best Practice Setup of TFS and Team Workstations
Since we had some issues installing TFS, is there a set of best practices to set up TFS and team workstations We will need to be able to develop in both VS 2003 existing applications and VS 2005 new applications, as well as SQL 2000 and SQL 2005 mixed environment. We will be using XP Pro for developer workstations and have 2003/2005 side-by-side. Any guru at MS that can quickly put together a useful guide References to existing KBA, etc is appreciated. Thanks. We are just starting out here so a guide would be very useful for us. If you have a guidance doc for best practice that would be helpful. ...Show All
.NET Development About Ngen
What is the purpose of Ngen and why we require it Hi, By default, .NET assemblies contain MSIL code and not machine code. Whenever you load a .NET assembly (e.g. by starting an .NET application), the .NET runtime will first compile the MSIL code to machine code. This process is called JIT compiling (Just In Time). By using NGEG, you can create a native image that is stored in the native image cache of the computer. When loading a .NET assembly, the .NET runtime will then load the native image from the cache instead of JIT compiling the assembly. You can find information about NGEN here: http://msdn2.microsoft.com/en-us/library/6t9t5wcf.aspx Hope this helps, ...Show All
SQL Server Problem with the INFORMATION_SCHEMA.COLUMNS column
Hi I have written thing query to check some value in the database but it doesn't return any values on the --set nocount on select @res = coalesce ( @res + ',' , '' ) + ' [' + COLUMN_NAME + ']' FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = @columnnameT --AND COLUMN_NAME LIKE @columnnameT2 --AND COLUMN_NAME like '%[^_ID' Print @res Set @Params1 = N 'Select ' + @res + 'from [' + @tablename1 + '] where ID = ' + @fieldname1 + '' Print @res My all query is CREATE TABLE #Results ( i int identity , DBName varchar ( 450 ), TableName nvarchar ( 450 ), ColumnName nvarchar ( 450 )) use master go --set quoted_identifier off declare @columnnametosearch var ...Show All
SQL Server import flat file
I am trying to import a flat file using SQL Server Management Studio and am receiveing the error: Error 0xc0202055: Data Flow Task: The column delimiter for column "Column 19" was not found. (SQL Server Import and Export Wizard) I would like to capture the rows that are causing the error and have the import continue. Am I able to edit the behavior somehow Thanks. Well, I read that you can 'use the Error Output Page of the Flat File Source Editor dialog box to select error-handling options'. How do I do this Thanks. ...Show All
.NET Development Is There exist Cyc-stack data-structure in .net class library?
I want to implement repeal function such as notepad repeal funtion. In my opinion,I'd better use Cyc-stack data-structure. Is there exist ready-made structure Thanks,In advance. Jiangzw Repeal Cyc-stack Sounds like you need an ArrayList, use RemoveRange to pop the stack and an index variable to keep top-of-stack. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Generating Universe with System.Drawing.Bitmap before Xna.Texture
Hi. I've done a code that can show a generated "constillations" (sp ) like in outer space, known as a "Star Generator" which generates stars in a bitmap. Here's the code which I'm about to show: YOu would probbly generate it as part of your build process and just import the artwork as a texture files. Or you could use a pointlist and draw the points like I did in the spacewar retro code. See retro/retrostarfield.cs Or you could use a pointlist to draw into an offscreen texture and use that texture. ...Show All
