Answer Questions
Brian C. Barnes Problem with WindowHandle
Hello, I found the below code on the internet, I want to use this to hide my notepad, Well, the hide part works very well, but to restore it doesnt work.. Now i tried separate numbers but none of them worked. So i would like to ask, does somebody know a way to fix this Or do this otherwise using System.Runtime.InteropServices; using System.Diagnostics; namespace WindowsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private const int SW_HIDE = 0; private const int SW_RESTORE = 9; private int hWnd; [ DllImport ( "User32" )] private static extern int ShowWindow( int hwnd, int nCmdShow); ...Show All
Jerry Vonk Designer Fails to Show From after VS 2003 Port - Problem Fixed!!!!!
Original Problem: After porting a project to VS 2005, the designer fails to show the forms in my project. When I try to view the designer, I get Object reference not set to an instance of an object How do I fix this Is it possible that the resx files are corrupt Can I regenerate them ------------------------------------------------------------ Solution The problem was solved. It turns out that one of the project wide language resx files (we have four) had a slightly different format than the other project wide language resx files. When we made the resx files consistent, the designer worked. The individual form resx files were ok as is. I gue ...Show All
Alan Z detecting mouse clicks
I am trying to create a program that records your mouse movement and where you click (including the type of click - left or right button), I have managed to record and successfully playback the mouse movement and create virtual clicks, but how would I detect the mouse clicks Please could somebody post the code needed to detect a left mouse button click. Also the mouse clicks will not be occuring inside the form itself, I will be running another program. Thanks You cannot detect mouse clicks outside of your own application without using Win32 APIs. Here is an example: http://www.codeguru.com/vb/gen/vb_misc/article.php/c2757/ You can try MouseLeave event when leave the form, in the form use M ...Show All
Rasnarok Speeding up background image
I am using c# & .NET to try to make my version of the classic snake game, where the snake eats things and gets longer. I am using the GDI to do everything. My problem is that when I added a background image for a textured background instead of just using a solid background color, it slowed everything down a lot. I have tried putting the image in this.BackgroundImage, I have tried embedding the image instead of loading the file (which didn't help), and I have tried drawing the image from the OnPaint handler (which sped it up a little, but not nearly enough). I have also tried using bmp files instead of compressed jpg's and that didn't make any difference. Is there any way to have a background image without slowing things down this much, ...Show All
R.S.N How to call a web page as Post method from Windows Form Application?
I have a form application with some TextBox controls in it.I want to send the values of these controls as Post variables to the web page. I can call a web page using System.Diagnostics.Process.Start("Http://...") but how to make a call like it was called from form element with method post Is there a way to do this if I use WebBrowser class Like create a form/submit page with hidden varibles in it So only submit button should be visible and somehow make it to open new window not in WebBrowser control but in default browser could be possible - in the webbrowser class/control take a look at the document property and its property (body, outer/inner html ...Show All
JFoushee Failed to load toolbox item "TextControl".It will be removed from the toolbox.
This is the answer from VS 2005 whenever i want to drag and drop a VC++.NET user control from the component panel to a form. Exakt the same control written in C# does not show this behavior and shows up on my form. The control is just a autogenerated template from VS with a overridden OnPaint handler. It seems to be a bug or not Regards Martin Same problem here... when i try to drag & drop a (home made) activity to the workflow. If i use other control, and replace it with my activity it compiles, but i lose the design view of the workflow. ...Show All
Ademaure beep generates no sound
the Beep method generates no sound, the volume is on i checked Remco Is there a sound attached to (im unsure but maybe) the notify sound event in Windows ahmedilyas wrote: secondly, some code would be nice for us. I'm not sure what you mean here but it's just the method beep() in for example in a clickhandler of a button like so Private Sub Button1_Click ( _ ByVal sender As System.Object, _ ByVal e As System.EventArgs _ ) _ Handles Button1.Click Beep() End Sub not as far as I k ...Show All
nictan OnPaint Overflow Exception
Hi I have a form with some controls, in it, most of them are labels, and a panel for displaying video and one of label is blinking using timer. sometimes i got an Overflow exception when a program is started and sometimes when label is blinking. this exception is random and not always thrown. when exception comes, it comes with quit and continue, and have detials of the stack trace, when continued, the one control which is mentioned in the stack trace are turned to red cross. this is happening with two three controls. i know when this exception is thrown, the problem is that it is being thrown in different context here by some painting funcion of windows form. Hmm. I created a simple blinking label and it works. When do you ...Show All
sic0198 Setting position of text cursor in AxSHDocVw.AxWebBrowser Control
I am adding text into my WebBrowser control, but then I wish to set the position of the text cursor back to the top of the editing window. Does anybody know how to set the cursor position Thanks ...Show All
Nick...A Publish ClickOnce project with Team Build?
Does anyone have any examples of how to create a Team Build BuildType that publishes the project similiar to the way you manually do it in visual studio I already have the BuildType created and working (it gets kicked off on a schedule). I've also created a BeforeDropBuild task that does GenerateApplicationManifest and GenerateDeploymentManifest that also works. This was a bit confusing -- when the BuildType is run not through the GUI many of the properties don't exist and most of the examples appear to assume they would. Anyway, these steps work in that the build does not fail. Somehow I need to publish the manifest I suppose, but I can't find any examples of how to do it. I'm not even sure I know the right questions to ask. Any help w ...Show All
QWERTYtech Label with invisible background.
I have a form with a label in it. I want to show the label, covering the whole form, with a number in it. The app is a multii screen image viewer, I'm trying to show which monitor is which. I've set the style to allow transparent background ( I'm interested to know what genius came up with that idea ), I've set the deprecated 'DrawTransparent' property, I've set the background color to Color.Transparent, but no matter what I do, including downloading several controls on the web for transparent labels, I cannot get a label that doesn't erase it's own background to the color of a general dialog box. Does anyone have any suggestions Thanks This works I had pretty much this exact code ( except not the double buffer stuff ) and it d ...Show All
Philipp Lamp Calculating Total
hi everybody, i have a datagrid and it has many columns out of which amount is one column, and i have a textbox outside the grid, if i fill the amount column automatically textbox should be filled with the total amount, i did the coding part for calculating total, but the issue is i want the textbox to be filled after i leave the amount column in the datagrid, i have tried currentcell changed event, navigate event, tab index changed event, leave event, tab stop changed event, almost the events i tried out, but the value is not catching on the textbox, but the value catches in the textbox after i leave the whole row and then come to next row, i want the value to be catched after i leave the amount column ....... ...Show All
Simon Dahlbacka Which windows product?
Which windows product has a silver toolbar and a popping up green start-up button Is it windows XP Home or some other windows product Plz tell me which one. im afraid this is the wrong place to post the question, the best place would be over at: www.microsoft.com/communities in the Windows XP newsgroups to answer your question, its an actual theme used in Windows XP (home and pro) to display the silver stuff you are asking about. Thanks! ...Show All
0xDEADBEEF DesignMode disable selecting control
Hi together, I have an application which can be set in design mode while running. Now I have the problem that I don't want the user to select several control in design mode. Regarding I have two button on the design surface ("A" and "B") I don't want the user to be able to select button "A". How can this be done Do I need to get a special service from the DesignSurface class, or has this to be done in the control (in my case button "A") itself. I have seen there is a ISelectionService, but as it seems there is no way to disable a selection of a specific user control. Any help would be great, Cheers, Franz i think you can give different user with different purview, ...Show All
Martin Knotek Combo box resizing
Just want to make sure that I have this straight and am not missing something. Unless one wants to draw their own control, the height of a combo box cannot be changed except by changing the font If that is indeed the case, then why does a combo box with a selected font (say Arial 8.25) render as different height than a text box with the same font selected That makes for one ugly form; either the text box and combo box can't be side-by-side without looking akward, or the text box and combo box can be the same size, but the fonts are significantly different. Someone, please tell me I'm missing something obvious. Thanks! Unfortunately, the standard Combobox control that comes with Net 2.0 does not allow changing its height. Setting ...Show All
