Ben Hall (UK)'s Q&A profile
Windows Forms printpreviewcontrol
The people at microsoft are strange aren't they I have just started work on something where I'm using the printpreviewcontrol for the first time and I was looking for the method that would cause the control to refresh it's contents, after the page settings of the document had been changed. Foolishly I had some expectation that it might be called refresh but no; apparently on this control you have to call invalidatePreview. Hey thanks guys I love spending all my time wading through the mire of your documentation just to find out something like this. You're not talking to MSFT on this forum. If you want to *** at MSFT programmers, do so through Product Feedback . ...Show All
SQL Server Import Data Form Access To Sql Server 2005
I have a database in ACCESS and i want everytime that there is a change made in Access the cude in SQL server to be automatically updated . Is there a way that this can be done HELP !!! I am not sure if this will work with Access or not. Usually systems of this nature would be running on a database server of some sort. The only way to do this would be using a feature called "Proactive caching" which is only available in the Enterprise Edition of SQL Server. There is no automatic check for changes in Access databases, so you would either have to use one of the following 2 options. Polling Queries - where AS will query the source data on a given time interval to see if there have been chan ...Show All
Windows Live Developer Forums Daily Report
Hi, Anybody can say me the reponse to the following question How I can receive whole daily report as when I tried to specify startDate = endDate, then report isn't respective with MSN UI Report... A gathered contains data lesser than in MSN... Should I specify date like 2007-02-15T12:00:00... Thank you Hi Shai, This sample doesn't help me, as there isn't any information re HOW to recieve the daily report - the report that will include whole day... Serg ...Show All
Windows Forms Aligning text baselines
I am using a graphics object and .drawstring to place text on a page. I have two strings, same font, different font size. One is 8.5 pt, the other varies so it will fit in a specified width. ex: Content: 100% COTTON Notice how in the above example the bottoms (baseline) of the words line up. With the .drawstring method I am locating the text by the upper left corner. When I render the second string I need to drop the y coordinate by the difference in the font baselines. The font family has a CellAscent property that looks like it should work, but it doesn't. ref: http://msdn.microsoft.com/library/default.asp url=/library/en-us/cpguide/html/_gdiplus_formatting_text_usecsharp.asp I appreciate any advice you have about this pr ...Show All
Visual C++ VC++ 2005 : ambiguous call to overloaded function
Hi all ... Why am i getting "ambiguous call to overloaded function" for built-in functions and operators I am trying to complile the project developed using the VC++ Version 6.0 in the new version VC++ 2005. Thanx in advance. Note : The idea (bulb) indicates -> ...Show All
Visual Basic How to secure sensitive data in connection string?
Hi. I am creating Windows Application using VB.NET 2005 When I add new data source to my project using, data source configuration wizard it asks if I want to exclude the sensitive data in the connection string. I know it will just show password and user id in the connection string in the app.config if I include them in the connection string. But how can I encrypt or set these information in the application securely I seen alot of examples done w/ ASP.NET (encrypting web.config) but I can't find any for apps.config. Thank you. yeah, i am worried about leaving it in the code too but I thought it was better than leaving in the xml file. still trying to find solution but unable to come u ...Show All
.NET Development Why is my app taking up so much Memory?
I have created a blank form with a few buttons and components and NO CODE. When I run my app, it takes up 22 Meg of Memory! Why is this Thanks, Hi wizkid1 This article explains what's using memory, and how to better measure memory usage for .NET apps: http://getdotnetco.web119.discountasp.net/GdncStore/free/Articles/The%20Memory%20Mystery.htm The short answer is the .NET runtime tries to grab a large chunk of memory in order to keep memory allocations quick. Unless there is memory pressure on the system from other processes, the runtime will be "greedy". When memory pressure increases, the GC will kick in and release all but the necessary amount of memory. Hope that helps -Chris ...Show All
.NET Development Run a process with admin rights
hi everybody. I have a problem to launch a process with admin rights. The application has to work under Windows Vista (I developp under the last CTP). The account running my application is an admin account and the process I need to launch is "bcdedit.exe". When I run my application, bcdedit (launched by my app) says that it doesn't have enough rights to work correctly. If I run my application by doing right button on it > run as administrator..., the process works correctly but it's not a solution for me. I would like to know if I could run a process specifing rights admin or a windows identity with admin rights. thanks per advance Yes I know. So the runas option shouldn't be the solution to m ...Show All
Visual Basic Problems installing Visual Studio 6.0 on Vista Ultimate
I can not get Visual Studio 6.0 to install on Vista Ultimate. I am running setup.exe as Administrator and I get an errors saying "iviewers.dll was unable to register itself in the system registry". Thanks for the email. Visual Basic 6.0 needs to be installed as an Admin with elevated priveldges in order for the registry modifications to complete as expected. When running setup, right click on the setup.exe and chose the option "Run as Administrator...". The setup should complete as expected. You'll need to run the SP6 install the same way. Please reply back on this thread if this does not resolve your issue. Thanks, Chris Mayo Visual Basic Program Manager ...Show All
Smart Device Development Connecting multiple PDA to a desktop pc
Hi Can i connect multiple PDA's to my desktop PC , so that the PDA app can cosume the webservice, Currently i am connecting single PDA to the PC using the bluetooth USB adapter Regards Gauls You can do that using network adapters. If you using AS, only one device can be connected to one PC. ...Show All
Architecture caching optimisation with concurrency handling
I am working on how to implement caching in the best possible manner when we are implementing 1. optimistic concurrency (1 st scenario: we can live with stale data. 2 nd scenario :we cannot live with stale data) 2. pessimistic concurrency Here I also want to cover scenarios like when two thread of the same application accessing the same table in database by using different queries and when both have these query results in different cached objects.So what strategy should I use to make the cache stale ,at what moment of time. Please share your views on the above. Cheers Hi Pranshu, Thanks for your elaborate reply. I didn't understaood one small part of y ...Show All
Visual Studio Team System Can I Query SQL for Source Control Info?
I was wondering if anyone has a list of tables that Source Control uses in the Team Foundation I want to be able to write a query(report) that shows what users have which files checked out. Thank you for all your help. Hi: Unfortunately we do not have such documentation. The schema is subject to change per release and even service packs so we usually do not document them since it would be a costly ongoing process. In regards to the tables if you are the admin you can see these tables pretty easily within SQL Management Studio. thanks, mario ...Show All
Visual C# How can I make a real clock face?
... Like in the tray when you double-click it, a window appears. I want to make the clock face in that window. How can I do that Hi, Here is an interesting article about it http://www.codeproject.com/cs/miscctrl/AnalogClockControl.asp Hope this helps ...Show All
Visual C# Create Derived instance of Base instance
Hello, I was wondering if it is possible to have a base class and create a new reference to it which is a derived class. Here is a little example of what i mean: class Program { static void Main( string [] args) { BaseClass b = new BaseClass (); b.num = 5; DerivedClass d = new DerivedClass (b,true); Console .WriteLine( "derived :" + d.num); //The output is: derived: 5 b.num = 6; Console .WriteLine( "derived :" + d.num); //The output should be: derived: 6 Console .ReadLine(); } } class BaseClass { public int num = 0; } class DerivedClass : BaseClass { public DerivedClass( BaseClass bClass, bool access) { if (access == true) { ...Show All
Visual Studio 2008 (Pre-release) System.Data.DLinq.DataQueryExtensions.ToBindingList<T>(System.Query.IQueryable<T>) cannot be inferred from the usage
I have created a separate dll which is having the class for accessing database and i am having a method which will return the value of the var, as given below public System. Object sendobj( string conn) { db = new Projectgreyhound (conn); DataTable dt = new DataTable (); // var ClientQuery = queryval; var ClientQuery = from clientdata in db.Animals orderby clientdata.AnimalID select clientdata; // sampletest = ClientQuery.ToBindingList(); // Object ClientQuery = Convert.ChangeType(queryval,); // dt = ClientQuery.ToDataTable(); return (ClientQuery); } In the application, Class1 objclass = new Class1 (); var testsam = objclass.sendobj( Program .con ...Show All
