2007CRXI's Q&A profile
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
Visual C++ msvcrtd.dll not found
Hi!!!!I'm not sure if this is a .NET problem and I'm not even sure that this thread belongs here.But when I try to run a compiled debug config of a C++ program on VS.NET 2003, I get the message: msvcrtd.dll not found I searched the internet and found that is a common problem,but I can't find where to download the .dll file from.Do you know Or at least do you know how to overcome the problem The msvcrtd.dll belongs to a executable that is in a debug state. The msvcrtd.dll is not redistributable. So you can not find this file in any download package. When you run this program on the machine were it is developed it should run. If not your installation of VS is defect. Try to repair it. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. C# modulus operator % sucks?
So in C# when I do -1%something I get -1, which means I can't really use it as an array index without a bunch of stupid error checking. Is there some way to force the modulo operator to actually give me numbers from my field (e.g 0-5 for modulo 6) Edit: Well, I made this post at 2:00 am and it shows, here is what I have issue with: i = (i+1) % 6 will result in numbers from 0 to 5, which I could use for an array index i = (i-1) % 6 will result in numbers from 0 to -5, which can't be used in an array index Obviously, the absolute value of those results would not conform to any logical value, either (for instance, array[-1] and array[1] would be the same value, even though they should be 2 values apart if I decremented twice ...Show All
Visual C# "error CS2011 : Error openin response file..." ??
Why do i always get this error message whenever i try to debug or compile something : "error CS2011 : Error openin response file 'c:\Documents ' -- ' the system cannot find the file specified " this is after i uninstalled and reinstalled the compiler. Is there a way to remedy it but i've tried saving else where and the same error keep surfacing anyway so where do i put the double-quotes I'm kinda new to all this. ...Show All
Visual Studio Tools for Office Book suggestion plz on VSTO
I know the books list in the sticky thread, but they don't have very good ratings on Amazon. Please tell me your favorite books on VSTO. A little bit about me. I am pretty good with C# and VB .Net, but don't know much about Office programming (not even VBA for office :) Thanks a lot. Thanks a lot, Cindy and Dennis. Guess I have to hang around this forum a lot ...Show All
Windows Forms request password before installatio process
Hello, I wrote some windows forms applications. I would like to include a password or key request before the application got installed onto the user's computer. any suggestion Well there is a Customer Information dialog you cvan add to the UI sequence, a canned dialog that lets the user put in a serial number. Unfortuanately there's no way to verify it in the UI sequence with code - you'd verify it with a custom action, but these run when the installation is just about finished. The PIDKEY property is where it's stored. ...Show All
Visual C# HOW TO Convert DataReader To DataSet
in my table have 2 column (table_ID, table_Status) i use sqlDataReader to read all data in this table but i don't know how to convert it into dataset can anyone help me thank you! this is how you would do so: if you have a dataset: Me.cboTable_ID.DataSource = theDataSet.Tables[0].DefaultView; if you have a DataTable: Me.cboTable_ID.DataSource = theDataTable.DefaultView; finally setting the displaymember: Me.cboTable_ID.DisplayMember = "fieldName"; ...Show All
Visual C# multithreading
I need to do multithreading. It is my fist attempt. It failed. This is the setup: There is a form with tabControl and a few pages. There is a progress bar on one of them. It is supposed to measure progress of file downloading. WIthout multhithreading it is dead while the files are downloaded and then in the end it jumps to 100%. This is what I did. Everything compiled but the progress never was activated even after the downloading was over. In other words my code actually made the things worse. In the main form I put in this code at the start of procedure that is handling the download: ThreadStart threadDelegate = new ThreadStart ( Work.DoWork ); Thread newThread = new Thread ( threadDelegate ); newThread.Start ( ); T ...Show All
Visual C++ Rand Num Gen Accuracy
So I have this random number generator I found searching through the net. I wanted an actual random number as opposed to just using rand(). Anyway I just want to know how good everyone thinks this is and how you could make one that's better. I understand the basic idea of a random number generator is to use the system clock (reason being - no two values are ever the same) and I have looked through the code but I haven't quite figured how to make a random number generator myself. This generator uses seconds and I've questioned that. Should more of the clock be used When my code executes and it takes less than a second, won't every call to the random number generator be the exact same I tried to make a card generator and when I put anothe ...Show All
Smart Device Development Breakpoints do not get hit...
Hello, a colleague has big troubles debugging compact framework 2.0 applications from his VS2005 environment (to be more specific: he has hijacked my PC because the troubles do not occur there ). The problem is that every CF2.0 application he runs will not break when run on a device, but the same application runs and hits the breakpoints on the device emulator. It doesn't matter if it is a big multi-project solution or just a simple little HelloWorld project, the debugger just isn't interested in breakpoints anymore. We searched over this forum, but none of the solutions work for him. Some of the things we found and tried are: Deleting de bin/obj folders. Showing the Debug toolbar. ...Show All
Software Development for Windows Vista Composit Activity Problem
Hiya I have a couple of composite activities with several child activities that build fine with no errors or warnings that won't appear in the toolbox. One of them I have actually used in a workflow (because it used to appear) and the code hasn't been changed. I'm wondering if any automatic updates could be effecting them as they stopped appearing about the time we installed updates. I can get the activities to appear in my own toolbox in the rehosted designer but it wont let me use it. Does anyone have any ideas After some testing this is a problem with the toolbox item . If I remove the toolbox item attribute for the composite activity, it works again. Unfortunately without the toolbox item it's useless in a workflow! My ...Show All
Smart Device Development Problem related to security using MD5 algorithm
hi all, I want to use System.Security.Cryptography.MD5 to encode the file name that i provide and assign a unique key to that ant store it in the database.But i dnt knw how to do that. please provide me with some sample. Thanx in advance. No. The MD5 hash is not reversible. The idea is that if you have a hash of the byte array (e.g. string A) and someone else supplies a string B and it's hash computes to the same value, then you can assume that the string A = string B. This allows you to store information that will let you decide if someone provides you with a correct string, but avoid storing the string itself, so it cannot be stolen from you. Wikipedia provides a good article on cryptographic has ...Show All
Visual Studio Team System Field won't copy from another field on New Work Item Activation
I'm trying to create a new work item type for my company. One of the fields they want to track easily is the alarm's initial priority when it was first opened. I figured this would be easy by adding a new field called "Initial Priority" and copying in the value from the Priority field when the work item was created. However it does not seem to be working for me. In the Transitions section under the Transition from "" to Active, I have the following, but it doesn't seem to work. < FIELD refname = " AuthNet.Fields.InitialPriority " > < COPY from = " field " field = " Microsoft.VSTS.Common.Priority " /> </ FIELD > When the new work item is saved, ...Show All
.NET Development scrollbars in windows.form
I have an application that displays a TableLayoutPanel containing a number of pictureboxes containing thumbnails. I am wondering; When i load this table with, say 100 thumbnails, how do i produce scrollbars so that all of the table can be viewed Another question: I would like to be able to "select" a thumbnail by clicking on its image (perhaps putting a border on the picturebox). Is there a way of handling this (would be a little bit hard to keep track of Click events). Or should i use something else than pictureboxes in a table regards, Kristian for your first question, I have not used the Control before so I'm just going by what I can see in the properties/code. have you tried: the ...Show All
Internet Explorer Development R
Hi I have found some behaviour in IE7 that is inconsistent with IE6 and even Firefox. I am struggling to find a way to set the height of the first ROW of a table with a height of 100%. Here is a simple code snippet used to illustrate: <body style="height:100%; padding: 0px; margin: 0px"> <table cellpadding="0" cellspacing="0" style="height:100%; width:100%"> <tr> <td style="border: 3px solid red; height: 25px"> <table><tr><td>This is the top row</td></tr></table> </td> </tr> <tr> <td style="border: 3px solid blue;">This is the bottom row</td> </tr> </table> ...Show All
