Vikas Pradhan's Q&A profile
Visual Studio Express Editions How to connect a new form to a button?
Hi everyone, I was wondering how i can make a button connect to a form so when I click on it it takes me to that form but the form cannot be opened repeatedly. code in the button click. (this is written in vb convert it to c#) Dim objForms As Form dim flag as boolean = false For Each objForms In frmMDI.MdiChildren If Not objForms.Tag Is Nothing Then If Convert.ToString(objForms.Tag).ToUpper = "XYZ" Then objForms.Show() objForms.Focus() flag = true End If End If Next if falg = false then dim frm1 as Form1 frm1.Tag = "XYZ" frm1.show() end if ...Show All
Community Chat My creation - Obstacle detector using webcam and laser pointer
Hello everyone! I created an obstacle detector a few days ago which uses a webcam and a laser pointer to approximately determine how far an obstacle (for example, a wall) is from the camera. Check it out on my blog . If you can't see it on my blog, try http://ashishrd.blogspot.com/2006/11/obstacle-detector-using-webcam-and.html . Hope you find it interesting. :) Ashish ...Show All
Windows Forms Datagridview GUID as primary key
For the life of me I have forgotten how to handle this. I have a primary key that is a GUID another column that is a NChar 'FName' for first names. These items or I should say datagridview is bound to a dataset. When I start to enter first names in the column and move to the next column I get an error stating that the primary can not be null. How do I stop this Thanks. Thanks Ken, Unfortunately I am not able to get it to work. Could you give me or post a working sample (VB.Net) ...Show All
Visual Studio 2008 (Pre-release) WCF references in VB
I am using WCF with a VB app where I have a main executable, Main, and several dll's, including WCFdll. I find that I need a service reference in Main and in WCFdll. The service is controlled by the app.config in main but the WCFdll reference is required to compile the dll. Is this correct Is there a way to just have one service reference, maybe by using namespaces Thanks John Michele, You said: "An even better design would be that only the WCF.dll is responsible for calls out to the service, and the client application uses the WCF.dll to make those calls. " I agree - and that is what I am doing. However, it does not work unless both Main and WCFdll have the service refere ...Show All
Visual Studio Adding (and editing) .suo files to source control
Hi, I hope I've asked the question at the right place. Our project uses a different than default working directory, so this has to be set in Debugging > Working Directory for the clients. The problem is the working directory is saved in the hidden .suo file which one cannot edit by hand so easily. Is there a way of creating a new .suo file with only the binary data for the working directory in it, add that to source control I presume on checkout VS will then reconstruct all other paths and stuff in there for the users. Solutions either for VS2003 or VS2005 would be great. Donnu why that file has to be binary though, if it were like the .sln or .vcproj files it would've worked. Hi, I don't know ...Show All
Windows Forms using datagridview with a mySQL server
how do I do it. I tried to find some stuff on google but didn't really find any tutorials just other people asking the same thing. MySql has a beta version of a Visual Studio 2005 plug-in available. ...Show All
Windows Forms Undetected Program
I recently had to uninstall and reinstall a program that had stopped operating after 13 months use. The program was Scansoft Dragon NaturallySpeaking 8.0 preferred. I finally removed it "totally" from the PC . I got the Error message 1607 : Unable to install Installshield Scripting runtime. I finally found and installed iSScript.msi and reinstalled DNS8 but when setting up new Speech logs the program froze again and the message that the program was 'not responding'. I pressed Ctrl-Alt Del but Windows Task Manager did not show anything. I went into Start- Search but that resulted in no finds at all. The program DNS8 shows the program is installed( when checking Add/Remove programs) and when manually ...Show All
.NET Development FtpWebRequest MKD fails
I'm trying to create an application that will automatically upload files to our Akamai content delivery network via FTP. One of the requirements is that if the local source directory contains a new directory that does not exist on the target FTP server I need to create it. Unfortuantely everything I've tried for this gives me back the dreaded unspecified 550 error. Example: say I have two uris to my ftp server, the first representing a directory that DOES exist already and the second representing a directory that DOES NOT exist on the remote server. try{ string[] uris = new string[]{"ftp://accname.upload.akamai.com/10000/existingdir", "ftp://accname.upload.akamai.com/10000/newdir"} foreach(string uri in uris){ ...Show All
.NET Development 3 DES with 32 byte key Length with Visual Basic DES Class to decipher an IBM 3624 Pinblock
Hey guys, I have a problem on my hands at the moment as I am trying to decrypt a string with 16 bytes and 2 key components of 32 bytes. As below: Key component 1 = F457E52AB083BCECA17F230B23B36B34 Key component 2 = 6D52616E5D755B4ADA948F31ECD5107C Encrypted block = 2C187291DCEEB9B9 From what I have picked up the visual basic DES class does not support that. Is any way I get round this. skimming through CCA Release 2.41 on IBM's website may yield necessary information. From what I read about people attacking IBM 3624 there are certain offsets applied before encrypting/decrypting. ...Show All
SQL Server Space allocation for NULL
hi, what is the best method to know the space consumption by a table object is it DBCC showcontig another thing is i have a table named tbl1 and having 2 columns Id and name , when i put 5 records with name as null as below Id Name 1 NULL 2 NULL 3 NULL 4 NULL 5 NULL will sql server allocates space for null values if so how much Mat Only FIXED Length columns (CHAR & NCHAR) allocate memory for NULL.. Rest of the datatype will not allocate any memory for NULL.. Use the following SP to find the table(data page) size on disk(actual) exec sp_spaceused 'Table Name' By default if the table is non empty then it will allocate 8KB (one page) for data.. so whenever the page size increases the data size also ...Show All
Visual Studio Team System Manage projects on Team System
Hi for every one, I have some cuestion, How can I know in wich status my project are if some of my project dosen't contain code on TS, only documents, so , I can measure my status with this information TKS! well, it really depends on what you are using and tracking in tfs. Most people who want to track this use Workitems, most probably as tasks, and track the state of those tasks. For instance in the Agile Process template that comes with TFS includes things such as Remaining Work and Project Velocity to extract some of that information and use it to track the status of the project. Anything outside of tracking these workitems gets very very tricky and honestly I don't know how you would do this reliably ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Managed vs Unmanaged, Primitive design and .NET
I actually have three separate questions here. Please bear with me. Managed vs Unmanaged I searched several post and didn't find the answer I was looking for. Simply put, if you are designing a 3D game engine that needs to push 30+ frames a second, would you even consider using a managed language It seems to me that when the garbage collector kicks in your frame rate will/may plummet. What is the concensus on using managed vs unmanaged code in a game engine Primitive Design I have built a rudimentary 3D engine using good OOD where the primitives (points, polygons, lines, etc.) provide methods for their management and transformations. If I have a model with 100,000 points, each point carries the overhead of the virtual function table and ...Show All
Visual Studio 2008 (Pre-release) Binding to Custom Property
How do I bind to a custom property More specifically, I'm trying to bind the Fill color of a Path to a property of the Window. The Window property is defined in the CS file. I'm not sure whether it should be a Brush or a string at this point... Seems simple enough, but this doesn't work: < Path Fill = " {Binding ElementName=myWindow, Path=fillColor} " Data = " F1 M 53.795410,18.108398....Z " /> The solution I mention above works in my sample app, but not in my real one. The initial color sets properly, but when I modify the HighlightColor property the color does not update. The property does show the new value. Is something else needed to repaint the screen ...Show All
.NET Development Math::sqrt() / Math.sqrt()
The .NET sqrt function returns double, but I need a decimal value returned (double is not accurate enough) does any one know of a squareroot fucntion that returns a decimal value thanks in advanced The built-in sqrt methods just end up calling the MSVCRT sqrt function, so they're extremely fast. MSVCRT only supports 64-bit floating points, so there was never any effort put into the Math class supporting Decimal (128-bit) values. If performance is not an issue, you can use the Newton-Raphson method to calculate the square root of a value, for example: /// <summary> /// Newton-Raphson method of calculating square root /// </summary> /// <revision author="Pe ...Show All
.NET Development How do I copy a ColorPalette
Hello, I need to create a copy of a ColorPalette. ColorPalette tmp1 = myPictureBox.Image.Palette; The problem is the line above does only crate a reference. Changes to temp1 apply to the original palette as well, which is not what I need. ColorPalette tmp2 = (ColorPalette) myPictureBox.Image.Palette.MemberwiseClone(); The problem is the line above does not compile. What is wrong I wonder what the sense for ColorPalette.MemberwiseClone() is than Why does it exist Should it not be hidden as well, when the constructor is hidden ...Show All
