Ovaisakhter's Q&A profile
.NET Development How Often To Open/Close Connections w/ Datareader
I've read about the importance of immediately closing connections when using ADO.NET especially with a Dataset. Would this still hold up with the following scenario, or should I leave my connections open all the time ... I'm going to have a C# application (service) with a connection manager logged into a source SQL Server. From the same service I'll have a second connection manager logged into a second target SQL Server. Aprox every 20-3 ...Show All
Game Technologies: DirectX, XNA, XACT, etc. What to know about?
Hello all developers! I've got some quations before I begin to make my own game. I need to know, what is helpfully to know when you have to make a game. I am using C#, and I can use the basic techniques like Selection, Itteretion (I think it's called), Sqence and a beginner level in OOP. Can you give me some links, exm to tutorials for OOP, or other things to know that will be helpful... I hope that you understand what I wrote, because I c ...Show All
Visual Studio 2008 (Pre-release) How to force a custom panel to accept only specific children
What is the mechanism to force a custom created panel to accept only specific custom controls For example <myNamespace:myPanel> to accept only <myNamespace:myControl> as children and to throw an exception when a different type is added in markup. I have looked into IAddChild but with no avail. That is an excellent idea. For my scenario I also need to store the "order" of the children (which is not the same as the order of ...Show All
Visual C# .ngen problem
Anybody know what everything i need to do for regenerate managed .exe file to native .exe file Because i tried to convert some easy program (managed) with ngen.exe (fw1.1 and fw 2.0), and no one works. Why Help. Thanx Well you should still start the old executable, not directly run the one in the native image cache. The runtime will handle the rest. ...Show All
SQL Server Job generates login error
I have a package which will run in Management Studio. The package is saved in MSDB. When I try to set up a job, the step errors out with what appears to be a login error. I am specifying windows authentication in the job and also used that when creating the package. Paul, the reason is security, probably you created the package with a different account than the sql server agent is running. Solution: you ...Show All
Visual C# Using class from another file in the same project
[VC# 2005 Express Edition] Hello! I don't know how to use a class that I defined in another file from the same project (solution). Can you help me, please For example: FIRST FILE: ---------------------- using System; namespace APP { class Class1 { static void Main(string[] args) { Class2 www; } } } --------------------- SECOND FILE --------------------- using System; namespace APP { ...Show All
Visual C# Application.Exit Event
I know ive asked this question before but I really didnt get what I was looking for. How would I put this in code. if (application.exit == true) { directory.Delete("C:\hello.txt"); } The first thing I can think of would be catch your main form closing. Let's say your main form is just called Form1. Let VS create the handler stub for the FormClosing event, and in that you can do this: private void Form1_FormClosing(ob ...Show All
Windows Forms Create the app_name.exe.config file during runtime
Greetings forum inmates Consider the following scenario: You have created your application and you want to deploy it either via click once or xcopy - emphasis goes on xcopy for my case though. Normally you should include an app_name.exe.config file within the download so that the settings are included and loaded when the application starts. But what if you may have a different set of settings attributes on each deployment situation One sol ...Show All
Visual Studio Team System How To: Connect to 2 different TFS Servers
I have two clients using TFS. I can connect and code to both via VPN. Can I setup so that I can have both available or is VS tied to a single server at a time If only one, what is the best way to work around this Thanks, Jeff Hi Jeff, You can connect to only one TFS per VS session. One of the workaround is to start two VS sessions and connect to different TFS in each section. This way you ...Show All
.NET Development .NET on Linux
.NET on Linux, is this possible thanks Another option aside from Mono is the shared source CLI ( http://www.microsoft.com/downloads/details.aspx FamilyId=3A1C93FA-7462-47D0-8E56-8DD34C6292F0&displaylang=en ), you can also try searching for "Rotor". I dont believe it is supported on Linux, but it is on osX and BSD. One thing to note is that the license for this is different from the normal redist ...Show All
Smart Device Development How to block the call button VK_F3 in my application?
In wm2003, I can get message by WM_KEYDOWN when I press the call button. I can block it or use it to do other things. In wm5, Pressing this button doesn't active WM_KEYDOWN, it actives WM_KEYUP. But the dail dialog() shows. I don't know how to block it. sorry for my english. :) curious, what keyboard driver is installed ( look at : [HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\KEYBD ) i've noticed sim ...Show All
Visual Studio Team System How to put the code in a team proyect?
Hello. I created a team foundation proyect. I see many things there, work items, documents, reports, build. but I dont see the code. I created a website , how can I associate the website proyect to the team foundation proyect Why I cant create bugs it doesnt let me write on the title field. Hi Kevin, You will need to install a source control system. E.g. you can install Visual SourceSafe ( http://msdn.microsoft.co ...Show All
Windows Forms Some labels cut off at 2/3 height on some computers
Hi there, We're developing a windows app. Amongst other things, we're displaying two labels on a form. Another dev created these, and set the height of the labels to 13px. The forms display fine on his computer, but on my laptop only the top two thirds of the text is shown, and the bottom third is invisible. When I set the label height to 19px, I can see the entire label. My question is why would this be different on his ...Show All
Visual Studio Tools for Office Document protection
Hi, I have problems with the Word document protection mechanism inside VSTO Beta 2. When I open a Word document inside the Visual Studio IDE and I try to apply document protection, the button "Yes, Start Enforcing Protection" is always grayed out. Furthermore, when I programmatically protect the document (Document.Protect) and allow specific sections to be edited (Range.Editors.Add), those sections have a strange behaviour. ...Show All
.NET Development Authenticating the caller of a web service. Client Certificate?
Let's say I have a web service. In this webservice, I want to verify who is making a call to it. (client or another server) Is this where a client side certificate would come in If so how do you use this in .Net 2.0 The service may or may not be SSL does this matter It probably will be but during development it may not be. I am using VS2005 VB.Net. Thanks, Rick Hi Rick, What kind of authenticatio ...Show All
