poon23's Q&A profile
Visual C++ How do you set the name of a thread in C++?
This is something that I've been able to do in linux development, but I have not figureed it out in Visual C++. I've noticed that the thread list contains names, however they are always the same and I cannot seem to find the way to name them. This is not an MFC application. Currently, I'm using _beginthreadex to create the thread. I've tried a few things here... 1. Immediately after CreateThread(...), call SetThreadName(...). This doesn't seem to have any effect. The name reverts back to the name of the supplied ThreadProc, so I'm assuming either the debugger doesn't know about the thread yet, so ignores the exception, or it is overwritten when the thread starts. In this case, the thread ID I'm using is directly back from the call to ...Show All
SQL Server Ad hoc updates to system catalogs are not allowed.
in SQLServer2005 how can I allow update system catalogs (by mouseclick) sp_configure 'allow updates' , 1 - works, but I get the message Msg 259, Level 16, State 1, Line 1 Ad hoc updates to system catalogs are not allowed. All these answers are great workaround-coverage for not allowing ad hoc updates to the catalog tables. And I can see some reasoning behind not allowing DBAs to get their job done in an efficient and expedient manner. But this is just another example of executive thinking --and decision making-- by MS. My case is hundreds of databases and no way to use the wonderful method of set processing to get the job done. Now I am begin told if I want to set the status of a hundred databases from 'Full' to 'Simple' ...Show All
.NET Development How can I have one and just one copy of my application running in the same time???
How can I have one and just one copy of my application running in the same time I did somethign similar a while ago; doing something like this is so popular that I blogged about it here: http://dotnet.org.za/ernst/archive/2004/07/20/2887.aspx What makes it neat is that, if an existing instance of your application is already running, it will bring it to the foreground and maximize it. With the inspiringly named "helper" class (linked to from this blog-post) you're able to write: public static void Main() { bool firstInstance; Mutex mut = new Mutex( true , strSystemMutex, firstInstance); if (firstInstance) { try { Application.EnableVisualStyles(); Application.Run(new frmLogin()); } catch (Exception ex) { Excep ...Show All
Game Technologies: DirectX, XNA, XACT, etc. I’m in desperate need of direction...
I know you guys are probably overrun with these kinds of threads, and I apologize for making another one. I did my best to look around and get as much info from the other threads as I could, but really I need a personalized response to figure out what I should do. I’m 17 and am currently replying in the process of applying to my local college (game design and development), but stupid me forgot that they want a portfolio for classes like this (windows applications, small games, ect ect). And I have about 2 or 3 months to figure this all out before my portfolio is due. So far I’ve downloaded XNA game studio express, Microsoft Visual C# 2005 express, and the 30 day trial for the Torque game builder. I’m completely new to this and totally lost ...Show All
Windows Forms Need more resource for digital camera
Boss want me to create a program to use digital camera to take employee photo, make phot ID and save photo image to SQL server (or file server) Can someone help me how to start I need more resources. Hi,aspfun You have to write codes base on the specified device driver of your digital camera,the camera interface part is not topical here, look to see if your camera manufacturer has a web site with information about this. While storing images, I always store them in file system, and store the image file pathes in the database. Hope it helps. Best Regards. Ye ...Show All
Visual Basic how to validation
hi, can any body guide me how validate a the entered text in the textbox is the url or email address Regular expressions: http://msdn.microsoft.com/library/default.asp url=/library/en-us/cpguide/html/cpconCOMRegularExpressions.asp http://msdn2.microsoft.com/en-us/library/system.text.regularexpressions.regex.aspx Email address and URL sample found here: http://msdn.microsoft.com/library/default.asp url=/library/en-us/cpguide/html/cpconregularexpressionexamples.asp ...Show All
SQL Server TIFF render quality problem
The quality of rendering for reports in TIFF format is really nasty. Fonts are horrible. Is there anything we can do to improve the quality when rendered in TIFF format We had to change rendering type from PDF to TIFF because Acrobat Reader could not display the reports we were generating (apparently because of images). Thanks. Glenn. No. We get "A drawing error occurred" when attempting to view the PDFs. Searching the net has led me to believe that Acrobat cannot handle some images very well, especially if they have transparency. The images we embed in the report are not under our control, they are generated by MapPoint and another third party company. We sometimes have 10-15 ...Show All
Windows Forms Slow in form display
Is there any method to speed up the display and rendering of Windows Form In my application, my Windows forms containing around 50~150 controls. There are also some navigation button to hide one form and display another one. The delay occur during form showing up. As I'm developing a POS, such kind of delay is not preferable. Is there any workaround to speed this up Yes, once you get past about 50 controls or so, the cost of using .NET controls and their associated Windows window becomes obvious to the eye. Look into drawing onto a form with the Paint event rather than using a control to make the UI snappier. Labels are an obvious candidate. ToolStripItems are low-cost too. ...Show All
.NET Development Synchronize AS400 with Access???
Is it possible to have an interaction between an AS400 database and an Access database. The two databases have just about the same type of information however I want to create a more user friendly GUI in Access that can reference, create, and edit data in the AS400 system. Is this even possible and if it is where can I go to get a reasonably easy walkthrough to go about creating it Thanks for any comments/answers. ...Show All
SQL Server copying tables from 2000 to 2005 express
I have a rather sizeable SQLServer 2000 database. To work on an issue, I would like to copy just a couple tables into SQL Server 2005 Express. How does one go about this efficiently I have a rather sizeable SQLServer 2000 database. To work on an issue, I would like to copy just a couple tables into SQL Server 2005 Express. How does one go about this efficiently Sorry, I should have mentioned that I have used DTS in SQLServer 2000 to copy from tables from one DB to another, but in SQL Server Management Studio Express (or in SQL Server Configuration Manager) I do not see any DTS-like tools available. ...Show All
Visual C++ Visual Studio Professional vs Visual Studio Express
My company spent a large sum of money to buy Visual Studio Professional 2005 about a year ago. I am not familiar with Visual Studio Express. Does Visual Studio Express have documentation on MFC Is it better than Visual Studio Professional Thank you. Thanks for your reply. I did not realize that Visual Studio Express was free. Why didn't they just call it Visual Studio Free Edition instead of Visual Studio Express How on earth can you write a Windows application without MFC Please explain. Isn't Win32 native == MFC ...Show All
Windows Forms Exporting data to excel sheet
How to export data to excel sheet from datatable for windows application using VB.NET. Try to give the exact code or solve the asap. see this thread http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1115801&SiteID=1 ...Show All
Windows Forms Opacity - Fading screens
I got some code from Planet-Source-code that shows how to use opacity. Strange thing is that some of my forms doesn't fade and some works beautifully. Code as follows Dim i As Single For i = 0 To 1 Step 0.01 Me .Opacity = i My .Application.DoEvents() System.Threading.Thread.Sleep(0) Next This Fades the screen in nicely. So i tried to change this a bit and removed the 3rd and 4th line. (My.Application... and System.Threading....) Now the screen fades in but it stays a black box until visible. This does also not work on all screens. The only thought that I have is screens that loads lots of information seems to not do this while screens such as a processing screen which only opens work ...Show All
Windows Forms Global Application error event
Is there any event that raises anytime some error occures in the application I can manage the errors separate in every event with try... catch, but is there any global event that raises when there's an error in the Application In ASP.NET there is that event in glogal.asax (Application_Error), but in Windows Application I don't know is there any event like Application_Error Sorry for delay, but Application.ThreadException is that what Iam looking for. I make a test exception with throw new Exception, and with AppDomain.Current.UnhandledException (for vs.net 03) it gets standard messagebox (with Break and Continue buttons) for error and then run the code in UnhandledException handler. Application.ThreadExcep ...Show All
SQL Server Trend Lines in RS2005
Are trend lines supported in RS2005, and if so how do you produce them Thanks, Peter Cwik Trizetto Geert Verhoeven wrote: NOTE: Reporting Services chart component is based on Dundas. You can get extra functionality by using the full dundas chart component for reporting services. Reference: http://www.dundas.com/Products/index.aspx Example of trend: http://www.dundas.com/Gallery/Chart/RS/index.aspx Img=RS9 Greetz, Geert Geert Verhoeven Consultant @ Ausy Belgium My Personal Blog I was under the assumption that the question was regarding the standard functionality of SQL Server 2005. Sure if you want to pay $1000+ extra it's possible. ...Show All
