fraser_foo's Q&A profile
Smart Device Development RingTone FileName (.amr) is not saved on my mobile handset properly --it needs some new MIME types
Dear Microsoft: I have created a Mobile Application in C# using Visual Studio.net 2003. I am sending a WAPPush SMS to users who may request Mobile Services such as (Ringtones, Pictures). I have a problem in downloading ringtone(True Tone of file extension AMR) on WAP Browser, the ringtone name is not saved. After downloading the Ringtone file takes the link file name "userlink" which appears in url(ex, url: http://IP/webapplication userlink.aspx pwd=887768 ). The ringtone is saved as userlink.amr on mobile handset after downloading. I can download file type AMR (or in MP3...) from my Web Browser but it is not saved on mobile handset in its real name just it can be heard.Moreover, the filename and length have been specified in Respons ...Show All
Visual C# Best way to achieve this?
I need to run a loop to check if a file exists then delete it. Once its deleted it can stop looking. However, at the time the loop starts it may not exist, but it will evntually be created. do { delete(); Console.WriteLine("Checking"); } while (check() == false); private static bool check() { if (File.Exists(Environment.GetEnvironmentVariable("SystemRoot") + @"\myfile.dat")) return true; return false; } public static void delete() { if (File.Exists(Environment.GetEnvironmentVariable("SystemRoot") + @"\myfile.dat")) { File.Delete(Environment.GetEnvironmentVariable("SystemRoot") + @"\myfile.dat"); Console.WriteLine("Deleted"); } } I gave it ago and ran into some problems. private void mainForm_L ...Show All
Visual Basic question about references
If I add a reference to my solution by right clicking on the references in the solution explorer and selecting add reference, what am I doing I understand what I did, but, what effect does this have on my application. I am assuming that this is where I can add my custom classes to the program. (or other classes that I have). Am I correct in this assumption. If not, can anyone please point me into the correct direction This allows you to utilize the Classes, method, enumerations, constants etc. that are defined in the assembly that you are making reference to. These could be user defined - if you create a class library or they may be system classes eg. System.dll ...Show All
Visual C# Problem loading web forms
I am new in C# and I am building a simple web form with just a label, but when I try to run it, comes a messages saying that the page cannot be loaded. What coud it be Is it user permissions or somethig Thanks hello, I had the same Issue. Check if you are using a proxy in your internet explorer. dissabling the use of a proxy server should allow your webapplication to show up again in your browser with debugging. Greetings Ton ...Show All
Game Technologies: DirectX, XNA, XACT, etc. C++ and XNA (I couldn't find it, yet)
Hey, I was wondering if GSE will, at a later stage, support C++ or is it C# exclusive Many Thanks. t_p In many ways C# is simalair to C++ (syntax speaking) so picking it up isn't that difficult if you now c++ (and you'll be rid of the dreaded pointers. ...Show All
Windows Forms disabling the mainmenu in a form
Hi Does anyone know how to make the main menu in a form non responsive. I have this function which expects the user to pick a point on a pictureBox in the form with the mouse. Until this happens i want to stop the user selecting anything else on the form. The only thing he can selected at the moment is in the main menu that's why i want to make it non responsive for a while. Any ideas how to make this work. Much appreciate it. george Yes, MenuStrip.Enabled works. You also might want to turn on mouse capture (PictureBox.Capture = true) to redirect all mouse input to the picture box. Modal operations like this are usually a lot of trouble, considering just setting a flag that indicates "the next MouseD ...Show All
Visual Studio Problem with Query Engine
I want to generate a Crystal report from an asp.net page. When I try to execute this code: string exportpath = @"C:\PushInvoices\xxxxx.pdf"; CrystalDecisions.CrystalReports.Engine.ReportDocument myreportdoc = new CrystalDecisions.CrystalReports.Engine.ReportDocument(); myreportdoc.Load(@"C:\Inetpub\wwwroot\DEV\OUTSIDE_SUBMISSIONS_2\PushInvoice.rpt"); myreportdoc.ExportToDisk(ExportFormatType.PortableDocFormat, exportpath); I get an exception thrown on the line with the myreportdoc.Load method. The .rpt file does exist on the path specified. the exception thrown is: "Failed to create the Crystal Query Engine". I've checked permissions and they seem ok. I could be ...Show All
Visual Studio Extending core C# Language Service
Hello, I’m starting a new package with VS SDK (Nov CTP). I want to create a package that defines a language extension to the C# language. I’d like to reuse the Intellisense, coloring, etc. of the standard C# Editor. So, I created a package and I implemented an EditorFactory to create instances of the core editor. But I don’t know how to associate the core C# Language Service to the editor. Can anybody help me Also, I will need to define new tokens in the Language Service to extend it with my constructions, and set coloring, Intellisense, etc for the new tokens. Is it possible Thanks in advance, Nicolas Hallo, 1) I tried assigning CSharp to my editors and it works fine. Don't expect to ge ...Show All
SQL Server upgrading from SqlExpress2005 to SQLEXP2005Advanced
Hi, I am newbie with SqlExpress. I have SqlExpress2005 installed on my computer and created some databases on that. They are working fine. Now, for the sake of full text search and other facilities, I would like to upgrade this to SQLEXP2005Advanced. My questions are: 1. Shall I need to uninstall SqlExpress2005 first to install SqlExpress2005 2. How I can take backup of existing databases on SqlExpress2005 so that I can immediately restore them on SQLEXP2005Advanced Thanks in advance for any help in this regard.... Regs Tony No uninstall is required. When you run the SQLExpress Advanced setup it will ask you to select either a default instance or a named instance. Click the button to view existing instan ...Show All
Visual C++ error LNK2005: _main already defined
I recently installed VC++ 2005 EXP edition. 1) I created a project name Radius and created two new items hello.cpp and area.cpp. 2) area.cpp is the first item and hello.cpp is the second one. 3) When I build the project Radius, I got the error LNK2005: _main already defined in area.obj Can you guide me to fix the compilation error. Thanks GKW82 This is what MSDN says : Error Message '{' : missing function header (old-style formal list ) An open brace occurs at global scope without a corresponding function header. This error can be caused by an old-style C-language formal list. The following sample generates C2447: int c; {} // C2447 Check whether you are ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Weird error when trying to laod a 2D Texture
Error 1 Building content threw InvalidOperationException: D3DERR_NOTAVAILABLE at Microsoft.Xna.Framework.Content.Pipeline.CommonHelperFunctions.InitD3D() at Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.InitD3D() at Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.Import(String filename, ContentImporterContext context) at Microsoft.Xna.Framework.Content.Pipeline.ContentImporter`1.Microsoft.Xna.Framework.Content.Pipeline.IContentImporter.Import(String filename, ContentImporterContext context) at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAssetDirectly(BuildItem item, String importerName) at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAsset(BuildItem item) at Microsoft.Xna. ...Show All
SQL Server How to detect and add exceptions to Firewall programmatically?
I've been successful at installing a customized SQLexpress using setup.exe /settings template.ini. What I'd like to do now is see if I can progammatically detect a Firewall on the SQLexpress machine and if there is one to add the exceptions for sqlservr and sqlbrowser programmatically so that the user doesn't have to do anything. Is this possible and how would I do it Thanks, jerry You'll have to use the Windows Firewall API to do this. There is a topic on adding Program Exceptions here . Mike ...Show All
SQL Server There must be an easier way - Dupe check and Increment field
Greetings all, I have a bit of brainteaser that's going to take some serious thought. I'm importing information from .xls files into a SQL table. The problem is I need to check for dupes and increment certain fields on success of dupe find and then not insert or delete the dupes. For example, if I have Adam, Turner, 32, 50 already in the table and someone tries to insert Adam, Turner, 32, 50...I need it to increment to read Adam, Turner, 64, 100 and not insert the record. (Notice 2 fields were incremented.) With that, I have created an INSERT trigger as follows: set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO ALTER Trigger [dbo] . [trgInsertCheck] ON [dbo] . [MyTable] FOR INSERT AS BEGIN &nbs ...Show All
Smart Device Development Component onKeyDown raises two-times
I built my own component in c# for my smartphone. The problem is, that the event OnKeyDown and OnKeyUp are raises two-time all the time. When my component has focused, it is ok, because I use e.handled=true and the second raise do nothing. Problem is, when I press key for example in menu, because when my component has focus and I press key on menuItem, it raises the event of menuItem and of my component too. any ideas thanx example: protected override void OnKeyDown(KeyEventArgs e){ base.OnKeyDown(e); e.Handled = true; if (pouzivatPopup) { if (e.KeyCode == Keys.Down) { if (skocNaPopup != null) { this.timer.Enabled = true; skocNaPopup(true); r ...Show All
Windows Forms C# 2005 Sort ListView by column
How do i sort a listview by column ...Show All
