Neal Hudson's Q&A profile
Windows Forms Pass Path to OpenFileDialog
Is there a way to pass a path to the OpenFileDialog everytime the dialog is shown I tried the InitialDirectory but that works the first time (obviously) but if I change the path, the open dialog goes back to the last opened directory. Thanks, Greg I tried that and I don't see any difference since it just still opens the dialog back to the last opened position. I have a tree node with a list of vendors. Each vendor has a specific source path for their files. So when I go to the first vendor and open the dialog, it goes to the initialdirectory folder which is fine. However, if I go to another vendor who has a different path for the source, then when I open the dialog, it opens the dialog to the la ...Show All
Visual C# Property Storage
Is there a component or method to store for position and the size of a Windows Form and other controls Developer Express had a nice component that would allow you to store and retrieve this kind of info for any component, any property. Hi, yes, you can use property - Application Settings binding functionality. To make Visual Studio 2005 create the necessary binding code to load (and store) the form's position in user's configuration files, follow these steps: 1. Open Form's properties 2. Find (ApplicationSettings) and open it 3. Open Location item combo and select New 4. Enter the name of the setting (e.g. MyFormLocation) and click OK 5. On FormClosing event, save settings ( Properties. S ...Show All
.NET Development Want to use transaction in normal process
Hi All, I am not using any database things. But I want to use transaction for my process (two process should be done simultaneously or not). I want to know is there any facility in .net for this I want to use transaction facility. just like there in database. in my project I have to do two operations let's say op1 and op2. now either op1 and op2 both done or not at all. e.g. I have to debit some amount from one account(op1) and credit that amount to my account(op2). now if op1 is done and some problem comes then it will create a problem. so if op1 done and some problem comes in op2 then op1 should be undone. means both operation should be done or none of the operation. Now my question is &quo ...Show All
Visual Studio Tools for Office Adding a macro to excel using C# in asp.net
I am creating a customized excel report for my company using a webpage. Part of the excel file is a macro to handle printing though, and I can't seem to get it to work correctly. The code works... The page building the report impersonates a user that has access to Excel. Excel files can be created but, when I attempt to add the print macro I recieve this error: Programmatic access to Visual Basic Project is not trusted The user being impersonated has the security setting in excel set to: Trust access to Visual Basic Project I discovered on accident that if the impersonated user is actually logged in on the server that the code executes as expected, every time. If you have any idea how to correct this problem please let me ...Show All
Software Development for Windows Vista Communication with external applications
Hello, I've been trying the hands-on labs and now I'm developing a simple workflow myself, but I don't really know how to communicate between an external application and the local workflow. I know that lab05 deals with a similar topic but I've found that the communication was only between a LOCAL application and the workflow but not with an external application. Now I'm trying to follow the expense reporting application in lab01 (resources folder) and I try to see how it communicates with the workflow. I've seen it uses .NET Remoting to create an instance of the remote class, but I don't get to understand well what it does because the same project has together the remoteservices class and the localservices class. Please can someon ...Show All
Visual Basic Combobox question
hello. A question please. If I add elements to a combobox manually, I mean for example combobox.Items.Add( "Monday" ) Can I associate a key to each element of my combox Something like this: ComboBox1.DataSource = datatable ComboBox1.DisplayMember = "long_name" ComboBox1.ValueMember = "id" Thanks in advance... Thanks. I'd want to insert elements in a combox. For example "Monday", "tuesday".... the depending on the choosen day, I want to save a value in my table. For example for "monday" I'd want to save "2" in my table. That is only an example generic. ...Show All
Visual Studio Express Editions re date difference
Hello i am writing to a database, it worked fine with no error until i added the time /date difference. Can you tell me why the datediff is not working please Many Thanks here is the code from the button Private Sub Shift_logBindingNavigatorSaveItem_Click_1( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Shift_logBindingNavigatorSaveItem.Click Dim jOB_TIME As Integer = 0 Try Me .Validate() Me .Shift_logBindingSource.EndEdit() Me .Shift_logTableAdapter.Update( Me .Glat_shift_logDataSet.Shift_log) jOB_TIME = DateDiff(DateInterval.Minute, Time_startedTextBox, Time_finishedTextBox, FirstDayOfWeek.Monday, FirstWeekOfYear.Jan1) MsgBox( "job took " & jOB_ ...Show All
SQL Server Can't find PInvoke sqlceme30.dll
I am using an O2 XDA II mini running Windows Mobile 2003 SE. Tried creating a Windows Mobile 5.0 Pocket PC project but during deployment, I get this error. Can't find PInvoke sqlceme30.dll I have searched thru the forums and found something similar. I tried all their recommendations but no luck. Is there anything I am doing wrong I copied the DLL files in the device's \Windows directory (sqlceme30.dll, sql*.dll...around 5 DLLs) I would appreciate any assistance 1. Copy CAB file to the device. 2. Click on a CAB from device file explorer. ...Show All
.NET Development ?? in regex
Hi, while looking for a pattern to find repetitive patterns, e.g.: string = " 999 888 777 " should match "999 888 777" (note should not match the spaces following the last pattern) I tried the following ((\d)\2\2 * )+ expecting the * to minimize the match at the end but it does not work. Instead, I get 3 individual matches. Can anyone explain it Thanks Thanks for the reply. My question is more general, I should have made that clearer I guess. The pattern I showed was only an example. I am trying to understand why the \s* is not what I expect when used within a ()+ construct. The general pattern is this: ( ppp * )+ where ppp is ANY pattern (above it was (\d)\2\2 but it could b ...Show All
SQL Server Login failed for user 'TEST\administrator'. [CLIENT: <local machine>]
Hi Friends, I am getting the below error while installing CSF DevLite edition on Following is the breif Info Server Is : Win2003 SQL SERVER 2005 Installed on Same PC Domain Name is : Test User : Administrator he is a build in Admin, PLEASE HELP ME!!!! Thanking in advance. EVENT LOG 1: Login failed for user 'TEST\administrator'. [CLIENT: <local machine>] EVENT LOG 2: The description for Event ID ( 11609 ) in Source ( MsiInstaller ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following info ...Show All
Visual Studio Team System Does VSTS support Dynamic data binding ?
I am facing the problem: How can I bind dynamically generated Product ID to form post parameter from db with condition that this productID was previuoslly generated by company XX Thanks Casik What you'd want to do is create a view in the database that puts all the data for a virtual user on a single row. Each row in the view would then represent a virtual user. Our databinding will pick a different row automatically for each virtual user. Alternatively, you could use standard ADO.NET to read directly from your database and grab the info you need right at the start of your tests. You could do this in a coded web test or by creating a WebTestPlugin. You could add all the data you need to th ...Show All
.NET Development C# , Sending email through exchange server?
I've searched on this and tried several methods using System.Net.Mail but I can't get it to work. I want to send email using the Exchange server they have at work. Anyone could show me how to do this (server requires authentication) Thanks in advance what doesnt work when doing it via the System.Net.Mail classes/namespace Having no experience in using Exchange, I would have thought that the same rules apply in terms of SMTP server/port and user credentials ...Show All
.NET Development Advice needed - persist data during a session without a database?
If I have a list of things I want to have a user manipulate (add, re-order), but doesn't need to keep between sessions (no db storage needed), what would be the best way to go about that I'm quite new at .NET. Thanks. This question is off-topic for this forum (ADO.Net questions only please :-). http://forums.asp.net is appropriate for ASP.Net questions and the general Visual Studio forums on this site are appropriate for client applications. ...Show All
.NET Development Clipboard object throwing exception on Web Server 2003
I'm about at my wits end on this one - so any help would be much appreciated I've developed a web ASP.Net application under .Net version 1.1, tested it, and ran it on my WindowsXP Pro. laptop IIS 5.1 web server. It runs fine. The ASP.Net code behind pages call calls methods from a custom developed assembly (built to partition out functionality). This assembly writes to and reads from the clipboard object. Unfortunately interacting with the clipboard is a necessary evil at this conjuncture in the development cycle. Now when I moved the application to a Windows 2003 Web Server (via a .msi pulled together by a VS Deployment project) and execute the application I get the following exception mes ...Show All
Windows Forms FormClosingEvent has no CloseReason
In a Form I created, I've subscribed to the FormClosingEvent. In this event I want to distinguish between a user that closes the form, or an outside OS event that closes the application. Therefor I read the CloseReason member of the FormClosingEventArgs. However it seems that when the user clicks on the OK button which is the Forms AcceptButton, the CloseReason seems to be set to "None". The same goes for the form's CancelButton. Is this intended behaviour, and if not, should this not be documented it was something I thought more of as a workaround (now there are two "closing" state variables), but if it's the only way it'll have to do. Thanks! Edsger ...Show All
