Amnu cherian's Q&A profile
.NET Development Why this kind of exception handling
hi, Please see the below code Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Try fun() Catch ex As Exception MsgBox(ex.Message) MsgBox(ex.StackTrace) End Try End Sub Private Function fun() Dim a, b, c As Integer Try a = 0 b = 0 c = a / b Catch ex As Exception MsgBox("Reached fun_catch()") fun1() Finally MsgBox("Reached fun_finally()") gan2() End Try End Function Private Function fun1() Dim s, s1 As String s1 = s.IndexOf("a") End Function Private Function fun2() Dim s, s1 As String Throw New EntryPointNotFoundExce ...Show All
Visual C++ disabling the keyboard
I am trying to create a program that will disable the keyboard, and another that will re-enable it. How would you go about doing this without doing a full keyboard hook I would do it in a batch file with the command "rundll32 keyboard,disable" but that requires a full system restart in order for the keyboard to become usable once again. Does anyone have an idea on how to do this P.S. I am not sure if this is in the correct forum, if it is not my apologies Hello Re: disabling the keyboard As you may already known, such question is outside the scope of this forum, see: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=789657&SiteID=1 Personally, I'd like to recommend you to d ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Correct version of the XACT
While trying to build the project with simple sound as described in XNA Help the error XACT could not load the data provided. Make sure you are using the correct version of the XACT tool appeared. I have October SDK installed and no attempt to build sound files with August SDK taken. Have seen some posts with similar problem here but no real solution. Is there any kind of restriction meaning the size or other sound properties I used standard Windows file "chord.wav" for my experiment. To be specific MS don't support XNA against any other SDK. But since XNA works against the runtime files then as long as you have the right runtime files you should be fine. (not sure what happens if yo ...Show All
Windows Forms When I publish my sample 'Personal Website' to my Windows Server 2003 Enterprise Ed. I get this error...
The CodeDom provider type "Microsoft.VJSharp.VJSharpCodeProvider, VJSharpCodeProvider, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" could not be located. I have .NET Framework 2.0 installed, and setup in the properties for the web. I also have installed SQL Server 2005 on my Windows Server 2003. I cannot find any help on the web so I am hoping somebody here might have the answer. I am very new to .NET programming so forgive me for being dim. I'm almost getting the same thing for a new page i created on my local machine winxp sp2 IIS Error 1 The CodeDom provider type "Microsoft.VisualC.CppCodeProvider, CppCodeProvider, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" could not be ...Show All
.NET Development How to bulk insert in .net 1.1
I have the following code to insert values from dataset to db How can I bulk insert following records in .net 1.1 OdbcConnection odbcConnection1 = new OdbcConnection(@"dsn=Mydsnname;uid=mydsnid;pwd=mydsnpasssword"); OdbcCommand cmd = new OdbcCommand(); cmd.CommandType = System.Data.CommandType.Text; cmd.Connection = odbcConnection1; odbcConnection1.Open(); for(int i=0; i<ds.Tables["Book"].Rows.Count; i++) { DataRow sqlRow = ds.Tables["Book"].Rows ; cmd.CommandText = "INSERT into TestBookTableTemp (Bookcode, Title,Description,sourceid) VALUES ( , , , )"; cmd.Parameters.Add(" ", (string) sqlR ...Show All
Windows Forms Getting current row values from my BindingSource in C# VS 2005!!!
Hello, How can i get a current row values from my BindingSource. I have a DropDown List that points to a view, and I set a column of my view to be displayed in my DropDown list and another column as it's value. I need to display another column of my view in a ReadOnly TextBox right near my DropDown list. Thanks so much in advance, Mathew Mathew, First question ... I prefer to do it in code rather than the Property Sheet ... it's quicker for me, but that's mainly because I'm so used to doing it this, after having done it this way for 5 years now. VS2005 may be better than previous versions in this respect, but I'm not really sure of that since I still continue to do it manually. Now, your ne ...Show All
.NET Development Difference between 2 dates in a database
I got a dateReturned and dueBack in a Rent table in my database. I want to know how i can have my program to work out the number of days difference between the two. Cheers for any help in advance ...Show All
Visual Studio Express Editions Newbie: Resize a Captionless Forum
Hi all. New guy here =D. I've been learning vb.net 2005 for about a week, and I think I've made relatively good progress. I've got to the point where I can drag my own form with no caption and skin it completely. My last hurdle is that I can not resize the Form with the caption set to None. Though I've seen ton's of software with no caption that can resize, I can't figure it out as of now. So if anyone has any information or tip's to accomplishing this, it would be greatly appreciated. Thank's in advance. Travis Well, you can't use WM_NCHITTEST and also support the system menu. Check Mick Doherty's web site for a sample that uses a label control to implement resizing. ...Show All
.NET Development How to call a function inside of XSL?
I have a function written in C# and I want to call this function inside of XSL file. I am searching on the web, but I could not find any related resources up to now. How can I do You can pass a .NET object as an extension object to the XSLT processor, see the AddExtensionObject method . ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Using Non-XBox 360 Controllers
As far as I can tell the XNA framework doesn't allow me to use controllers other than the XBox 360 gamepad. In future releases of XNA will the use of other controllers be possible If not, then the framework is fundamentally flawed for those wishing to make games for windows. You'd also want support for Steering Wheels (there is one for the Xbox 360, so ideally you'd be able to support that on the 360 too). ...Show All
Software Development for Windows Vista Accessing Windows Services Status
I have noticed a few things have changed in my ability to access information regarding Windows Services. If anyone has any good tips I would appreciate them. Apparently the security rights just to interrogate or query service information has been increased. When I used to call OpenSCManager and OpenService I used to be able to use a GENERIC_READ and SERVICE_ALL_ACCESS Now, I can only use STANDARD_RIGHTS_READ which is ok but... When I try to call the following I get an Access Denied. bResult = ControlService(scService, SERVICE_CONTROL_INTERROGATE, &lpServiceStatus); I've also tried QueryServiceStatusExe(...) but its denied access. What does a program have to do before it can access this information Anyone have ...Show All
SQL Server Limiting Number of Items Displayed in Report
ey there, quick question... is there any way to limit the number of items displayed in a single page say i want to display up to 10 items, and then the rest of the items are then displayed on the next page any help and suggestions would be greatly appreciated. thanks! Tim It's possible if you group on an expression rather than a field: nest your table inside a list control in the properties of the list click "Edit Group Details..." set expression to : =Ceiling(RowNumber(Nothing)/10) in the expression, 10 represents the rows per page so you could make this parameter driven if you want to force to a new page then check the "Page Break After" check box, otherwise you'll get multiple tables appeari ...Show All
Visual C++ ShowWindow() FAIL (return FALSE)
I don't understand why ShowWindow() return a false value. I'm new of Win32, some1 can help me My code bottom (main.cpp) #include "Game.h" INT WINAPI WinMain ( HINSTANCE hInst , HINSTANCE , LPSTR , INT nCmdShow ) { Game game ; HRESULT hResult ; hResult = game . InitWindow ( hInst , nCmdShow , TEXT ( "Tutorial 01: Init Window" ), 800 , 600 , false ); if ( FAILED ( hResult ) ) { DXTrace ( __FILE__ , __LINE__ , hResult , DXGetErrorDescription ( hResult ), TRUE ); return 1 ; } if ( FAILED ( game . Run ()) ) return 1 ; return 0 ; } Application (Game.cpp) #include "Game.h" LRESULT CALLBACK MsgProc ( HWND hWnd , ...Show All
Software Development for Windows Vista Signtool: signing and dating passes, but verification fails
Hi, I just purchased a code signing certificate from Thawte and am having trouble with the verification process after signing. I have tried signing my executable two ways as follows (in a batch file): Method 1: pvk2pfx -pvk mykey.pvk -spc mycert.spc -pfx mypfx.pfx -pi rom828 -f set File=bw700.exe set TimeURL=http://timestamp.verisign.com/scripts/timstamp.dll signtool.exe sign /f mypfx.pfx /p mypassord /v "%File%" signtool.exe timestamp /v /t "%TimeURL%" "%File%" signtool.exe verify /v /a "%File%" Method 2: set Product=BibleWorks set File=bw700.exe set TimeURL=http://timestamp.verisign.com/scripts/timstamp.dll signcode -spc mycert.spc -v mykey.pvk -n ...Show All
Smart Device Development Error: the operation could not be completed. the device is not connected
One weird thing happened to one of my application. When I want to do the debug and sync with my pocket pc device it gave me this error. I have check the device and it's already connected. I even debug other programs and they are fine. why only this one is giving me this problem I solved this by recreating my application. Either i messed up some setup or configuration or not but i notice that Visual Studio crashes several times or at least unable to rebuild a project. ...Show All
