centexbi's Q&A profile
Windows Forms handle a mouse click anywhere on the form
Hi, I'd like to get an event when the mouse is clicked anywhere on the form, even when the mouse is over some control on the form. Simply handling the MouseDown event of the form doesn't work, because when the mouse is over a control on the form, it seems like only the MouseDown event of that control is raised, and not that of the form. What can I do You can override the WndProc method of the form like so: // Constants for decoding the Win32 message. protected const int WM_PARENTNOTIFY = 0x210; protected const int WM_LBUTTONDOWN = 0x201; protected const int WM_RBUTTONDOWN = 0x204; protected override void WndProc(ref Message m) { // This is the message from child cont ...Show All
Visual Studio Express Editions accessing file on disk
I want to access file on disk without getting it onto ram. i guess i'll hv to get it on virual memory and do it. Am i right if yes how do i do that language preffered: c# or c++ No. Either if you use ReadFile/fread or memory mapped files the system still needs to go to the disk and read sectors and this is where performance is set. ...Show All
Windows Forms Webbrowser control with Flash Website problem - PLEASE HELP
Hello, I've got a VS.NET 2005 (VB.NET) Winform App that has a webbrowser control on it. I can open a web site just fine with it and can even open websites that utilize flash just fine. The problem is this: After clicking around for a VERY brief time inside of a flash file within the webbrowser control, the mouse clicks don't seem to work inside the flash movie. They work for a little while, but very soon after, quit working. Mouseover events in the flash file seem uneffected. To remedy this, I must click outside of the flash movie (still inside the webbrowser control) then clicking withing the flash movie continues to work (for a little while) then the cycle repeats. When I say "a little while", I'm talking so ...Show All
Windows Forms Why My Custom ToolboxItem did not work?
public class ActivityToolboxItem:ToolboxItem { //private Type m_Type = null; public ActivityToolboxItem() { } public ActivityToolboxItem(Type pComponentType) :base(pComponentType) { //this.m_Type = pComponentType; } public override string ComponentType { get { return base.ComponentType; } } } and then in IToolboxUser Implementation. public bool GetToolSupported(ToolboxItem tool) { if(tool.TypeName == "WindowsApplication5.MyActivityA") { return true; /// } return false; } the "WindowsApplication5.MyActivityA" class is decorated with ToolboxItemAt ...Show All
Game Technologies: DirectX, XNA, XACT, etc. D3DERR_NOTAVAILABLE while build of first example in help how to do
I used to code in pascal, cobol, assembly, basic, etc, but not C. From: Your First Game: Microsoft XNA Game Studio Express in 2D following along and doing the first build, I get the error above. I did not think I was calling the 3d engine only the 2d. I cannot find any help on the error, where to look, etc, except what is in the error window when you cursor over it. I cannot figure out how to copy the error in that popup window to look at it further. I know some dislike nubies, but please help if you know the answer. Its disheartening to type in only 6 lines of code and not be able to debug it! To say the least. Thanks OH OH OH, I figured out how to copy the error: Error 1 Building content threw InvalidOperationExcept ...Show All
.NET Development C# SMTP mail sending problem
Hi, The below C# is code is working fine, there is no errors still i am not getting mail to, all the messages are going to C:\Inetpub\mailroot\Queue Folder Why how do i send mails to the to specific address directly Any solution The C# code is SmtpMail.SmtpServer.Insert(0,"127.0.0.1");//real SMTP server ip adddress MailMessage objmailMessage = new MailMessage(); objmailMessage.From =" radhakrishnan.k@xx.com "; objmailMessage.Body = txtSubject.Text.Trim().ToString(); // subject objmailMessage.To = txtTo.Text.Trim().ToString(); //To address SmtpMail.Send(objmailMessage); objmailMessage.Fields.Add(" http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",2 ); Th ...Show All
SQL Server OLE DB Command transform and Output columns.
Hi All, I have an OLE DB transform with a SQL Command of: sp_get_sponsor_parent , OUTPUT where sp_get_sponsor_parent is defined like: CREATE PROCEDURE [dbo] . [sp_get_sponsor_parent] @pEID int , @results int OUTPUT AS BEGIN . . . END I map the columns, refresh & OK out of the component without trouble, but on executing the package it fails during validation on this component. I'm utterly stumped. Any light shed would be greatly appreciated. Many thanks in advance, Tamim. This wasn't the problem Rafael - the EXEC is optional. I resolved the issue however, by trialing just this one thing - outputting to a (derived) column within OLE DB Command - in a new/cl ...Show All
Visual C# An unhandled exception of type 'System.StackOverflowException', how to handle this problem?
class CreateCage (simple code, not complete) // this.cButton.Location = new System.Drawing.Point(88, 168); this.cButton.Name = "cButton"; this.cButton.Size = new System.Drawing.Size(88, 23); this.cButton.TabIndex = 3; this.cButton.Text = "Create Cage"; cButton.Click += new System.EventHandler(cButton_click); fmhandler = new Form1(); private void cButton_click(Object sender, System.EventArgs e) { string temp = fmhandler.getCstring(); MessageBox.Show(temp); fmhandler.infotextBox.Text= temp; this.Hide(); } public int getNumber() { try { number = Convert.ToInt32(inputtextBox.Text); return number; } catch(FormatException) { MessageBox.Show("pls input integer"); return -1; ...Show All
Windows Forms Window class name is not valid
When I create a new WindowsApplication project, add any control to the main form and run the project - I get the following exception on Application.Run(new Form1()); I am using VS 2005 beta2.050215-4400. This haven't happened until now. What went wrong Any help will be appreciated Gabriel The exception data follows: System.ComponentModel.Win32Exception was unhandled Message="Window class name is not valid." Source="System.Windows.Forms" ErrorCode=-2147467259 NativeErrorCode=1400 StackTrace: at System.Windows.Forms.NativeWindow.WindowClass.RegisterClass() at System.Windows.Forms.NativeWindow.WindowClass.Create(String className, In ...Show All
Windows Forms Runnning ClickOnce app as Scheduled Task
Hello, I would like to run a ClickOnce (offline and online) application as a Scheduled Task. The application installs, runs, and the ClickOnce updates work as advertised. When I try to setup the Scheduled Task the Wizard asks for the location of the program. How do I find the exe location Will it change after a ClickOnce update Thanks Tom ...Show All
Smart Device Development Adding Custom Today Screen Item
Actually I need to add a "cutom today screen Item" to Pocket PC automatically when message has been reached to my messenger. I am presently working on Visual Studio.Net 2003( Compact Framework1.1). Actually I have tried this link: C:\Documents and Settings\Administrator\Desktop\malleswar\adding image\Creating a Pocket PC Today Screen Plug-in with the _NET Compact Framework.htm but for building Embedded Visual C++ (eVC) has to be used. If u know better way than this plz guide me. You've to use upgrade wizard before you can open eVC project in VS2005. See this http://msdn2.microsoft.com/en-us/library/ms228806(VS.80).aspx I can help you diagnose your problem but won't make i ...Show All
Visual Studio Team System Does Office 2007 System compatible with TFS
Can I pull data from TFS by using office 2007 I cann't see the team menu on my microsoft excel 2007 TR version Sort of, but there are a few issues which will be addressed in SP1 of Team System. A beta of the service pack is available (see Brian Harry's post for more details, http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=785088&SiteID=1 ). On my (non-service packed version), the Team menu lives under the "Add-Ins" ribbon. Cheers, Martin. ...Show All
Visual Studio Team System Team System with other platforms like Flash or VB6
Hi, I have many projects in different languages and I would like to know if I can use VSTS as a management tool, assign tasks, follow bugs, etc if the main product is not build under Visual Studio .NET (for example VB6). Any ideas or suggestions Is it worth to use it or will be too heavy Thanks Ariel Ariel, The short answer is "Yes". You can install and use Team Explorer with or without having the VS.Net IDE installed. The functionality offered by TFS will work for you. You can also integrate the version control features of TFS into the VB6 IDE and any other IDE that supports the MSSCCI provider model. As to your question about it being "too heavy", that is dependent on ...Show All
Visual C# delete a resource
Hello, in the IDE, when for example I chooce a glyph for some button I can import a resource (picture) into the project resource file. Is there a way to delete a resource Thanks. Go to Project | Properties. Click on the "Resources" tab. Select the resource and choose "Remove Resource" located at the top of the window. HTH, Karen ...Show All
SQL Server 'Invalid Object name'
Hello Once i have created a new query and it all works fine I save the query and then I run into trouble. When I come to re use the query at a later date it dosen't work and brings up the following error. Msg 208, Level 16, State 1, Line 15 Invalid object name 'kup_regions'. which equates to this line - if ( select sitetype from kup_regions where region_code = @Location ) = 10 I am using 'sa' as my username and sql server management studio Cheers for any help hi, SimonJohns wrote: Hello Once i have created a new query and it all works fine I save the query and then I run into trouble. When I come to re use the query at a later date it dosen't work and brings up the follo ...Show All
