mettoff's Q&A profile
Visual Basic RectangleF.IntersectsWith - Precision?
What precision does the IntersectsWith have regarding Rectangle vs. RectangleF I had assumed that since values for RectangleF were singles and not integers that this was also a factor in the IntersectsWith routine. However, consider the following example: Dim rect1 As New RectangleF(13.45, 5.15, 1.51, 1.51) Dim rect2 As New RectangleF(10.3, 5.15, 3.15, 3.15) Dim rect3 As New RectangleF(1345, 515, 151, 151) Dim rect4 As New RectangleF(1030, 515, 315, 315) MsgBox(rect1.IntersectsWith(rect2)) ' Returns True MsgBox(rect3.IntersectsWith(rect4)) ' Returns False This may be the expected behavior, but it created more than one problem with my current application. Thanks! ...Show All
Smart Device Development /clr ProcessCmdKey
I am trying to activate my pocket pc's keyboard. I am a "C" programmer and I am really lost in windows. I am just following the clues in search and help. So, I set my compiler option to /clr. Next i got this code in help. #using <mscorlib.dll> public __gc class MyDataGridControl : public System::Windows::Forms::DataGrid { protected : bool ProcessCmdKey(Message* msg, Keys Keydata) { const int WM_KEYDOWN = 0x100; const int WM_SYSKEYDOWN = 0x104; if ((msg->Msg == WM_KEYDOWN) || (msg->Msg == WM_SYSKEYDOWN)) switch (KeyData){} } } return ( 'a' ); } the more it study this codeing the more i do not understand. I run the code and get the following mess ...Show All
SQL Server SQL stops working
I created some test data in two tables. Then I went to one of the tables and right clicked then Selected \Script Table as\Select To\New Query Editor Window. I then cleared the generated data and selected\Design Query in Editor. I then picked both tables in the 'Add Table' window and picked 'Add'. This produced two windows and I made the links I needed and clicked OK. This generated the SQL I wanted and it works great! But when I close the SQL Express and then re-open it the SQL does not work! I open SQL Express and select\File\Open\File and pick the SQL I had just saved. Then I pick Execute I get the following message. Msg 208, Level 16, State 1, Line 1 Invalid object name 'dbo.FileData' How can I save SQL that works and then not ...Show All
Visual Basic VB.NET console application doesn't want to work as a scheduled task??!!
Hi all experts, I'm experencing a very strange error. I created a windows console application to check all the process on server and if there is one or more process doesn't work, the application sends out an email. I deployed the application on the server and when I run it by double click the .exe, it works fine. If I add it as a scheduled task, it never gets the list of process correctly. Could anybody help me out Below is the code piece of get process list. ' GetProcesses For Each proc As Process In Process.GetProcesses() Try If proc.MainWindowTitle.Length > 0 Then Console.WriteLine(proc.MainWindowTitle.ToUpper().Trim()) procs.Add(proc.MainWindowTitle.ToUpper().Trim(), pro ...Show All
SQL Server Custom Code for a Parameter
I'm using a GAC-installed assembly as part of a Reporting Services (2005) report. The code does not need any permissions beyond execution. All it does it take today's date and calculate last week's start and end date. It's all just datetime manipulations. All methods are static. In the VS2005 report designer, I can do everything fine. The code runs as expected and defaults the parameters to the right date. When I upload the rdl to the Report Server, I get the message "Error during processing of ‘Start’ report parameter. (rsReportParameterProcessingError) ". If I override the "Start" parameter, it doesn't give me that error anymore. Start should be the Sunday of the previous week. I have deployed the signed ass ...Show All
SQL Server Parsing one field into many
I am trying to parse a single field into many. A sample of the data in one of my fields is: 0;127.20;3;23.90;13.56;0;0;0;0 I would like to parse it into 9 fields. I am sure that this is easy, but, since I am new to SQL2005, I am having a few probs with this simple task. Any assistance will be greatly appreciated. Layne Layne: Are you trying to just parse this single line or do you intend to parse multiple lines There is an excellent article for processing arrays at: http://www.sommarskog.se/arrays-in-sql.html Dave ...Show All
Visual C++ Saveing IDE State
I got my VS2K5 IDE configured the way I want it with toolbars, windows, etc. Unfortinitly every time I reboot VS2K5 I have to do it all over again. How do I tell the IDE to reload my current configuration at startup. That seems like a bug actually. Make sure you actually exit VS properly (Don't terminate it) so that it can save your config. You can also export all your settings (including layout etc) to a file by selecting Import/Export from the Tools menu. You can then reload your settings on any machine. Thanks ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Sound Problems
okay, I'm having some weird sound problems. If I press A, the music starts....no problems there If I press B, the music stops....no problem there If I press X, the music will pause or unpause...no problem there I can start the music, stop it, restart it as many times as I want, that works fine I can pause and unpause it repeatedly, still no issues I can pause it and unpause, then stop and restart, still no issues but if I pause it, then stop it, the music keeps starts playing again. This happens even when I run the unpause code right before stopping it. And if I hit the start music button again, the song will start over top of the other one, so it's playing twice. I have *no* idea what's going on here. ...Show All
Visual Basic Problem Converting VS 2003 Web App to VS 2005
I am really confused ... people who know me wouldn't be surprised! I have a fairly good-sized web app that I developed with VS 2003 a couple of years ago that I want to convert to VS 2005. I launch VS 2005 and go to Open ... Web Site and select the folder that contains my VS 2003 source code. VS 2005 then goes into the conversion wizard and everything appears to go along OK (although I am amazed at how fast the conversion happens ... about 30 secs ... and the fact that no source code problems were found). When I then look at the folder that contained the original VS 2003 source it appears to me that nothing has changed! The solution still shows up as a VS 2003 solution ... not a VS 2005 solution! Yet when I relaunch VS 2005 and open the pr ...Show All
Visual Studio Express Editions Write native Windows 98 Application in VB Express
Is it possible to write an application in Visual Basic Express which runs 'natively' (i.e. without the need for .NET frameworks) on Windows 98 If so, how is this done If not, what's the best alternative for developing such an application on a Windows XP machine Thanks John I don't think I'm making myself clear. This work is not for a job or a paycheck. It's basically a favour to a friend. In a work environment I wouldn't dream of using Windows 98, VB6 or anything not officially supported. In a home environment - which is the target of this product - old computers are quite common though, whatever the rights or wrongs of that. And people with old computers need to be able to buy/download this min ...Show All
Visual Studio Express Editions Database "vbExpress"
hi i have created a database in acces 2003, and i wont to display some values from that database on textbox. It is possible how can i do this thank you!!! Something similar to the following if using 2003. Dim odaCust As OleDb.OleDbDataAdapter Dim dtCust As DataTable = New DataTable() Dim strSQL As String '-- Create the SQL String strSQL = "Select CustomerID, CompanyName From Customers Where CustomerID = 1'" '-- Set up the exception catch Try '-- Create an instance of the data adapter, ' and then fill the data table odaCust = New OleDb.OleDbDataAdapter(strSQL, _ BuildCnnStr("(local)", "Northwind")) odaCust.Fill(dtCust) If dtCust isnot nothing ...Show All
Visual Studio Express Editions Reading a web page...
I have been trying to read from a Web page inside of a WebBrowser control. I can read the entire page code, but can not specify certain areas of the page to read, like a text box. I would like to be able to read just the text box in my web page and have it write the context of the web page text box over to my application textBox... This is the closest I've been, but I can not get it to work at all. It will do the "if ()" event, which is just a message box, but it will not copy the web pages text box contents to my application textBox. <input name="txtName" type="text" id="txtName"> in order to get that element, I would do this: HtmlElement theTextBox = this.theWebBrowserCont ...Show All
Windows Forms Newsticker in c# windows program
Does anyone know how I can make that, or know where I can look for ideas I have a slideshow program that shows movie trailers, room reservations etc, and would have wanted a horizonal "line" below the slide that have a moving text for short, quick annoucments. Hi Thanks! I have downloaded it, so you may remove it now. I’ll take a look and see if I understand how you did it. ...Show All
Software Development for Windows Vista Rename workflow when published as webservice
I have a workflow called TestWorkflow.cs that i have published as a webservice. By default it is called TestWorkFlow_WebService when it is published. How can i publish it as just Test ...Show All
Windows Forms Form Freezing
Hi,i have made a C# desktop application that calls the web pages,crawl and parse them, this process takes time it may take 2 mins, the form in this duration freezes and stop me to do anything. I need a technique to avoid the from freezing when i start the application, if anybody can help me i will appreciate . Thanx alot . When you load the form, call the form's Show method, this forces the display of the form, then call Application.DoEvents to let your form process the drawing. Then in your parsing routine, if you are doing task inside a loop, add a regular call to Application.DoEvents to let your form execute other events, hence preventing the "freezing". Or better yet, use Backgrou ...Show All
