Gavin Clements's Q&A profile
Visual C# Application.Exit(); not working in the form constructor, why?
Hello, I'm using Application.Exit(); in the form contructor to terminate the application if certain condition is met... but it's not working! Why and what can I do Thanks... I don't know, I find that wierd. difference between the 2: Application.Exit() -> informs all message pumps that they must terminate then closing all application Windows after the messages have been processed. It doesn't force the application to exit Environment.Exit() -> terminates the process giving the underlying OS the error code its terminated with. You need to have the SecurityPermissionFlag.UnmanagedCode permission otherwise you will be thrown a SecurityException ...Show All
Visual C++ Operator overloading in VC++.NET Express Edition
Hi! How can I overload operator[] or operator() for array scripting in Whidbey VC++.NET Example : public value class MyFunction { private : array<double> descreteValues; public: MyFunction(int n) { descreteValues = (gcnew array<double>(n)); } /* Overload the operator ( ) or [ ] for array scripting such that both left and right side operations will be possible e.g. for [ ] define a property such that Right => a[ i ] = value; // (set) Left ...Show All
Visual Studio Express Editions precomiled header directives
I am using some user defined header files and i have included the header files in the program but when i try to compile it, i get the following error: fatal error C1010: unexpected end of file while looking for precompiled header directive Error executing cl.exe. I went onto project->settings->c++ and changed the option to not use precompiled headers but it did not solve teh problem. I had a similar problem before but changing the project settings solved my problem but thats not the case anymore. Could someone shed some light on this please!! Thanks very much All i can suggest is that you create a new "empty project" and manually add in the files you need, that way you can be certain that ...Show All
Visual C++ simulate keyboard operation, but while compiling the program, it said: KEYBDINPUT and SendInput have not been defined.
I want to use the following codes to simulate keyboard operation, but while compiling the program, it said: KEYBDINPUT and SendInput have not been defined. Please tell me why and the head file needed to be added. KEYBDINPUT ki; ki.wVk = VK_RETURN; ki.wScan = MapVirtualKeyEx(VK_RETURN, 0, GetKeyboardLayout(0)); ki.dwFlags = KEYEVENTF_EXTENDEDKEY; // or KEYEVENTF_KEYUP, one of those must work ki.time = 10000; ki.dwExtraInfo = 0; INPUT ipEvent; ipEvent.type = INPUT_KEYBOARD; ipEvent.ki = ki; UINT nNumEvents = SendInput(1, &ipEvent, sizeof(INPUT)); I appreciate your help. If you have a desktop machine with a PS/2 connector, the easiest way IMHO to simulate keyboard input is to just build a simple microcontroller circuit to interfa ...Show All
Visual Studio 2008 (Pre-release) Help to convert xaml into csharp
Hi Everybody, Could anybody please help me to convert this code into csharp code Thanks in advance. Joy < Button Name = " btn " Content = " Click " Grid.Column = " 1 " > < Button.Template > < ControlTemplate > < Grid > < Grid.ColumnDefinitions > < ColumnDefinition /> < ColumnDefinition /> </ Grid.ColumnDefinitions > < TextBox Grid.Column = " 0 " > Hai </ TextBox > < ComboBox Grid.Column = " 1 " ></ ComboBox > </ Grid > </ ControlTemplate > </ Button.Template > </ Button > 1. XamlReader.Load(...) or 2. Button btn = new ...Show All
.NET Development Not Able to send mail from C#
Hi I have used the below mentioned code in one of my button event. But this code is not working. I tried debugging the code. The debugger went through each line of the below code reaching the final statement, but the mail is not reached in to the mailboxes mentioned in TO, CC. MailMessage message = new MailMessage (); message.To.Add( "xxx@x.com" ); message.CC.Add(" xxx@x.com " ); message.Subject = "New Access Request" ; message.From = new System.Net.Mail. MailAddress (" xxx@x.com " ); message.Body = "Test mail" ; //SmtpMail.Send(message); System.Net.Mail. SmtpClient smtp = new System.Net.Mail. SmtpClient ( "127.0.0.1" , 25); ...Show All
Visual Studio Team System Data Compare - Next button grayed out
Trying to a Data Compare. After I select my 2 data sources, I go to the next screen where I select the tables/views. I can select all tables or select individual tables, but no matter what I do the Next button is grayed out. Clicking the Finish button just closes the wizard without doing anything. What am I doing wrong I am running the initial CTP that was distributed at Tech Ed. Gert, I just want to add one thing to this. Your reply says "One obvious reason". Obvious to whom And how is it obvious That is one of the shortcomings of the VSTS Database Professional edition CTPs so far. When something is wrong, there is little or no descriptive information to tell you what is wrong. If ...Show All
SQL Server How to update a dimension column with the pipeline tasks
I have been working with DTS and ETL in data warehousing projects for several years and my question is this. You can only update a dimension column with SSIS by using TSQL-update statements. There is no way to do this except issuing TSQL from the control flow or the data flow This subject is not mentioned in Wrox SSIS book nore in Kirk Haseldens book. When you run the SCD task in the data flow you will get an OLEDB command that actually do this, issue a TSQL-statement. Is this correct Regards Thomas Ivarsson Thomas Ivarsson wrote: I would prefer a graphical TSQL-task in the dataflow that will do this set based, not row by row. Regards Thomas Ivarsson Did ...Show All
Windows Live Developer Forums Find Location UK Postcode Error
Hi, I have been using the map.FindLocation function for quite a while now, just giving it a UK postcode everytime it always gave the correct results. Now it doesnt work at all and cannot find postcodes Is there any reason for this and will it be working again soon Thanks, James Could you please post a sample search and what results were given back Also I've noticed that VE has problems searching for European postal codes, and it seems to be a bug in the searching algorithm. It's probably the same problem your experiencing. See this post for more details: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1237431&SiteID=1 Hope that helps. ...Show All
Visual Studio 2008 (Pre-release) How to render HTML ?
Hello board. I'm developing simple RSS reader in Interactive Designer, and I stuck with this question. I've tried to create System.Windows.Forms.WebBrowser. But there are another problem with it - I could not add it as Visual child or Content (I'me using ScrollViewer). Is there any other control or gui component which is capable of rendering html source files if needed The WPF Frame control is capable of rendering HTML, but you may run into problems tyring to render fragments of HTML you've extracted from an RSS feed. The frame is better suited to being pointed to a URL or to an HTML file on the file system. ...Show All
Visual Studio Team System VSS Migration hanging TF60047 - how to move forward?
I am in the middle of running VSSConverter to migrate our source (~2GB) from VSS to TFS. It has been hanging for an hour or so with error # TF60047. The error message says there could be a problem with the network connection or TFS connection. I am running in a single server setup so TFS and SQL Server are all on the same machine, and all are running, incl. all SQL Server service - I checked in Configuration Mgr. One problem earlier was that there was huge (~800K) memory usage by w3wp.exe which was being run by the TFSService account. So I shut down IIS. Now, even though memory usage is down to acceptable levels, the migration is still not moving forward. Any ideas on how I can proceed here Or if I were to start afresh, how do I do that ...Show All
Visual C# Question on Localization
i have another few questions about localization is there any walkthroughs for building a application to be multilingual for .net 2005 beta2. And also what is the best way to update resources from outside the project. I know winres will work to update each form, but how do you compile to a dll from outside the project, because i would like to just ship the exe and reference a dll for resources can this be done . I hope you dont mind me asking these questions. thanks in advance i would not ask but i am pulling my hair out to get around this kered Hi Vikram, Them links were very helpful and put me in the right direction i already have a multi-lingual sample ...Show All
.NET Development Connecting to a MDF (Sql Express) file over Workgroup
Hi I've build a client management (Windows) application in VS2005 which works fine on the local development machine but falls over when trying to connect to the SQL Server Express file located on a second machine on the same Workgroup. Several of the apllications will connect to the database file from networked computers. The error I get when testing the connection or trying to connect via the App is: --------------------------------------------------------------- The file "Z:\BushBreaks.MDF" is on a network path that is not supported for database files. An attempt to attach and auto-named database for file z:\bushbreaks.mdf failed. A database with the same name exists, or specified file cannot be opened or it is on a UNC s ...Show All
Visual Studio project templates disappeared
From one day to another my project templates disappeared. I can only create a Webapplication, but no WindowsApplication. I can't add a WindowForm to a project, only inherited forms. What can I do I reinstalled Visual Studio and followed the instructions of the Thread "Visual Basic Templates disappeared" but it didn't help. Hi Ed, Thank you very much for your quick answer. I don't know why, but after deinstalling Visual Studio Partner ....(I can't remind what it exactly was) my new installation works. I'm very happy. Thank you. Sincerely, Silke ...Show All
.NET Development how to jscript in vb.net
hi , i my dot net application vb.net i have add web browser control at the time of loading the application can it automatically open a html file and can anybody tell how i write code for the html file using java script in vb.net Hello Narasiman, I have a question to ask first. What is it that you want to do in the html file using JavaScript ...Show All
