ron nash's Q&A profile
Visual C# shutting down remote computer using wmi
Hi, I need to be able to shutdown a remote machine using WMI. It sounds fairly starighforward, but nothing I have come across seems to work. any help out there Thanls. Hi, nimo These resources may helpful to you: http://www.csharpfriends.com/Forums/ShowPost.aspx PostID=36953 http://www.thescripts.com/forum/thread254652.html Hope you can get the answer. Thank you ...Show All
.NET Development DataTable.ImportRow question
Hi, I have a question about the .NET DataTable.ImportRow method. If I import a DataRow into an empty DataTable, will the empty DataTable pick up the schema of the DataRow I'm trying to put into it For example, I have code that looks like this: DataTable tableWithData; DataTable emptyTable = new DataTable(); emptyTable.ImportRow(tableWithData.Rows[0]); If I call tableWithData.Columns.Count, I get 5. If I call emptyTable.Columns.Count before calling ImportRow, I get 0, which is what I expect from the DataTable constructor with no arguments... But when I call emptyTable.Columns.Count after calling ImportRow, I still get 0. And just to make sure that a DataRow is being imported, calling emptyTable.Rows.Count after the ImportRow stat ...Show All
Visual Studio Express Editions RowHeader ?
I have created a datatable and I am now using a datagridview to display the data in the datatable. I would like the first column to be displayed in the row header. Does anyone know how to do this Thanks for the help Try setting the HeaderCell Value of the row, for example: For i = 0 To DataGridView1.Rows.Count - 1 DataGridView1.Rows(i).HeaderCell.Value = i.ToString Next ...Show All
Visual Studio Express Editions slideshow
how can I alter this code so it displays a different image every minute.....like slideshow thanks PictureBox1.Image = Image.FromFile _ (System.Environment.GetFolderPath _ (System.Environment.SpecialFolder.Personal) _ & "\Shell2.jpg" ) Hi renee thanks for the reply..... can you tell me why this error .......next is not a member of single thispict = rnd.Next(0, picList.Count) ...Show All
Visual Studio Team System Development Group - Please help! Cannot compare databases.
I simply cannot compare two databases in my environment without the application erroring out. I've tried it from multiple machines, freshly installed, and it keeps happening. I wonder if there's something unique about my environment, but I need help to determine that (by looking through the error logs to locate the problem...) Can someone from the development group please help !! Please direct me toward what information you need and where I can get it to help you. I'll be happy to do whatever will help you troubleshoot this. I would love to make this tool work and avoid going out and purchasing Red Gate (my trial is almost up :-) -M- -M-: Has your issue been resolved If not, have you contacted ...Show All
.NET Development .Net Remoting And ReaderWriterLock
Hi, I am working on a .Net Remoting program. In side the remoting class, I need to use a ReaderWriterLock object. But it seems that all method calls from remoting client can easily acquire the writer lock on that object regardless the lock has been acquired before. Here is the code sample public class RemotingExampleService : MarshalByRefObject { private ReaderWriterLock lockObj = new ReaderWriterLock(); public void LockObject() { Console.WriteLine(lockObj.IsWriterLockHeld); //return true except the first call lockObj.AcquireWriterLock(-1); } } I used Singleton r ...Show All
Visual Studio Express Editions What gives?
I wrote this code for my program to create a directory. It looks like this: My .Computer.FileSystem.CreateDirectory( "C:/Documents and Settings/" + Environ( "USERNAME" ) + "My Documents/" + TextBox1.Text) and it wont do it... it just gives me an error that says that the file path isn't supported. I am not sure if this matters or not, but it looks like your slashes are going the wrong direction in the original example. Glenn ...Show All
.NET Development 2005 XSLT plugin?
Is there some kind of tool or plugin for Visual Studio 2005 that will generate XSLT/HTML from XML documentation I've heard of NDoc, but it's only for 2003. see http://www.microsoft.com/downloads/details.aspx FamilyId=E82EA71D-DA89-42EE-A715-696E3A4873B2&displaylang=en ...Show All
Visual Studio Express Editions issue with dialog and msgbox
Hi, Can someone please help me with this issue; I have simplified the process somewhat I have a form with a textbox displayed within a MDI form as a dialog When the OK button is pressed the database is searched for any records matching the textbox text If one of the records fields is true I display a msgbox. The issue is that I need to close the search dialog before the msgbox displays. It seems that, due to the fact that it is a msgbox, it prevents the other dialog from closing due to it being disabled while the msgbox is in view. As soon as I close the msgbox both close. I have tested this using just dialogs, eg: myform.showdialog Thanks for the reply, I understand this, h ...Show All
Game Technologies: DirectX, XNA, XACT, etc. graphics error
not sure i know what the problem is but when i run space wars it finds a line of code that says this .GameComponents.Add( this .graphics); and says it no suitable graphics device exception was unhandled Here is a thread where people had your same issue and the fix that worked for them. http://forums.microsoft.com/msdn/showpost.aspx postid=682322&siteid=1 The way it sounds from the thread, if the fix indicated does not work, then you will most likely need to buy a new graphics card that supports shader model 2. Definitely try the fix first though. Good luck! ...Show All
Visual Studio 2008 (Pre-release) Creating a brush from the text?
WHat's the easiest way to create a Brush from some text at runtime I wish I could say "yeah! that's what I was looking for" but hey, that link doesn't have a single example and all the classes it's referring to don't have very thorough description, neither there's a single page returned by Live.com or google on GlyphRun and GlyphRunDrawing other than almost placeholder MSDN description. Not a single sample on either one in SDK too. I'm stuck. Small sample, anybody ...Show All
SQL Server Transact-sql code does not work. HELP!
Hi all, I am new to transact-sql and hoped that someone here might be able to help. I have a db with a field called "part" ... part contains text in the format: xxxxx-xx-xxxxx (the number of x's before or after each hyphen vary) such that I could have xxx-xxxxx-xxx as the part. Someone wrote this transact-sql to take my current "part" field and move it to three different part fields ... a,b,c If xxxxx-xx-xxxxx was the part in the original db, then a would contain xxxxx .. b contains xx ... c contains xxxxx Make sense Here is the code. It doesn't work and I can't seem to figure out why! It looks like it is just trying to find the hyphens and cut out the text from that... but it fails with an error that say ...Show All
Visual FoxPro install shield Express & FoxPro 9
I am having a wierd problem creating my install with install shield Express. I seem to be creating the setup file okay and it is even installing good and running the app good, with 2 exceptions. the shortcuts that are created on the desktop and the start menu are only available for the user profile of the person who installed the app. The program seems to execute only when the installing person not anyone else. Even if the other person is an administrator. Please help I am new to this Install shield, before I used VFP 6 with its own installer. Thank You in advance. Thanks for your continued help. Because of your answer I reserched the Install shield website and found the directions for ...Show All
Visual Studio Bug using <see langword="null"/> in September CTP
Apparently the tag <see langword="null"/> translates into nullnullptr when using the September CTP. It looks like the C++ nullptr-keyword is always appended to the correct keyword because if you switch to the Visual Basic view is shows as Nothingnullptr. Not sure if it's related, but there appears to be a small bug in main_sandcastle.xsl. In that file, I find: < xsl:when test = " @langword='false' or @langword='False' " > < span class = " cs " > false </ span > < span class = " vb " > False </ span > < span class = " cpp " > false </ span > </ xsl:when > < xsl:otherwise > < xsl:vale-of select = " ...Show All
Windows Forms Method in One Form is not being called from another form
Hi all, I have multiple forms as below in my project. Solution |- FormMain.cs + UserControl (Folder) | |- FormLogin.cs ( under UserControl Folder ) | |- FormDesktop.cs ( under UserControl Folder ) |- FormSplash.cs Now the FormMain has a method setStatusText( string varStatusText) When I call this method from FormLogin there is no reaction. Please tell me what is wrong with my code. MainForm: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace OnlineMIS { public partial class FormMain : Form { public void setStatusText( string ...Show All
