Devi48354's Q&A profile
Visual C++ Use of destructors, finalizers and delete??
I am programming a small class for settings in an application here is the code for the headerfile: ref class settingsHandler { private : String^ const settingsFileName; BinaryReader^ binReader; int appSetting; void readSetting( void ); public : settingsHandler( void ); ~settingsHandler( void ); property int setting1 { int get(){ return this ->appSetting;}} }; And this is the cppfile: #include "StdAfx.h" #include "settingsHandler.h" settingsHandler::settingsHandler( void ) : settingsFileName( "applicationSettings.dat" ){ this ->binReader = nullptr ; this ->appSetting = 0; } settingsHandler::~settingsHandler( void ){ if ( this ->binReader != ...Show All
.NET Development Where to store the XML file
I am having no fun at present trying to find somewhere Global to store my xml settings file. It is important for end users on limited accounts to be able to write to this file.. Any Suggestions Instead of a file, create a SQL database which can be queried for the settings. The user can be authenticated by their login credentials when run from your program. That way common secure access is guaranteed and no need to save a static file.... ...Show All
Visual Studio Express Editions Set webbrowser homepage.
Could someone give me an example code of how to set the webbrowser homepage by opening a properties window Similar to internet explorer, but I only need to set the homepage. If it requires me to make a new form than that is fine. I just need to know. Also, I would like to know more about how to save history of urls typed into the textbox. I want it to be a seperate history from IE. Thanks in advance. I think that you can't because the WebBrowser that comes with Visual Studio is just Internet Explorer. What I would do is set your applications home page to a database, file, or something, and then access that URL when pressing the Home Button instead of using the GoHome command. ...Show All
SQL Server SQL Express: Cannot Open User Default Database (error 4064)
I've tried everything I've read that seemed applicable but still have a problem with the same error message, cannot open user default database. This started detaching the database. I'm using this connection string: connectionString = " Data Source=.\SQLEXPRESS;GC_CashBook.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True " It's a WinForms application. When I run in debug mode, I connect fine. I can do anything in the db in VisualStudio 2005. Then I open the SQL Management Studio, connect to Sql Express, try to open the same database and it can't open it. BUT... If I stop running the VisualStudio application (I can leave VS open, but not run the app I'm developing), and reopen SQL Management Studi ...Show All
Visual Basic Problem Comparing Colors
I have a VB2005 app that includes a picture control that the user can click on. I use the DrawToBitmap method to copy the picture into a bitmap. Then I capture the X, Y coordinates of where the user clicked and use the bitmap's GetPixel method to determine the color where the user clicked and then compare that to Color.Red, Color.Blue, etc. In debug mode at one point I see that the GetPixel function returns a value of (Name = ffffff00, ARGB = (255,255,255,0)) and the constant Color.Yellow has a value of (Name = Yellow, ARGB = (255,255,255,0)). The names are different but the ARGB values are the same ... yet they don't compare as being equal in an IF statement. Can someone explain why this is so and how I can straighten things out so that t ...Show All
Visual C# VB translate to C#...
I got sentence by VB like below: Page_Header(Me, False, progname) would like to translate this to C# I tried this sentence page.header(this.false,progname) and I got error message "page.header is a attribute can 't not difine as a method" can you help me to correct this sentence please thank you Here is some language specifications references: C# , VB and some comparisons about them: http://www.harding.edu/USER/fmccown/WWW/vbnet_csharp_comparison.html http://www.codeproject.com/dotnet/vbnet_c__difference.asp http://en.wikipedia.org/wiki/Comparison_of_C_sharp_and_Visual_Basic_.NET Have a nice day, guy :-) ...Show All
.NET Development Tcp Channel over load balancer
I have a few questions about the TCP channel modifications in .Net 2.0 I want to use .Net remoting over a TCP channel through a F5/Big IP load balancer. I’ve gathered that all I need to do to achieve this (apart from using single call activation) is to add the following properties to my channel: socketCacheTimeout="0" socketCachePolicy="absoluteTimeout" Is this correct Should I add these properties to the channel on the Client side or the Server side (since these properties are TcpClientChannel properties, I’m guessing they belong on the client side) Can you point me to sample code that uses these properties I tried to verify if adding these properties does in fact ca ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Do render targets have to be the same size as the back buffer?
Hi, I have a render target set up as: screenBuffer = new Texture2D(graphics.GraphicsDevice, 1280, 720, 1, ResourceUsage.RenderTarget, SurfaceFormat.Color, ResourcePool.Default); When the back buffer is set to 1280,720 (the same size as the render target) the code below works and the screen displays a blue background as expected. //Set device to render target graphics.GraphicsDevice.SetRenderTarget(0, screenBuffer.GetSurfaceLevel(0)); graphics.GraphicsDevice.Clear(Color.Blue); //Set the render target to the back buffer graphics.GraphicsDevice.SetRenderTarget(0, graphics.GraphicsDevice.GetBackBuffer(0, 0)); graphics.GraphicsDevice.Clear(Color.Gray); //copy the (scaled) screen buff ...Show All
.NET Development unit test in .net
Hi, I'm a beginner with testing proofs in dotnet. I've just created certain unit proofs and now I'm wondering if it would be possible to create some kind of "proof stack" where I could specify the execution order of these proofs. I don't understand exactly waht you've done, btw, did you had a glance of NUnit TeamSystem provides more sophisticated testing framework. ...Show All
SQL Server Performance Question
Hi, I have a sql2000 server running and I have a asp.net app that accesses this server. At the moment I am using 2 different databases to get information from and such, one database I have a bit of control over the other I am not allowed to touch without special permissions due to the sesitivity of the data. The issue is that my app is not going very fast when it comes to database calls. I need to index some tables but I am unsure what actually happens to the data when I do this, I have one table that has ~600,000 rows and that is alot to sort through as you can imagine. This table is on the sensitive database, so I am hesitant to touch it, but I really need a performance boost somehow, can anyone suggest something to help me solve my per ...Show All
Visual Basic Generate form dynamically (for multiple records)
I have a form where i add user info (GroupID and ProjectID). There can be more then one coders inside a group so i need multiple records against a groupID can it happen that i tell the form about the number of coders and it can create (dynamically) the textfields etc required to make so many enteries if my question is not clear please let me know, i shall try to elaborate as much as i can. thanx Consider using a UserControl that has all the controls to display one record. Then dynamically create and position as many of those UserControls as you have records. Better yet, use a DataGridView or a ListView to display the records, it will be a lot easier to scroll... ...Show All
Smart Device Development How to deploy pocket pc application to device and necessary prerequisites before deploying
Hi I wanted to test pocket pc application on device. But I have basic queries like, What are softwared I should install before testing on device vs.net tool provides an option deploy on to device, is the way to test or we should deploy on to device by making setup file. I have already taken vs.net 2005 and SQL Developer 2005 authorized( Licensed ) copies. Framework, SQL Mobile comes as part of VS.NET 2005, those are helps me to install on device or any other s/w is required Please suggest any one with little details, I would appriciate your time and reply. thanks, Not really because device might be disconnected while MSI is removed. It’s usually done all the way around – application is removed ...Show All
SQL Server Execute Process Task / Console Output
I'm just starting to find my way around SSIS, coming from SQL 2000 DTS, but I can't see a way of including a Win32 Console application's output into the logging process. I've started playing around with SSIS Logs (OnTaskFailed etc..), but I can find no where to allow me to capture the output from a console app. In SQL 2000 DTS I could capture this by specifying an "output file" on the advanced tab of the job step definition. Is there something as straight forward as this in SSIS I'd be grateful for a few pointers in the right direction. Thanks for the suggestions Ken. I see where you are going with it, but it's not that I need to further process the output from console app's, just log w ...Show All
Visual C# Changing Urls in a text
I am developing an application which gets a URL, send request to it and responds using the response received. But it needs to edit all URLs before sending response. All image URLs should be changed to a handler and page URLs should be changed to map to page handler of application. How can I do this Please help. Regards, Farshid Hi Please check this thread, I think it will help you out. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=284501&SiteID=1 ...Show All
Visual C++ 24Bits Bit-field Alignment error under VC++
Hi, I wrote code to interact with some netrork device. One of the network structures contains a 24-bits field. Everything is packed to "1" (byte). struct test { char bob0; char bob1; short bob2; char bob3; unsigned long bob4 : 24; unsigned long bob5; }; int main() { test tt; tt.bob0 = 0; tt.bob1 = 1; tt.bob2 = 2; tt.bob3 = 3; tt.bob4 = 4; tt.bob5 = 5; unsigned long * ptr; ptr = (unsigned long *)&tt; printf("%08X\n", ptr[0]); printf("%08X\n", ptr[1]); printf("%08X\n", ptr[2]); printf("%08X\n", ptr[3]); printf("%08X\n", ptr[4]); return 0; } Under Visual Studio (2003 and 2005), the result is: 00020100 00000403 000005CC <-- CC Packing is at 1, there s ...Show All
