techie's Q&A profile
Visual Studio Express Editions Pass on variables?
In windows form application I made two forms... One is the dialog thing and one is the main form... I made it so that the variable "selectedPath" equals a certain thing... Then I need to confirm the path... and label3 is placed in the dialog... so when I type in: label3.Text = selectedPath it says that the variable "selectedPath" is not defined... How can I make it so that the main form passes on the variable "selectedPath" to the dialog Thank You very much Keehun Nam Public Class Form1 Public SelectedPath as string {fill in selectedPath} dialogue.show end Class In the dia ...Show All
Visual Studio Express Editions How do I play a .wav file from Resources?
Visual Basic 2005 Express Edition: This works, but, I need to get the .wav file from Resources: My .Computer.Audio.Play( "C:\Documents and Settings\Owner\My Documents\Visual Studio 2005\Projects\OrthoLabRx\OrthoLabRx\Resources\PodVwBy.wav" ) I placed the .wav file in Resources, but, I can't seem to access it from there. This does not work: My .Computer.Audio.Play( My .Resources.PodVwBy) It says "value of type 'System.IO.UnmangedMemoryStream' cannot be converted to 'String'. This worked, but, instead of a click, it played a grinding noise: Dim sndPing As New SoundPlayer(My.Resources.PodVwBy) sndPing.Play() My.Com ...Show All
Visual Studio Express Editions show specified record(s)
I have a small payroll database with one of the tables being 'Employees'. When I load the form linked to Employees table, it displays all records in grid, right Now I want to filter only records with the field 'Department' being 'Finance' and display only those recores there and then, just refreshing the grid view without exiting. I can but create a button (or a toolstripbutton) which when clicked should do this. My question is, how do I filter records This is the existing sub-routine for loading the form: Private Sub Employees_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.EmployeesTableAdapte ...Show All
Windows Forms Webbrowser DocumentCompleted Event
HI Peeps, I am really struggling with the webbrowser control. The app i am developing uses webpages stored in txt files in a resource file, and is using the webbrowser control to display them. However, the documentcompleted event isnt firing when i change the documenttext property. What i want to happen is when a button is clicked on the page, an event that i define is activated changing the page to one that i decide. But the complete event doesn't fire so i cant assign the event handler for any of the controls. here is a snippet of what i am doing: Private Sub Build_Page() Dim htmDoc As HtmlDocument strPage = ...Show All
.NET Development Possible to Cast from String representation of Type?
I am loading an xml file that contains both the type and value of an item. EG: < ListReturnItem itemName =" TargetID " itemType =" int "> 23 </ ListReturnItem > < ListReturnItem itemName =" TargetState " itemType =" PublicTargetState "> Enabled </ ListReturnItem > PublicTargetState is a predefined unumerated type. I need to be able to create a new object based on the xml value of itemType, which is a string representation of the type. How can this be done in C# Without using case statements, of course! In pseudo code, something like: string sState = "PublicTargetState" // Or xml read itemType ( ...Show All
Windows Forms Hot Key function for whole program
Hi all Are there any good examples for a hot key class. I would like to implement hot key functionallity for the whole application I am creating standard text when user presses ALT or CTRL + F-key. Any links / urls you know of Lars E Hi There are 2 ways that i've discovered, the easy way and the hard way! The easy way is using the Win32 API ... [DllImport("kernel32.dll")]public static extern IntPtr GlobalAddAtom(string lpString); // ATOM [DllImport("kernel32.dll")]public static extern IntPtr GlobalDeleteAtom(IntPtr nAtom); // ATOM [DllImport("user32.dll")]public static exter ...Show All
.NET Development Creating Arrays in Tables
How do I create an array in a SQL database table Any advice would be very much appreciated. For small tables, I pack the array of values into a comma-(or whatever)-delimited string. It's not very efficient or elegant. A BLOB (big chunk o' binary) is not a bad idea, if you can parse the BLOB efficiently. The best answer might depend on the data types in the array. ---Mike ...Show All
Visual Studio Team System In Custome Rule How to get the member Datatype
HI All, I am writing a Custom rule in fxcop 1.32 to check the coding standards. My reqyuirement is variables with integer DataType should be prefixed with int etc ex Dim intEmpNo as integer Dim strName as string I am able to get the varibale names declared. But i am unable to get the Datatype of the variable. Any body can help Thanks in advance. Regards, Suriya Prakash HI Michael, &n ...Show All
.NET Development Multiple Project Solution
I would like to take multiple Projects developed by Different members of my team and combine them into one solution. I would also like to use One form to access the different parts of the system. For Example.... Use frmMain located in MainRun Project to bring up frmCatalog located in Catalog Project. Both Projects are members of the same soultion and both Projects were written in VB.NET. How would I code a Button_Click event to bring up frmCatalog My solutions currnet situation: ####### project A login form Main form (which get data from public variables declaredd in login form) Project B login form Main fo ...Show All
Visual Basic vb2005 - Table has data, but I can't assign the number of records to an integer variable
I don't know what's going on with my code. I have successfully assigned the number of records in a table to a variable in other sections of code, but for some reason I can't do it in the windows form I'm programming now. Here's my code and the results when debugging: Code Dim bDataRow As Integer Me.SortedBillDataTableAdapter.Fill(Me.BillingDataSet1.SortedBillData) bDataRow = SortedBillDataTableAdapter.Fill(BillingDataSet1.SortedBillData) Results SortedBillDataTableAdapter.Fill(BillingDataSet1.SortedBillData) 8563 bdatarow 0 Any idea what's going on Thanks for any help CindyKansas ...Show All
SQL Server Sorting Column Names in a Matrix Report, RS 2005?
Hello, Is there a way to sort columns in a logical order as opposed to alphabetical order For instance: I have two columns Gender and Ethnicity. Gender column includes following values: F, M. Ethnicity column contains: Asian, Black, Hispanic, Native-American, Unknown. When I create a report in RS 2005 in a Matrix format, column headings are sorted alphabetically such as: Asian, Black, F, Hispanic, Native-American, M, Unknown. Is it possible to sort those values as columns headings in a logical order such as: F, M, Asian, Black, Hispanic, Native-American, Unknown. I know I could use tricks by let say adding a space in front of ' F', or ...Show All
.NET Development Events in Generic List
In a C# program I've been working on, I have a class that makes use of a couple of generic lists to store some data. When the form that displays the database is closed, I do a check to see if the class is dirty. I've got some properties set up for the singular values so that when they changed, the dirty state gets updated, but I haven't got the lists updating the dirty flag yet. The way that I'm looking at doing it is attaching an event handler the the add, remove, and so on. In the non-generic CollectionBase, these events are exposed, but not so for the generic List class I'm using. I'm looking at creating a new list class that inherits fro ...Show All
Visual C++ high cpu usage!
I am trying to debug a program to find out why the CPU Usage at certain stages is almost 100%.Thereby it ends in the window disassembly..Has this type of high resource usage anything to do with the landing in disassembly Why does it land in disassembly Is it normal during a debugsession that the code lands in disassembly Does anybody know how to track the CPU usage in the program I am using visual studio.net 2003. Thanks n Regards swingme Thanks Marc for ur detailed reply.I will try it... Regards swingme ...Show All
Visual Studio vs2005 Project Template, entry removal
I'm using VS2005 to create a project template and would like the resultant project template to only contain certain files but the template file generated always lists the complete set of original project source files, I do not want my source files included in the project template. How can I remove them If I unzip the project template zip file and edit the template to exclude the unwanted files and then rezip the I get the following error when trying to create a new project from my project template "Cannot find file ............" I've moved this thread to Visual Studio Extensibility forum. ...Show All
Visual Studio Team System Team Foundation Server installation problem ("SetupWarehouse.exe" and "...No mapping between account names...")
Hi all, I am trying to intall Visual Studio 2005 Team Foundation Server.At end of installation progress, i am getting that error ; Error 32000.The Commandline '"c:\Program Files\Microsoft Visual Studio 2005 Enterprise Server\BISIISDIR\bisdwserver\bin\SetupWarehouse.exe" -n -s "MSF" -d BisDWDB -c "c:\Program Files\Microsoft Visual Studio 2005 Enterprise Server\BISIISDIR\bisdwserver\bin\Consolidated.xml" -a "TESTMSF\TFSSERVICE" -ra "TESTMSF\TFSSERVICE" -v -l "c:\DOCUME~1\TFSSETUP\LOCALS~1\Temp\setupwarehouse.log"' returned non-zero value: 3. within setupwarehouse.log: ...The following system error occurred: No mapping betwee ...Show All
