i_dachev's Q&A profile
Windows Forms Can't close a WinForm app
I have a WinForm application. When I click the X button at the top right cornor of the MainWindow, it could not be closed and there is no exception. Could anyone explain why Thanks! Hi, I am thinking of a different approach to troubleshoot now. Add the Event Handler for FormClosing in your Form and register the event. private void Form1_FormClosing( object sender, FormClosingEventArgs e) { e.Cancel = false ; MessageBox.Show("FormClosing Event"); } See if you get the MessageBox string when it does not close also. Regards, Vikram ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Going nuts here.....
Ok...I have scoured the Internet from MSDN to Google trying to find the answer to this one.... As I am new to the whole DirectX scene, I was viewing the Webcast for using C# with DirectX in game development, namely the Star Trooper game, if anybody has seen that one. I originally could not build the downloaded projects without many errors, but I installed the April sdk and now I can build all of them. The Problem is that when I Publish, I can no longer run the program...I get an error in: clr20r3 p4 microsoft.directx.direct3dx exception code 0xe0434f4d FYI I have win xp pro, c# express, Directx9.0c, net 2.0 framework, april ...Show All
Visual Studio 2008 (Pre-release) How can I put one canvas on top of another? or How can I draw multiple layers in the same area?
Pretty new to graphic dev, so please bear with me. I have an animation (a wheel with colored circles on its outer edges, that spins), which I accomplish by drawing a large ellipse, and some smaller ellipses (sp ). I do this on a transparent canvas, then I rotate the canvas. Conceptually, what I would like to do is draw an opaque rectangular structure over the animation layer, but provide a small "hole" or view through the opaque layer so that you can see the underlying animation. I can't seem to draw over an existing canvas though. To summarize, I want to display a 2D box with a spinning wheel inside of it. A hole in the ...Show All
Software Development for Windows Vista WinFX Crashes
OK. Just installed the November CTP's and installed all of them. Everything seems to "work", but I can only get the WPF samples to run about 1 in 5 times - and when they do run, they crash very quickly. Almost all of them do this, no matter how complicated they are. Such as, when I run the "sample viewer" app, sometimes it will actually start up just fine, and I can start to navigate around. But usually within a minute or so (or a bunch of clicks), the app will just crash hard. If I try running it within the debugger it will just close jump back to VS with no message or error. Here's the error: EventType : clr20r3   ...Show All
.NET Development unable to access SQL server from web app
Hello, i just changed authentication mode from "windows" to "forms" so that users use a login form, and now i cant get access to DB. I have created a new database user as (mycomputername)\ASPNET, but it doesnt seem to work.Please help... When i run the application i get error: System.Data.SqlClient.SqlException: Login failed for user '(mycomputername)\ASPNET'. Source Error: Line 91: Try. Line 92: myConn.Open() Line 93: Dim rdrUsers As SqlClient.SqlDataReader Line 94: & ...Show All
Windows Forms Problem deploying with ClickOnce
I am having similar problem with the one in the following link, but seems a bit different (in the exception message). http://www.windowsforms.net/Forums/ShowPost.aspx tabIndex=1&tabId=41&PostID=19299 I created my .application and .exe.manifest files with MageUI.exe, and the application could be deployed successfully if I do that locally, clicking the .application file in Windows Explorer. Then I mo ...Show All
Visual C# How to open a text file into a RichTextBox and keep the file open ?
Hi, My question is how to open a text file into a RichTextBox and keep the file open so the RichTextBox will be updated when the file does and will show all the text in the file constantly (in c#.net) Thanks a lot, I think you might have to create a new thread that will check the file and perform the update itself. I dont know of a way to do it automatically. The update may not be "live" but if you call the thread in intervals of a couple seconds (or less), it shouldnt make a big difference. ...Show All
Visual C# Datagridview - different image on different value
Hi all, so the problem is like this: Lets say in the database i have a Table with Priority column (values - 0,1,2). Now what I want to do is display this column as Images, depending on value (ex. 0 - low.jpg, 1 - normal.jpg, 2 - high.jpg). What I know, is that I need to create two custom classes: One from DataGridViewImageColumn, and set ValueType to int Second from DataGridViewImageCell and override GetFormattedValue method, to return the image i want Until this point Ok, it's no problem to do so, the problem comes up how to integrate it with datagridview and dataset I display datagridview like this: ...Show All
Visual Studio Tools for Office Create a "Bare" Workbook From VSTO
In my Excel VSTO project, I would like to provide an "Export" button that would copy and reformat one of my worksheets into a new "bare" workbook. The "bare" workbook would not have any VSTO code behind. So, for example, I could e-mail the workbook to a client, and the client clould see the data without worrying about Dot Net deployment and security issues. Read in the data from the sheet and stream the data out to a file that your user's Excel can read such as a CSV format. Hence it is a bare workbook. ...Show All
.NET Development Serialize Strong Typed Collection. "There was an error reflecting type.."
HI, I have a class that looks like this: [ Serializable ] public class NewsItems : System.Collections.Generic. List < NewsItem > { }; Any it works just fine for 99% of my needs... Here is the 1% problem, when I want to write out the contents of my collection to XML, I get the following error (pasted below) anyone know how to remedy this System.InvalidOperationException was unhandled Message="There was an error reflecting type 'NewsItems'." Source="System.Xml" StackTrace: at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContex ...Show All
Windows Forms Can't get images on toolbar buttons when running
Hi everyone, I have a VB.net application that has a toolbar with several buttons. The first two buttons are the standard "save" and "print", with those typical images. My problem is they show up and work fine in the form designer, but when I run the application the images assigned to the buttons do not appear. Can anyone tell me  ...Show All
Windows Forms TreeNode label
Hello, If I have a label in the edit mode, and the user makes a text selection, is there a way to capture the selected text only. There is an attribute on the text box that does that. Thank you Hi, I don't know the direct answer you're looking for, though I am sure there is an API you could use to get that information. Instead, have you considered using a TextBox and setting its properties to make it appear as you would want. The TextBox control has a SelectedText property. It also has a Locked property you could use to prevent user entry at the wrong time. I hope this helps, Jason ...Show All
SQL Server Can't find PInvoke DLL 'sqlceme30.dll'
I am developing for an ipaq handheld. I just upgraded to Windows Mobile 5.0 and tried to run my application and I get this message. Can't find PInvoke DLL 'sqlceme30.dll' I am using a sql Mobile DB and vs2005 Hi , I faced the same issue " Can't find PInvoke DLL 'sqlceme30.dll " when tried to run an application in the following configuration. SQL Mobile+ VS 2005 + Pocket PC 2003 It seems it happened after installing Toolkit for WM 2005. However the issue got resolved after manually installing the SQL Mobile CAB files manually. The default path is : C:\Program Files\Microsoft Visual Studio 8\SmartD ...Show All
Visual Studio Tools for Office Manged outlook add-in issue
So I am having an issue with some code, that checks the mailitem.sendername and then moves it to a folder and then flags it. Just something simple, am using a switch statement to do the job... the code is as following: void ThisApplication_NewMail() { Outlook.MAPIFolder _inbox = this .GetNamespace("MAPI").GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderInbox); Outlook.Items unread = _inbox.Items.Restrict("[Unread]= true "); &nb ...Show All
Visual C# how can I detect device in C#
Hello everybody, For this moment I have only one question: "How can I detect if my webCam is connected to my computer" Is there any classes, that I should know thanks I think this can help you: http://www.codeproject.com/dotnet/wiascriptingdotnet.asp ...Show All
