Peter Ritchie's Q&A profile
Windows Forms Adding Row header a text in datagridview
hi all, Can anyone tell how to add the rowheader a text in datagridview using visual c# Thanks. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=298522&SiteID=1 please look at that thread ,i hope it will help ...Show All
Visual Studio Shadow Folder Problem
i have a problem with shadow folders. i use source safe to develop a asp.net web site in a team. i want the website to be shadow copied to inetpub to be live just in time when somebody checks in a file in visual studio. but when checking in a file in visual studio the shadow folder file is not updated iis and source safe are installed on the same machine, so i think that the impersonation is not the matter. when i open source safe admin and open shadow folder config then everything is updated, but that's not what shadow folders are for ;) the problem only occurs when checking in via visual studio integrated check in... any suggestions thanks in advance, regards, daniel I am working with a client having the same ...Show All
Windows Forms Get the parent Control object...
I have a non-visual class like (avalible in the toolbox) public class MyClass: Component { public MyClass() {...} } In this class I have some asyncronus external events that needs to be syncronized with the "main - gui - thread" that consumes events from "MyClass"... Before I made a "toolbox" component of "MyClass" I hade a constructor like public class MyClass: Component { public MyClass(Control parent) {...} } This way I had the "parent" object to sync with... But using MyClass as a component in the "toolbox" forces me to have a constructor without any parameters... I need to get hold of the parents "Control - object" inside of "MyClass". How ca ...Show All
Game Technologies: DirectX, XNA, XACT, etc. General debugging problem in Direct3d
Hello everyone, I am trying to create a general game map editor. Please take a look at the code below. Before going further I would like to fix some severe problems with the program. The problem is that while debugging the program I often (1 out of 3 times approximately) get different errors. For example "Fatal execution error was detected" on OnIbCreate, buffer.setdata, etc. The compiled program doesn't run at all - I get "Send error report" message. Also please have in mind these facts: I program in MS VB 2005 express. I ticked off use application framework and run the form class from sub main(). {chopped large chunk of code} Please take a look at my program and help me solve my problem. {chopped ever larger ...Show All
Visual Basic Question
Hey gyuz! I wrote a little program that runs any other program you want throuh a contextmenustrip.The program adds a notify icon in the tray and you can access the menu through there.All the programs you add are saved in the registry for calling them. I used the AddHandler to create a new ToolStripMenuItem each time i add a new program. But here is my question .. when running a program: I used : Process.Start(RegistryKey.GetValue(sender.tostring) and Shell(RegistryKey.GetValue(sender.Tostring),AppWinStyle.NormalFocus,False) The Process.Start works fine. The Shell throws the File Not Found Exception. I don't why! But Spotty - the OP said they are only launching other programs, so Shell should work fine. Surely the fai ...Show All
Visual Studio Express Editions Errors in compiling code creating a window
First time creating code in VC++ express. Think i did all that was necessary to set things up. Using Microsoft XP Hiome Edition, SP2 Installe: SQL server 2005 Visual C++ 2005 Express SDK for Windows Server 2003 R2 Made the changes indicated (Directories, change in corewyn and commented out 4 lines in <forgot where i did that, but it was successful>) Here is the code: // myfirstwindow.cpp : Defines the entry point for the application. //include the basic windows header file #include "stdafx.h" #include <windows.h> #include <windowsx.h> //the WindowProc function protoype LRESULT CALLBACK WindowProc (HWND, hWnd, UINT messagr, WPARAM wParam, LPARAM lParam ...Show All
SQL Server How "WHERE" clause can be used in MDX query?
Hi, I am writing MDX query to retrive a set of data based on selected range of date. I have written a MDX query but it is not filtering . My code: SELECT NON EMPTY { [Measures].[Fact Table Count] } ON COLUMNS, NON EMPTY topcount({ ([Date Time1].[Date Time1].[Date Time1].ALLMEMBERS ) } ,1000)DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM ( SELECT ( [Date Time1].[Date Time1].&[ 2006-01-25T05:53:07 ] : [Date Time1].[Date Time1].&[ 2006-02-25T15:53:56 ] ) ON COLUMNS FROM [Cube Analysis]) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS This code should display only data with selected range of date but it displaying all data. Can a ...Show All
.NET Development Passing SecureString to a web service
Hi there, I am building a windows forms client application that is attempting to send a custom soap header to a web service. The custom soap header is defined in the Service.cs of the web service as follows: public class AuthHeader : SoapHeader { public String userName; public System.Security.SecureString passwd; } The web service class exposes an AuthHeader member as a public field like so. public class Service : System.Web.Services.WebService { public Service () { //Uncomment the following line if using designed components //InitializeComponent(); } public AuthHeader sHeader; // Rest of the class .... } It is necessary to pass in credentials for impersonating the user logged on to the client application ...Show All
Architecture OOP Design Question - Need an opinion...
I know there is no "100% correct" way to design the following but any suggestions or shared opinions would be appreciated: I want to create a Customer business entity. Should this Customer class only contain properties and simple validation or should it also contain all the business logic and CRUD functions Should I create a separate class called CustomerService that handles logic by passing around and working with the Customer entity Example: How to add a new Customer 1) All domain logic in one Customer object . Customer.Name = "Bla" Customer.Save OR 2) Customer object to hold properties and Service object to perform business logic. Customer.Name = "Bla" CustomerFactory.AddCu ...Show All
SQL Server Problem using Count in code
When I set the contents of a textbox on my report to count(Fields!DepartmentID.Value, "Departments") my report runs. However, when I try to use the same expression in my code, I keep getting the following compiler error: [BC30451] Name 'Count' is not declared. Do I need to qualify the Count function with an assembly path If so, what is it Thx Helen I understand, but since a code expression in the report itself can call it, I wonder if I can reference an assembly so that my code-behind can also call it It's got to be available somewhere. thx Helen ...Show All
Software Development for Windows Vista How to get Explorer-like drag images?
Hi, On Vista, Windows Explorer uses some new kind of drag images. It consists of a quadratic (with rounded corners) bluish background with a large (48x48 I guess) icon on it. At the bottom of the drag image there's some blue text explaining what will happen if you drop the item. What do I have to do if I want such drag-images in my app I've a listview window which is the source of the drag operation. I call SHDoDragDrop() instead of DoDragDrop(), so that I don't have to fiddle around with IDragSourceHelper to get any drag images. However, I only get old-style drag images. I noticed that I get an empty quadratic (with rounded corners) bluish drag image WITHOUT icon if I intercept the DI_GETDRAGIMAGE message and simply return FALSE. So how d ...Show All
Visual Studio Express Editions VB 2005 Express
I am progressing from Excel to VB Express and having alot of fun but I am completely stuck because I cannot select more than one cell a a time by using the Ctrl key along with my mouse or with using the upper case key for a group slelection. I am quite sure that it is not cased by a faulty mouse andit seem that it is not presently within my knowledge range to sort it. Any help, guidance or direction would be most appreciated.....Thank You, Mike Michael, Your problem seems strange. What cell you would like to select Is the cell in DataGrid, GridView or some other controls In excel there is certainly no mistake on doing the above operations as you described. However, in VBEE, what is the target control yo ...Show All
Visual Studio Team System How do I view test results stored in the Load Test Results Store?
I have set up the Load Test Results Store and have ran several load tests. I can see that the load tests are stored in the database. How do I select and view the test results stored in the database What I didn't understand was how to re-connect to the previously ran test via the "Test Runs" window. This explains perfectly how to accomplish it. Thanks ...Show All
Windows Forms how to run a .net2005 application from sql job
I can run a vb6 applicaton from SQL Jobs doing the following I create a bat file with the following code (run.bat) C:\progra~1\GCO_Daily_data\GCO_Daily_data.exe then in sqljob i create a new step using type operationg system cand and then calling the bat file C:\progra~1\GCO_Daily_data\GCO_Daily_data\.run.bat but since there is no exe in vb.net 2005 how do i do this I tried creating a run.bat file with the path the C:\Documents and Settings\hopkinsl1\Start Menu\Programs\Suntron\SCWebMail but it does not run (its a module type of application that displays a console write so I can see what is happning) Why does .net2005 not create a REAL EXE ...Show All
Visual Basic Records Question
Is there a specific way I need to treat tables for record sharing Say if, I was making a PO table and I was depending on the last entry to help populate my next number, is there a chance that I would end up with the same number twice, from 2 different people being on 2 different machines I know access would'nt(very, very, very slight change - a millisecond) Davids Learning Your right I do have po as the primary. Is there a chance that this record when editing could be opened at the same time Didnt know, just thinking about whats going to happen later down the road.. Davids Learning ...Show All
