Bobby Thurman's Q&A profile
Visual C++ TextOut() and LPCWSTR
in win32 project i have a code: char buffer[80]; static int wm_paint_count=0; . . . case WM_PAINT: hdc = BeginPaint(hWnd, &ps); SetTextColor(hdc, RGB(0,0,255)); SetBkColor(hdc, RGB(0,0,0)); SetBkMode(hdc, OPAQUE); sprintf(buffer, "WM_PAINT called %d times. " , ++wm_paint_count); TextOut(hdc, 0,0, (LPCWSTR)buffer, strlen(buffer)); EndPaint(hWnd, &ps); break ; When i run this program there is no normal text... I see hieroglyphs, not letters and digits... What i must to do that TextOut work correctly You cannot cast a char* to LPWST ...Show All
Visual C# Active Directory Query.
Hi, I am working with Active Directory Services. There is an requirement that I need to get the Property Name for a particular value. In UI, I have a textbox and a button. For example, I enter pooja.katiyar in the textbox(which is my sAMAccountName) and click on search button. Now my code should be able to search the property value and and return "sAMAccountName" as its property name. I am not getting any clue how to achieve this task. Please help me .... Thanks. Pooja. I would like to come to my first question...... Its easier to get all/selected the records based on one value.......bu ...Show All
Windows Forms Datagrid selection
Hallo, I am using Visual Studio.net 2003. When i press ctrl + A in the datagrid all rows get selected, which is the default behaviour. Which event gets fired when i press ctrl+A In keydown event handler either "ctrl" gets captured or "A". Can anybody explain me how the rows get selected Or which method gets called by this event thanks swingme I'm sorry, I've looked into this a bit more, and the code sample I gave you doesn't work (the method i was overriding isn't virtual! Oops). I've looked into it a bit more, and can't seem to get work you need. Sorry. ...Show All
Visual Studio Report Viewer Export Feature
does anyone know of anyway to execute the export to PDF feature of the reportviewer in code i was thinking i could use reflection to do it but have not been able to. any ideas RenRen, Nice post. Here I am find the same issue with Open option. Save option is working fine. I get " file not found" error. I cleared the Temperory internet files too. any ideas ...Show All
Visual Studio Team System FxCop fails to locate a present assembly
I have a web app that uses Innova Studio's WYSIWYG editor - the DLL is included in the BIN directory. Each time I run code analysis FxCop throws an error that it can't load the dll My guess is that this DLL is v1.1. FxCop does not currently permit a 3rd-party component that is versioned differently than the binaries under analysis. We're looking at resolving this in a tool update. ...Show All
Windows Forms Get the name of the parameter passed
I have a reporting interface that generates 100 or so reports. Each report uses a varying combination of 11 total parameters (from 0 - 4 at most). So I could have: Report report = new Report(StartDate, EndDate, NameID, LocID) //or just Report(StartDate, NameID) //or Report() My problem is: how do I get my constructor to accept the parameters and know which&nb ...Show All
Visual Basic Gonna make me sound stupid
I know this is gonna make me sound stupid, but I have to ask anyways because I have no clue. I new at creating programs in Visual Basic. And I was wondering how to complete a program so that you can run it without having to open it with Visual Studio. For instance lets say that I wrote and alarm clock program for my labtop. Now how do I make the program so that it will work as a stand alone program without the need for Visual Basic Remember I'm new at this so please be nice. In Visual Basic 6 you have a option under the File menu named "Make <projectname>.exe" that will create an executable file than can run without VB insta ...Show All
Windows Forms Setting a table column to shortdate format
Hi all, I have a bound textbox to a date of birth column. The textbox is showing a format of dd/mm/yy 00:00:00 which I assume is physically in the column of the datatable. 1) Is there a way to have the table column formatted to only shortdate ie. dd/mm/yy 2) Is it possible to have a masked input for a textbox so that it looks like __/__/ ...Show All
.NET Development JScript problems
I don't know if I'm in the right place to post this so forgive me if I am not. I have a home automation computer and part of it's functions is to run macro's. I have been able to get it to turn on media player 9 and play a playlist. But I am having trouble getting it to shut if off. After trying every command line string I could find I'm now looking into JScript. The particular part of JScript I'm looking at is the sendkey functon. Now I'm as new to this as fresh paint on a wall. I have created a script but it doesn't work, go figure. So I tried one of the scripts in the turtoial it doesn't work either, same error. here is the script I creat ...Show All
Visual Studio Team System Problem in Migration from VSS to Team Foundation
I migrate a VS.NET 2003 project from VSS to Team Foundation. After the migration, I need to migrate source control bindings from Visual SourceSafe. ( http://msdn2.microsoft.com/en-us/library/ms253188(VS.80).aspx ) In step 7, I run the Visual Studio Conversion Wizard. After the wizard is executed, The solution and project fies are converted to VS.NET 2005 format. But at the same time, one file in the project called PubDS.cs is renamed to PubDS.Designer.cs. PubDS.Designer.cs is not under source control. It also do not have the history of PubDS.cs. In step 10, when I do check in, since the PubDS.cs is check out in Step 4 but rename ...Show All
Visual Studio Express Editions Outlook Like Interface
had a need to recreate an interface that I created in VB6 to NB.Net. Please take a look at this code and let me know how to optimize any sections. All you need to do is to open a new Windows Application and add and image control. Add about a 100 images to the Imagelist. Then copy and paste the following code into Form1 Code area and the code will create and position the controls: visual basic code: Public Class Form1 Public Features() As String Public Functions() As String Public Modes() As String Public Class ButtonI Inherits System.Windows.Forms.Button Public Index As Integer End Class ...Show All
Windows Forms Wait until form is displayed
Hi out there, i want to display a dialog at startup of the application. It should behave as the dialog in powerpoint where you can choose between different types of opening or creating a presentation. I placed the ShowDialog-Call in the Load-Event of the main-form. But in this case the dialog is visible before the main form. I want wait for the m ...Show All
Visual Basic Working with Processes
I am fasinated with the ability to launch an application with process.start(filename) from a .net application. If I create an instance of a running process: Dim CurrentProcess as Processs=Process.start("filename.doc") is there a way for me to serialize CurrentProcess inside my .net application so as to capture any changes made within the running application. Thanks, Fred Herring I try to use XML serializer. it can not serialize process Dim p As Process = Process.Start("D:\WINNT\system32\notepad.exe") Dim serializer As New System.Xml ...Show All
Visual Studio Express Editions Can vb express be used wiht a datbase created in access 2002 and does it interface with odbc?
I'm not sure If I phrased my question right yesterday. I want to use vb express with a database created in access. I don't need my forms, etc from ms access. Also is there an odbc interface so that I can use other databases other than MS SQL server 2005 I was a little surprised when I saw MS SQL 2005 advertised with vb express because for over 10 years vb was associated with ms access. Is this because of .net ( I know nothing about .net.) I'm a former unix/c programmer just trying to update some skills. Thanks. .Net and the MDAC allow you the programmer to connect to any ODBC compliant databa ...Show All
Visual Studio 2008 (Pre-release) MessageContract - serializing xml attributes
Hi, How do I serialize an xml attribute in a typed message The following fails in the de-serialization (I recieve the message on the service side but it fails to reach the operation implementation): [Serializable] public class FooParams { public int Number; [XmlAttribute] public string Name; } [MessageContract] public class FooRequest { [MessageBody(Name="Foo")] public FooParams Params ; } [MessageContract] public class FooResponse { [MessageBody(Name = "FooResult") public FooParams Params; } [OperationContract, XmlSerializerFo ...Show All
