tempgp's Q&A profile
Visual Basic FileCopy Program
I am currently trying to make a program that will allow a user to select a file orgin. Then the user selects where the want the file destination. Then they can click a button that will show the file origin and destination on the main form and show a progress bar at the same time. Thanks, QWERTYtech ahmedilyas wrote: Sub processFile(ByVal fileLocation As String) Dim reader As New StreamReader( fileLocation ) Dim line As String = "" While (( line = reader.ReadLine()) <> False) Me.appendToFile( fileLocation , line ) End While End Sub Sub appendToFile(ByVal fileLocation As String, ByVal line As String) Dim writer As New StreamWri ...Show All
Visual Studio 2008 (Pre-release) Reading and Writing image "Rating" metadata
I'm looking for a way to read and modify "Rating" metadata that Vista uses to rate image files. I'm able to read the rating although I noticed that the rating is written in several places in metadata... and I'm not sure which Vista is using... it looks like all of them are changed at the same time and are kept in sync... so do I have to modify all of them to keep them in sync /xmp/Rating / xmp/xap:Rating /app1/{uint=0}/{uint=18246} When I'm trying to modify the rating... nothing happens... I'm using this code Stream fileStream = new System.IO. FileStream (path.LocalPath, FileMode .Open, FileAccess .ReadWrite, FileShare .ReadWrite); BitmapDecoder decoder = BitmapDecoder .Create( this .fi ...Show All
Visual Studio Trapping VSS 6.0 events
I am using C# 2005 to create the C# addin to VSS6.0 as detailed in http://msdn2.microsoft.com/en-us/library/hcdf9zk2.aspx however i am not able to see the events trapped. is there any other configuration that needs to be done except the ones detailed in the link. pls. help me ont eh same. regards, sundararajan.s sundararajan, Are you getting the "Init" message that then VSSEvents.DLL will first show when it is loaded If you aren't seeing it, there it is probably an issue with how the DLL was built or 'hooked' up. You may want to repeat the configuration instructions. If you are getting the Init message, but none of the event messages, let me know and we will do some ...Show All
Visual C# Overriding static methods?
Consider the following situation: Two classes, B and C, share a lot of properties. They therefore both inherit from a common class, A. Of course we can call B(...) and C(...) to get a single B- and C instance respectively. On both classes I now want a static method, GetAllInstances(), that returns a List of all possible instances of the class. That is: The static method B.GetAllInstances(...) should return a List of all possible B-instances and similar with C. The code to produce all possible instances are very similar for both B and C and only differs on simple parameters, say a string named myDatabaseTableName. Therefore it is obvious to implement GetAllInstances() in the base class A and let it get the myDatabaseTableName property from ...Show All
Windows Forms How to Enable/Disable menuitems???
Hi All, I have a MDI form that contains menustrip with menu items. Now my question is how do I enable/disable any menu item on this form from any child form of this MDI form Thanks, Aniruddha ...Show All
Visual Studio Tools for Office Action Pane is disabled when I save the document and reopen.
Hi, Please any one can let me know what is the problem with Action pane when I save and reopen the Excel document. Action pane and its controls get disabled when I perform following steps. 1) Open Excel document,Populate some data and save to hard disk. 2) When I reopen and click on Action pane controls, all the controls gets disabled and no events are fired. Do I have to do some reinitialization for the action Pane Regards, Uma Kadagi. Alex, Yes, I am taking the original VSTO document form the web server and binding the dlls to the document. I got the reason why it was disabled. Since I was not using the Sheet2 and Sheet3 in my project and was deleting those two on workbook open event.Now I am just ...Show All
.NET Development FileSystemWatcher.Created does not fire for files on a Unix NFS Share
I have a directory on a Windows server that is also a NFS share (with Services for Unix). I created a FileSystemWatcher and configured for the .Created event. When i copy a file to that directory locally on the windows machine the event fires. When i copy a file to that directory from a unix box using the NFS share the event does not fire. The file does show up in the directory though. Here is the code I am using to create the FileSystemWatcher. FileSystemWatcher filewatcher = new FileSystemWatcher (); filewatcher.Path = @"C:\FromUnix" ; filewatcher.Filter = "*.*" ; filewatcher.Created += new FileSyste ...Show All
Visual Studio Express Editions Dialog question
Hi I'm new to windows programming. I need to know how to get a user input, using a dialog or something similar (like scanf() from stdio.h) And only C code if it's possible. :) Thanks in advance. In that case, the easiest way I see to do this is to create a windows win32 .exe instead of a console app. Then set up your windowproc and create a window using CreateWindowEx and RegisterClassEx You can then create a CEdit class to represent the Edit control and capture its messages in your window proc. Give me a few minutes and I'll write you a quick example.... -Reza ...Show All
Visual Studio Team System Work Item Field Naming Conventions
We have two camps for naming conventions. 1) Add the Work Item name in front of the field name so you can easily identify which Work Item field this field was for. E.g. <FIELD name= " ChangeRequest _ApplicationLevel" refname= "MyCompany.ChangeRequest.ApplicationLevel" type= "String" reportable= "dimension" > Then for Common fields shared among Work Items this camp does: E.g. <FIELD name= " Common _BusinessUnit" refname= "MyCompany.Common.BusinessUnit" type= "String" reportable= "dimension" > 2) The second camp does not have Work Item specific parts in the field name. E.g. <FIELD name= "A ...Show All
.NET Development TransmitFile and WriteFile
I am looking for a code examples of the TransmitFile and WriteFile methods. I cannot find anything on the Microsoft website. Also is there any pros or cons for either of these methods What is the best and most reliable way to send a file to a client Thanks! See if this helps. http://blogs.msdn.com/irenak/archive/2006/04/12/574936.aspx ...Show All
SQL Server Show only the five first...
Hi!! I have a bar chart and the data are agrupped by Folders (Category groups) and by FileType (Series Groups)... I want to show only the 5 folders with the biggest amount of files... how i could do it All suggestions will be wellcome... Thx!! I don't believe that it is possible. However, there are other options. 1. Create another dataset that uses an aggregate in the query and returns the top 5 values and their associated Folder name, and then use the results in a filter of operator type 'Like' on the second dataset or data region or use the results in as a query parameter. For example, SELECT TOP 5 Folders FROM TableName GROUP BY Folders ORDER BY Count(Files) DESC 2. Or, you can change your quer ...Show All
SQL Server Invalid length parameter passed to the substring function.
This is driving me absolutley crazy. This function returns ProductIDs stripped out from a memo field based on a check on Product Type (which is also stripped for the checking) and returns a list of ProductIDs based on the type I'm checking for, in other words the @FileFormat The error : Invalid length parameter passed to the substring function. I am passing 2 types of ProductDescriptions to my function below. This function returns ProductIDs by Type, stripped out of a large varchar field. The problem I'm having is that I have 2 checks that check whether the ProductID is MP3 or WAV. The second check is failing. The 2 types of possible incoming ProductDescriptions for example are: 'These fully-orchestrated royalty free musi ...Show All
.NET Development Better appraoch to save multi select listbox
Dear all i am making web application using asp.net ,C# (visual studio 2005) with sql2000. In a web page there is listbox with multiple seelct option. i want to save all selected option of listbox along with other web page infomation on Save button. What i am trying is first i save all selected item to array list and then inserting it to the table. i am assaigning to arraylist as int count = 0; string[] names = new string[10]; for (int i = 0; i < Listbox1.Items.Count; i++) { if (Listbox1.Items .Selected == true) { count++; for (int j = 0; j < 7; j++) { names[count] = Listbox1.Items .Text; ...Show All
Visual Studio Team System Another schema compare problem
I am facing a strange problem with schema comparison. Here is what i am doing. I have Imported schema to my db project. After I imported the schema objects, the database got a lot of changes. I wanted to run a schema compare again and identify the changes done after I imported the schema objects. When I run the schema compare, to my surprise, the comparison results shows certain tables and stored procedures with a "create" action, even though those objects exist in my db project. I could see those files in the solution explorer. But the schema comparison results still show them with a "create" action, indicating that i need to create them. I clicked button to "write" changes to my project. After i ref ...Show All
Windows Forms StatusBar ToolTip Crashing
Hello All, Quick Background: I have a UserControl that uses a StatusBar and ToolTip to allow a user to navigate data displayed in the control. On the main application there are a number of buttons that will create a new Form at runtime and place a static instance the main applications single instance of my control on the newly create Form. This was done because generating the UserControl is complicated and costly as far as memory and rendering is concerned. The Problem: If I place my control on one of these newly created Forms and the user hovers over an item that has a ToolTip it works fine the first time. The problem comes in that when the user closes the form the UserControl is removed and the Form disposed, and a user will click ano ...Show All
