Sudhakar.hcitek's Q&A profile
Visual Studio Express Editions msgbox
how do i use the if then to act on whichever button was pressed, like the yes no for example you would be looking at the dialog result of the MessageBox. This is the way of doing so: if MessageBox.Show("Message", "Caption", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = System.Windows.Forms.DialogResult.Yes then 'the user pressed the yes button else 'the user pressed the no button end if to give the MessageBox the buttons, you need to look at the MessageBoxButtons enumerator, it supplies you the buttons that you can show to the user. The MessageBox also returns a DialogResult, the value returned based on the user's choice and you look at the DialogResult ...Show All
Windows Forms Can't disable a button
I am programming in c#. I have a button on my form that when clicked, it plays a wav file using the PlaySound method from winmm.dll. The wav is about 3 seconds long. The problem is that if I keep clicking the button during the 3 seconds the sound is playing, it queues all of the clicks, and plays the wav over and over. My Button is named btn. So I tried: this.btn.Enabled = false; PlaySound(...); this.btn.Enabled = true; Doing this successfully greyed out the button while the sound is playing, but it still accepts clicks, so it didn't fix my original problem. Is there some way to clear the event queue Or is there something else I'm doing wrong. I just want the button to not work while the sound is playing. I have also tried ...Show All
Visual C# Little Help
I have figured out how to open webpages, but, if on the button click you open a webpage, say www.google.com. But, if you have a textbot on the program, and on the button click you want www.google.com/i-typed-this-in-the-textbot, how would you go about coding that Thanks Yes that works, one more thing, just wondering how I can allow the button to be pressed with the enter key as well as the mouse Right now, hitting enter just clears the box ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How do I load a 3d mesh (.x file)?
How do I load a .x mesh into my scene The space game seems to use its own format (which it names .swm), and there's nothing in the help. I've been scanning through through the classes in the Framework namespace, but I can't see anything obvious! Is .x the recommended format for objects like this (If not, I change my question to be about the recommended format :D) If anyone knows anywhere that has some nice .x meshes I can play with, that'd be cool too. The only one I have lying around is a chair, and that's going to look a bit funny running around my game :D The Content Manager is part of the framework so it exsists in the Beta. However all the stuff you need to get you data in the Model format is n ...Show All
Software Development for Windows Vista Missing include file stgprop.h
Ntquery.h try to include missing file stgprop.h in the June 2006 CTP. As a workaround i've added storage property set definitions in it manually from the previous version of ntquery.h. HTH, Sergey. Hi, I also get this message when I want to compile the WTLExplorer-Sample from WTL 7.5 by using the Final of the WindowsSDK. How can I fix this I set the directories that the WinSDK is at first place. ...Show All
SQL Server Service Listing Manager Question for Remus
Hi Remus - Thank you for your Service Listing utility. I am very new to S.B. I had an intern working for us do some research work into S.B. and I gave him your utility to use for the work I gave him to do. Here is what I am trying to do. Very simply, I want to setup a remote (target) server that many other source (initiator) servers will send messages to via S.B. I had the intern learn how to have a single initiator server send messages to the remote server. He used your utility to create the SQL script that needs to be run on both servers to get things set up, and it works correctly. The script below is what your utility created to be run on the remote server. The reference to 'SDDev2' below is a reference to the initiator (source) ser ...Show All
Visual Studio Express Editions Development using IDE and custom code
Hey All, This is a very simple question and i was hoping with someone with a bit more development experience via an IDE might be able to help. I'm using Visual C# Express to develop an app and am loving it, i'm confused though as to how I can use both the IDE and write snippets of my own code. Take a very simple example. I have just embedded a TreeView component in my app and want all the nodes to be expanded by default. I can't seem to find the property in the Properties toolbox so i've gone in and written the line of code myself to expand all the nodes. Whenever I click back on the design view however, it kindly removes my code for me. Am I to expect that it's a case of using either the visual development tools or developing the code al ...Show All
Windows Forms Change editable area of datagridview
How, when user click on a text cell of a datagridview, the editable area of the cell became bigger than the cell(span 3 rows and 2 columns), which make it easier for the user to edit Thanks Hi, How about doing in the following way Hope it helps. private void dataGridView1_EditingControlShowing( object sender, DataGridViewEditingControlShowingEventArgs e) { if (e.Control is TextBox ) { Rectangle rect = this .dataGridView1.GetCellDisplayRectangle( this .dataGridView1.CurrentCell.ColumnIndex, this .dataGridView1.CurrentCell.RowIndex, false ); int curHeight = rect.Height; this .dataGridView1.CurrentRow.Height = curHeight * 2; ...Show All
Visual C++ _resetstkoflw()
could not find entry point __resetstkoflw(). Why this error occurs And what is the solution for that If you are using VC6.0 then please use the newsgroups at http://msdn.microsoft.com/newsgroups for such issues. Thanks, Ayman Shoukry VC++ Team ...Show All
Visual Studio Express Editions Find who's logged on?
Is there a way to find all the users who are currently logged on to our Windows network Is that info stored in Active Directory Thanks... nbrege, Here is a code sample on checking user logon: Public Function IsAuthenticated( ByVal domain As String , ByVal username As String , ByVal pwd As String ) As Boolean Dim _path As String Dim _filterAttribute As String Dim servername As String = ConfigurationSettings.AppSettings( "serverpath" ).ToString 'Whether Authenticated User or Not Dim domainAndUsername As String = domain + "\" + username Dim entry As New DirectoryEntry( "LDAP://" + servername, do ...Show All
Windows Forms Retrieve Data From DataGridViewComboBoxColumn And Display In TextBox
May i know how to retrieve a particular row of DataGridViewComboBoxColumn selected value and display it in textbox Thank you. Maybe this will help. ...Show All
Visual Basic Generate a compiler error?
Hi all, I've created a custom component which can be dropped from the toolbox to any form. It interacts with any form that has a treelist on it. After you drop it on to the form, you must set a property of the component which is treelist it applies to. At the moment if you forget to set the property, the app builds, but as soon as you attempt to use the component, you get a nullreferenceexception. What I'd like to know is whether it's possible to force a compiler/build error if that property has not been set at compile time i.e., if one of our other developers uses the component on his form but forgets to set the property in design mode, then I'd like it to not build and show an error message in the error list. This ...Show All
SQL Server sp_MScheck_uid_owns_anything equalent in SQL Server 2005
Hi Is there any undocumented Sp's in 2005 which we can use. Hello, This information can be easily found in the sys.all_objects view (principal_id column), and the sys.schemas view. Cheers, Rob ...Show All
.NET Development upgrade project from vs2003 to vs2005 issue
Hello, We upgraded a vs2003 project to vs2005. The project upgraded with out and major issues, however the performance of the application seems to have serverly been hampered. Each time we select an event that fires off a msgbox it takes a couple of seconds to display and then respond to the yes/no prompt. Has anyone else had this issue Any thoughts on why the upgrading of a project from vs2003 to vs2005 would hamper performance Thanks in advance. John No nothing would have changed that would impact that. Have you tried timing the code to see where the delay is For example if it takes 2 seconds to invoke the event then the problem is in the event invocation. If it takes 2 seconds to bring up t ...Show All
Visual Studio Express Editions Overlaying two Panels, using button to select which to view
Hi there, I have two panels which I want to place one on top of the other using a button to select which panel should be viewed, ie using the "visible property set to true/false etc. But I am finding that when I run my program the second panel wont appear, I have double checked that my click events on my buttons is set up correctly. Can this not be done with panels and if now can somebody suggest an alternative, would a control box have been better. My panels hold a selection of buttons and textboxes. I havent come across these before - bringtofront, sendtoback. Can you be a tad more specific Reneec please, how/where do I use/code them. ...Show All
