visual-c#-express-2010

What is the difference between a Local Database in C# and a SQL Server Management Studio created database?

一曲冷凌霜 提交于 2019-12-21 07:16:09
问题 I'm creating an application with MS Visual C# 2010 Express that requires a database. I've learned that there seem to be two ways to create/use a SQL database with this application. The first seems to be where from within C#, I can create a "local database" by right-clicking on my application in the Solution Explorer and clicking "Add"->"New Item"->"Local Database". Then it's shown in the Database Explorer and I can use it. The other way is where I create a database with SQL Server Management

Notify Icon Ballon Tip Not showing in C#?

跟風遠走 提交于 2019-12-21 03:55:30
问题 i am using this code under my form1_load notifyIcon1.Visible = true; notifyIcon1.ShowBalloonTip(5000, "Welcome", "Hello " + User, ToolTipIcon.Info); I even checked my registery and the value was 1. Why is the baloon not showing? I do have a icon form my notify icon. and it is showing up. The Baloon is not though! 回答1: You may need to post the rest of the code that's in your form's load event, but here's a couple of suggestions: Make sure the form's Load event is actually hooked up. Make sure

How to call user defined function in LINQ in my visual C# web service for my android application?

牧云@^-^@ 提交于 2019-12-19 09:24:33
问题 I am currently working on an application that will retrieve other users' locations based on distance. I have a database that store all the user location information in latitude and longitude. Since the calculation of distance between these two pairs of latitude and longitude is quite complicated, I need a function to handle it. from a in db.Location.Where(a => (calDistance(lat, longi, Double.Parse(a.latitude), Double.Parse(a.longitude)))<Math.Abs(distance) )) {...} However, I got the

WPF Application still runs in background after closing

为君一笑 提交于 2019-12-18 01:38:27
问题 This is slightly related to the question asked here yet the answer does not apply to my case as I am not using threads: WPF Not closing properly I have converted one of my WinForm application to a WPF application, nothing drastic needed to be done except for change a few words to the WPF/C# 4.0 equivalents (MessageBoxButtons to MessageBoxButton, why the one letter difference?). Anyway, if I run the application through the debugger it runs fine until I come to close it with the "X" button to

Properly disposing of, and removing references to UserControls, to avoid memory leak

房东的猫 提交于 2019-12-17 15:59:11
问题 I'm developing a Windows Forms application (.NET 4.0) in c# using Visual c# express 2010. I'm having trouble freeing up memory allocated to UserControls I'm no-longer using. The problem: I have a FlowLayoutPanel, where custom UserControls are displayed. The FlowLayoutPanel displays search results and so on, so the collection of UserControls that are displayed must be repeatedly updated. Before every new set of these UserControls are created and displayed, Dispose() is called on all the

Getting Downloads Folder in C#? [duplicate]

Deadly 提交于 2019-12-17 10:17:17
问题 This question already has answers here : How to programmatically derive windows downloads folder “%USERPROFILE%/Downloads”? (6 answers) Closed 2 years ago . I have made some code that will search directories and display files in a listbox. DirectoryInfo dinfo2 = new DirectoryInfo(@"C:\Users\Hunter\Downloads"); FileInfo[] Files2 = dinfo2.GetFiles("*.sto"); foreach (FileInfo file2 in Files2) { listBox1.Items.Add(file2.Name); } I have even tried this: string path = Environment.SpecialFolder

.NET stand alone executable

╄→尐↘猪︶ㄣ 提交于 2019-12-13 02:37:29
问题 I'm using C# Express 2010. I made a WPF application with free VIBlend Edit controls, these controls uses the corresponding dlls, is it possible to create a stand alone executable? I want to copy only the exe to another machine (the framework is installed of course), but I don't want to copy the dll! 回答1: Try using ILMerge 回答2: ILMerge Here are a couple of resources regarding ILMerge that you might find helpfull: Merging .NET assemblies using ILMerge When & How to use ILMerge ILMerge Tasks for

Visual c# express does not open c# projects

流过昼夜 提交于 2019-12-12 01:32:44
问题 I was happy making an app in microsoft visual c# express, until i resarted my pc. After the restart, i try to open the same project and it does not open (does not say anything, just does not open anything) then, i opened the visual c# express, searched the project and it opens!!! But now everytime i work on a c# project, i have to open first the visual c# express and then look for the project. Other weird thing, is that the visual c# now run always as adminsitrator, so a windows is prompted

Where does Visual C# 2010 Express keep it's temporary files?

南笙酒味 提交于 2019-12-11 17:36:25
问题 I worked on an application for a couple of days and saved files frequently with Ctrl+S. This morning I found out that my computer had force-restarted because of Windows security updates. Apparently Visual C# 2010 Express does not create a folder for project when the project is created. The project itself is saved only after "Save All" is issued. Backup Files -folder contains a folder with project name but the folder is empty. Is there any way to save at least part of the project? 回答1: I

ProgressBar Paint Method?

﹥>﹥吖頭↗ 提交于 2019-12-11 01:18:49
问题 OK, here is my code for what to paint on the progressbar: private void timer2_Tick(object sender, EventArgs e) { int percent = progressBar1.Value; progressBar1.CreateGraphics().DrawString(percent.ToString() + "%", new Font("Arial", (float)8.25, FontStyle.Regular), Brushes.Black, new PointF(progressBar1.Width / 2 - 10, progressBar1.Height / 2 - 7)); progressBar1.Increment(+1); if (progressBar1.Value >= 99) { timer2.Stop(); this.Close(); } Ok, so i am painting a label in the middle of it that