peansen's Q&A profile
Windows Forms Displaying Database information in ListView
I created an address like database with first and last names and include a photo location in the database. Now I want to use ListView to display the photo and name of each row(person) in my database, but I don't know how to retrieve a string from a single cell in my database. can anyone help what you may be after is databinding, which is easily done in this case. Simply create a SqlDataAdapter, a dataset and your SqlCommand then execute a query/fill the dataset using the dataAdapter with the record, then bind the UI controls to the dataset by adding a binding to the control. you could also use a SqlDataReader to get the specific row of data you like, would be faster and effecient but of course if you are going to modify the detail ...Show All
Smart Device Development how can i get current process(our application) memory usage in .Net CF2.0
Hi, I want to get current process(only our application) allocated memory usage. .Net Framework, i got one property for current process memory usage(WorkingSet64). Sample code: Process myProcess = null ; myProcess = Process .Start( "notepad.exe" ); MessageBox .Show(myProcess. WorkingSet64 .ToString()); But i searched the same in Compact framework. In openNetCF namespace having some property. OpenNETCF. Environment2 .WorkingSet; This is returning whole free physical memory. can anyone help me . which are the property or method will return current(particular application) memory usage . if available any other API or namespace, please let me know ASAP. Thanks, Raj ...Show All
Visual Studio 2008 (Pre-release) LocBaml doesn't work with RC1?
Hi, I'm currently using RC1 which is released several days before, when I have read about Globalization in WPF, I met LocBaml example. Follow the indication, I successfully build LocBaml.exe and it's sample solution and got a folder named en-US and a HelloApp.Resources.dll in it, but when I tried to use LocBaml to extract localization info, I got problem: D:\Tools\Dev\LocBaml\CSharp\bin\Debug>LocBaml.exe /parse D:\Tools\Dev\LocBaml\XA ML\bin\Debug\en-US\HelloApp.resources.dll /out:D:\temp\text.csv Microsoft (R) Baml Localization Utility 1.0.0.0 Copyright (C) Microsoft Corporation 2005. All rights reserved. Could not load file or assembly 'HelloApp' or one of its dependencies. The syste m cannot find the file specified. I tried to debug ...Show All
Gadgets HTML form in gadget submits to new window. How can I stop this?
Hi all, I'm new to sidebar gadgets as well as Windows Vista. I'm a web developer, coming from Windows 2000 Pro, where I had a small php-based form that kept track of my hours. In Windows 2000 I was able to add it to my desktop fairly easily with "Active Desktop". It is proving to be somewhat more difficult with Vista Sidebar Gadgets. I was able to create the gadget, and the php form now displays. To do this, I created the .gadget folder in my User directory, then in the html file in that folder, I created an iframe with a source pointing to the php file in my localhost webserver directory. So that's my background... Anyway, when I try to submit the form, instead of reloading the gadget, it opens the form in a new window. This occurs even w ...Show All
SQL Server Where can I get a C# CLI Assembly template to create a new project with?
Does anyone know where I can download a C# CLI Assembly template In VS 2005 there are no defaults to create a C# SQL Assembly like the sample HelloWorld. Rather than modifying the Hello World, I'd like to get an original template for creating a new project just like the templates to create a new Windows project. Thanks, Chris Open the New Project Dialog and under C# select Database - SQL Server Project. Too bad that the icon in the dialog and the ones shown in the solution explorer don't match, otherwise I would have found this a lot quicker. The icon in the solution explorer for the Hello World assembly is matches the C# Windows Application. Perhaps this bug can be past on to MS fo that t ...Show All
Visual Studio Express Editions Pass Object to EventHandler?
In a console application, is there any way to pass an object/variable to an EventHandler I'm trying to do this with a ctrl-c and the ConsoleCancelEventHandler, but I don't have to do so.. if this is not possible with ctrl-c being a special case, I can use another key. The goal is that I have an object called SyncExit which provides several different events upon which several threads await to exit gracefully. I wanted my ctrl-c to have the event handler call this, which means I either have to pass the instantiated object (preferred) or make the object global to the class, not just the Main method (not preferred). I also don't want to just shut down the thread because I have cleanup to do once ctrl-c is pressed, so I ju ...Show All
Visual Studio Express Editions Event procedure changes name when I cut and paste control to different area
If I cut and paste the control I get a number added to the event procedure: First it was: Private Sub btnGetList_Click( ByVal sender.. If I cut and paste once, it is: Private Sub btnGetList_Click_1( ByVal sender... And again: Private Sub btnGetList_Click_2( ByVal sender... But all my code remains in the first instance of the procedure. Is this normal It sure seems annoying. Actually it's a good thing. The control you paste is a new control. If you desire the same code for each control: There will be a handles clause at the end Handles ControlName.Click This can be extended thusly: Handles ControlName.Click, ControlName2.Click, ControlName3.Click ...Show All
Windows Forms How to manage event handlers ofthe controls created in runtime
I am making a desktop application which produces tab pages at runtime on a click of a button ... My problem is I am not usre how to access the text properties of the controls which were created dynamically .... any help would be highly appreciated.. please do remeber I am developing in c# and have absolutely no ideas abt vb...... cheers, da_coder. the code for making tabs dynamically is here with and when the eventhandler cycleSaveButton_Click(object sender, EventArgs e), i need to access ycleCommentsTextBox.Text, cycleFrequencyTextBox.Text, cycleOnsetTextBox.Text, cycleOffsetTextBox.Text,cycleAmplitudeTextBox.Text,cycleDurationTextBox.Text and cycleChannelComboBox.SelectedItem private void button1_Click(object sender, ...Show All
Visual Studio Team System Custom rule to validate the value of a string literal
Hi, guys. I have methods that takes a string argument that is utlimately passed to String.Format. Stuff like "{0} has value {1}". I've written an FxCop rule that can ascertain when these methods are called but I'm stumped on how to actually extract the contents of the string literal in order to analyse its contents. Any clues It must be possible as Reflector.exe can display the strings. Guess I'm just missing the correct API. Whilst I'm at it, do you know of an existing rule to analyse a format string Kind regards, Angus ps. If there's a way to improve my "TraceMethodTakesStringFormatter" so that I don't have to do a string comparison on "System.String()", I'm all ears ;-) public override ...Show All
Visual Studio WebForm CustomAssebly execution rights #ERROR
I have made trusted assembly in the GAC class library itself: using System; using System.Collections.Generic; using System.Text; using System.Security.Permissions; [assembly: System.Security. AllowPartiallyTrustedCallers ] namespace ReportFunctions { public class Repfunctions { public Repfunctions() { } [ PermissionSet ( SecurityAction .Assert, Unrestricted = true )] public static string Hello() { return "hello" ; } }} in the report I calling class method like: =ReportFunctions.Repfunctions.Hello() in the running on the report is #Error and in the output Warning: The Value expression for the textbox ‘textbox22’ contains an error: Could not load ...Show All
Smart Device Development Convert a bitmap to an icon in compact framework for ppc2003
Hi Everyone, I am trying to convert a imagelist image (a bitmap) to an icon so that I can use the graphics class to draw it with transparency. However I cannot work out how to convert a bitmap into an icon - I've found samples like this: Bitmap bitmap = new Bitmap(16, 16); [..] Icon icon = Icon.FromHandle(bitmap.GetHicon()); But this doesn't work as GetHicon is not supported in the CF. Any suggestions Regards Mike Oleary Why do you believe icon would fix your transparency issue What kind of issue Most common transparency problem is what transparent color does not match color in bitmap since it was converted to 16 or 15 bit screen format. ...Show All
Visual Studio Express Editions registration of C# express not working
i've installed C# on 1 machine, and registered it successfully, i needed to install it on a second machine as i the 1st pc is often used for other programs, but when i try to register the second installation of C# it just jumps to a thank you page but no registration key is given or box for me to enter a registration key ... and the 2nd copy keeps popping up, i need to register the product, ... i dunno what to do from here ... please help ... If you are installing the system using the CD or manual install you do not get a registration Key and you do not have to register... item 4 from memory on the regeistration FAQ. You will get the nag screen for a few days but it will stop. If you do register the pr ...Show All
Visual Studio 2008 (Pre-release) Using UserName Credentials without certificate
Hello, is there a possibility to use UserName Credentials without having a certificate for the service I tested message security with Username credentials, but I always get an exception, that I have to use a certificate. Jens It looks like you're installing the cert in the CurrentUser store but looking for it in the LocalMachine store. I would recommend opening up MMC (Start - Run - type "MMC") and then add the certificate snap in for Certificates. Add the my user account and machine account. From there you can check where your localhost cert is located. Also, when you're using the FindBySubjectDistinguishedName find type, you'll need to use the CN=localhost, as you've already surmise ...Show All
.NET Development string Replace function
using System; using System.Text.RegularExpressions; namespace ConsoleApplication1 { /// <summary> /// Summary description for Class1. /// </summary> class Class1 { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main(string[] args) { // // TODO: Add code to start application here // string text = "a0+a1X1+a2X2+a4X4+a10X1.X3+a12X2.X3"; string pattern = @"a.\d*"; MatchCollection matches = Regex.Matches(text,pattern); Console.WriteLine(text); Console.WriteLine(); string[] a = new string[mat ...Show All
Microsoft ISV Community Center Forums ISV Software Requirements
Hello all, Sorry I'm new here and was unable to find an answer to my questions using the search feature. Because Microsoft requires several MCPs to satisfy their non-ISV competancies, I need to take the ISV route to get Certified Partner status. If I was to go for the ISV Competancy, what kind of application are they expecting me to develop I read on the lionbridge site that games and office productivity applications were not allowed for "Certified for" testing. What would I develop then Would an alarm clock be adequate providing it met the other operational requirements Thank you, -Bunny Hi Bunny, Here's a link to the ISV Software Testing Framework: https://partner.microsoft ...Show All
