Chris Honcoop's Q&A profile
.NET Development Invoke Events with the webbrowser Control
Not sure if this is the proper forum, but it looked like the closest. I want to automate filling out a form on a web site (which I can do with the webbrowser control), what I cannot figure out is a way to submit the form (either by form.submit or the click event of the submit button). Am I missing something really obvious here, or does someone have a workable solution for this w/o using the webbrowser control Thanks Jeff I know I can't possibly be the only person to ever to do this... I've answered my own question not more than an hour after posting it. You simply get the form as an HTMLElement and call InvokeMember - sorta like this: // get the form HtmlElement myForm = w ...Show All
Visual C++ recv won't return on socket close
Sorry to make my first post a cry for help but I'm running out of places to look. I have a TCP server that accepts connections and than handles the new client sock in a new thread. Everything is working fine except when the client closes ungracefully the socket stays open and my recv is still blocking instead of returning SOCKET_ERROR. I've shutdown the remote client box but my recv won't return and netstat still shows the TCP socket to be ESTABLISHED. It's not a huge deal but I'm leaving threads laying around and not realeasing my socket handles. Any ideas Thanks. Hi, my understanding of TCP is, that it tries to handle network problems gracefully. E.g. if you have a telnet connection to some o ...Show All
SQL Server Calling debugger from SSMS
I realize that the DEBUG capability has been removed from SSMS and moved to the IDe for Visual Studio. As much as that annoys me , I am dealing with it. Is there a way I can open a SP into the debugger from SSMS I very much miss the ability to right click a SP in my list of 300 and choose form edit, run or debug. I dont care if hte debugger is a separate app, can't I have SSMS send my proc to the visual studio debugger Currently I have to open the VS app separately, and then establish connection, and the re-fnd my proc in that very long list of 300 that is in there. I know that. The question more specifically is: Is there a way to link the SSMS annd hte visual studio together such that I ...Show All
Visual Studio Express Editions Convert decimal to fraction
Does VB have any built-in function to convert a decimal number to a fraction What I need is a way to convert a decimal number into a fraction string rounded to the nearest 32nd. So for example, .375 would be converted to "3/8" or .428 would be converted to "7/16" after rounding. If VB doesn't have this built-in, does anyone have code for a function to do this Thanks... Public Function GetNumerator ( ByVal x As Decimal , ByVal denominator As Integer ) As Decimal 'discard whole number x = x Mod 1 'get numerator x = x * denominator 'round to whole number Return Decimal . Round ( x , 0) End Function Public Functi ...Show All
Visual Studio Express Editions music
Hi, I'm creating a program and i would like to know if it's possible to play 2 sounds at the same time.If it is,how (doesn't metter the format) Thanks it is possible, you could use the ManagedDirectX for example to do this and use the AudioVideoPlayback class to play the media files you like, by playing one then the next one which will sound as if its playing together, which it will :-) ...Show All
.NET Development I don't know JavaScript
I have recently trained as an MCAD in .NET and have been working commercially for just over a year and been involved in the development of 2 websites and am shocked to learn I used Javascript as much as I did C# and HTML. All the 'cool' stuff is done in javascript('thats not quite true but it feels like it') Is this likely to be the case my whole .NET career Also is there a way to call c# procedures from Javascript and use Javascript in my code behind. I have used DataBinder.Eval in the HTML to access c# properties for instance and found this invaluable. I would like some more of these little gems of knowledge or a good book to get them from. Cheers You should be able to run Javascript ...Show All
Visual C++ Microsoft Symbol Server License Agreement
Hello there. I am an avid user of the symbol server at http://msdl.microsoft.com/download/symbols . Using it has become much easier with Visual Studio 2005. As you know, when it is first invoked, a license agreement pops up asking one to accept or cancel. On a fresh machine the other day, I accidentally pressed Cancel. Now I cannot get it to work and it seems like this was a once in a lifetime choice! How do I reset this selection or get it to display this dialogue box again Cheers, Kristjan I don't know for sure. But, some things to try: Make sure the following registry entry is set to 1: HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\8.0\Debugger\UseSourceServer. Browse HKEY_CURRENT ...Show All
Visual Studio Team System CTP6 Build/Deploy with TeamBuild - Help needed
I am new to the CTP6 and I have been tasked with showing how to use Team Build to build/deploy the database changes back to a Staging environment from the Isolated environment. I have read about a SqlDeployTask that I may need to use, but I am unsure on that. Can anyone give me details on how to accomplish this feat Do I need the SqlDeployTask If so where do I get that from How do I set it up Does anyone have an example I can look at Thanks in advance -paul so in TeamBuild what target do i override to run the deploy task. I looked through the Data.targets file and i see that there is a target "SqlBuildscriptName". I created a build and I get the following error. The "SqlBuildScriptNameTask" task was not ...Show All
Windows Forms launch condition to check for available disk space
I am trying to add a launch condition to check for available disk space before uses can install my application. I tried to use the PrimaryVolumeSpaceAvailable Property but it looks like it has no value at launch. I also wanted to check the processor speen so I used a registry search to HARDWARE\DESCRIPTION\SYSTEM\CentralProcessor\0 to get key '~Mhz' , its returning the correct value but with a #, I wanted it to return an integer so I can use it to set my cpu speed launch condition. Please help The reason I need to check for disk space is sometimes the application ships with a sql databse which will need to be restored , so I want to make sure that the space for the database is catered for before ...Show All
Visual Studio Tools for Office unsubscribe or change handler for commandbarbutton click event
During startup, i create a custom toolbar with a button (say Button1) in it and subscribe (register/hook.. not sure about the right term) to the button's click event. Then i open another instance of the template, and check if the custom toolbar already exists and wanted to change the handler for Button1's click event. Assuming i already got to Button1 using FindControl: I can to unhook the handler for the current instance, but I really wanted to unhook the handlers registered by other instances (if this is possible). Button1.Click -= new Microsoft.Office.Core._CommandBarButtonEvents_ClickEventHandler(myHandler) throws an null reference exception. I'm guessing its because my code is trying to unhook "myHandle" (same na ...Show All
Windows Forms disabled text color
I have a Panel that contains Labels, TextBoxes, and DateTimePickers. I would like to "Enabled = false" this Panel without changing the text color of its components to a lighter color. What is the best way to do this Thanks. Forgot a line of code, this is used to Grey background when disabled. protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); SolidBrush drawBrush = new SolidBrush( ForeColor ); //Use the ForeColor property // Draw string to screen. e.Graphics.DrawString( Text, Font, drawBrush, 0f, 0f ); //Use the Font property BackColor = Enabled Color .FromKnownColor( KnownColor .Window): Color .FromKnownColor( KnownColor .Control); } ...Show All
Visual Basic How can I capture mouse gestures?
I have a 'widgets' program that just sits in the system tray until the user presses Ctrl+F8 or clicks on the icon. What would be completely awesome is if the user could activate the program by doing some kind of mouse gesture (moving it in a spiral, or somthing like that). Would it be possible to implement this in VB.Net or should I not even bother trying hehe thats pretty cool. I would already find issues with this, what happens if the user did the sequence you were after but did not intend to launch your application back up What happens if they did it accidently or playing a game or something Would be bad therefore its better doing it via the keyboard shortcut instead. I think you would have to have some mouse hook or something. ...Show All
Visual Basic Cancelling PrintPreview
Hi all! When using the PrintPreview with VB .net 2003, it starts with a small window displaying: Generating Previews Page 1 of document With a Cancel button at the bottom. Clicking the Cancel button now will stop the application from responding. What event is triggered for me to stop processing On a side note - can I change the text "Page 1 of document" to "Page 1 of ReportName" Thanks. Check out the PrintPreviewDialog Click events: Private Sub PrintPreviewDialog1_Click( ByVal sender As Object , ByVal e As System.EventArgs) Handles PrintPreviewDialog1.Click If Me .PrintPreviewDialog1.DialogResult = Windows.Forms.Dial ...Show All
SQL Server Maintain datatype for reporting services from OLAP
I'm trying to extract data from my OLAP and present it using reporting services. The problem is that all the values extracted from the OLAP seems converted into string instead of keeping their original type. Am I doing something wrong in the setting Please let me know how can I check the data type in reporting services. Thanks! Hi David, I've just done a few more tests. I found that the datatype are maintained when it comes to the reporting services. I use the IsNumeric and IsDate functions to check for this. However, the problem is even they're in the correct type. It seems that the sorting and formating function are not handling them well. First, I would like to order by an integer value field and I got the list like this. 1, 10, 2 ...Show All
Windows Forms Non-transparent controls on transparent form
Hello! I have a problem that drives me crazy. I googled for hours now. I have a custom shaped form, e.g. the transparency key of the form is set to, lets say red. On this form I have a user control that implements an image slideshow. Every red pixel in an image appears transparent. How can I tell windows that the transparency key should only be applied to the form, but not to the controls on it The same problem appears when playing video on a custom shaped form. How does the mediaplayer do Thanks in advance! Yes, that works :) Great! I’m lucky that my custom shape is just a rounded rectangle, otherwise defining the region would probably be a big problem !!! ...Show All
