KevinGW's Q&A profile
Visual Studio Express Editions Can I replace 7 chars with 5 chars at the beginning of a string?
#include <string> using std::string; s.replace(0,5,"12345"); // replace the 1st 5 characters s.erase(5,2); //then delete the superfluous 2 or is there a better way Not really in this case, as standard string just moves the "begin" pointer to the start of the valid data, it only reallocates memory if there is not enough space in the string. ...Show All
Visual Basic Printing DatagridView
HI, I need help on this. I already have a populated datagridview and i need to print it. Whats the easiest way to do this in vb.net Thank you so much in advance! Stanley Hi, Look at using the PrintForms power-pack from here.>> http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=747347&SiteID=1 Alternatively: 1) Hit the PrintScreen key. 2)a) Run a Paint program or photoshop or similiar. 2)b) To RUN MSPaint go to the START button for windows, then select RUN and type in MSPAINT 3) PASTE it into that program and PRINT it from there. Dont forget to select PAGE SETUP from the FILE menu in MSPAINT and then FIT TO 1 x 1 to get it all on one sheet. ...Show All
Windows Forms Getting a value from a control at another form
Hi My problem: lets suppose that we have a form called Form1 and has a textbox control called textBox1 and another form called Form2 that has a label control called Label1 and I want to set the content of Label1 with the same content of the textBox1 in Form1 what is the suitable code for such a purpose. Thanks Hi Ranadheer, in the previous code example there is a property called UserEnteredValue which returned the string entered by the user in the textbox. In your case you will create a property which will return the listbox's SelectedObjectCollection i.e. public SelectedObjectCollection UserSelectedItems { get { return this.myListBox.SelectedItems; } } ...Show All
.NET Development Web Service Invoking via HTTP POST
I have a web service and it works correctly and I can invoke its only function via the asm test page that uses HTTP POST. I want to be able to call the service via a the wininet library that uses a call to a web page. I have the following link to my web service and It doesn't seem to work like this. I would think it would because this too should be a POST right Link -> http://localhost/SubmitOrderService/SubmitOrderService.asmx/SubmitOrder param1=10¶m2=0 However, I get the following error when I put a link like this in a browser and call it; Server Error in '/SubmitOrderService' Application. In .NET 1.1 this should work fine.... but in .NET 2.0 you have to configure the webservice to allow the GET verb.... ...Show All
Visual Studio Express Editions Internet Time Update
The internal clock of my PC is very slow. I need very high precission time in my PC while I am running some time sensitive VBE applications. Can the PC time, the one that Now gives out, be updated with an Internet Timer Server, through VBE I know how to do this manually by going in to Date and Time Properties. I need it programmatically. I guess it is just a matter of knowing the protocol these Time servers use. Thanks, Antonio :) Here's a really good solution: http://www.spectracomcorp.com/Home/Products/BuslevelTimingBoards/TSATPCIUGPSTimingBoard/tabid/777/Default.aspx ...Show All
Visual Basic VS doesn't recompile..
Lately this stupid Visual studio 2005 have made this little problem. When i change my code and tries to run it, it doesn't recompile the new added code but just keeps using the old one! When i then tries to pause it when it displays a messagebox ( wich i have deleted from the code) it stop and says that there is no source code to display. I have tried the rebuild function but dont help. Also tried shutting the studio down and open it again, but that dont help either. Anybody have a solution How stupid is this: I try deleting the code in the button, where it doesn't recompile, and afterwards delete the entire button from the designer. When i press the debug button its al there in the compile ...Show All
Game Technologies: DirectX, XNA, XACT, etc. .xnb file size
Hi all, I assume I am doing something wrong with the importing of content, but I can't seem to figure this out. I have 3 .bmp images that are each around 30kb. I am importing them as Textures and using the Sprite processor. The resultant .xnb files are 250-300 kb =/ I am fairly sure the .xnb file doesn't have mipmap data in it. Any idea why these images are becoming so large Thanks Leaf. wrote: You're just telling them what button to press, I'm trying to educate here. I figured since you'd already told them the why, I'd tell them the how. ...Show All
SQL Server Losing record after synchronizing subscriptions
Hi We got a server running SQL server 2000 SP4 with a database that’s being replicated There are 17 subscribers running MSDE SP4 using merge replication. Replication is started manualy Initially we tested this with two subscriptions an everything went well, but now, since 3 months, we are facing a weird problem while sync'ing. We have massive data loss on records that where inserted at the subscribers. Records seem to disappear, but only record that have a foreign key constraint. What I mean is that for example a record is inserted at the table that holds our client records with primary key ‘ClientID’ and then a record is inserted in a table with actions for that client with a foreign key ‘ClientID’ referr ...Show All
Commerce Server CommerceProfileSystemException: Failed to retrieve profile.
We are receiveing this message on a new site we deployed in our production environment. We packaged this site in our development environment and unpackaged the site on our production server without errors. All permissions are set correctly and all 4 Web Services run accordingly. However the website throws this error. I have not been able to find any information or anyone that has run into this problem before. Any one have any idea why this is happening The only issue that may be related is the fact that i had some trouble getting the ProfileKeyManager tool to work correctly. Per documentation instructions, i tried to generate a new key and write it to a file to then encrypt it and write it to registry. Whn trying to use ...Show All
Visual C++ Displaying a BMP in cell of List Control
Hi all, I am using list control in " report view ". 1. And want to display a BMP image in a cell of that list control. 2. I want to increase height of the each rows in list control. How can i get paint event of that particular cell and increase height of the rows in list control :) Purusothaman A This article contains a nice example for your requirement You can acheive it with with CListCtrl::SetImageList you can specify the item's image while you Insert the item. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Landscape Content
A game like Halo has large man-made structures and organic landscapes. How is this content generated Do they use commerical prorams or does each game company have proprietary programs How is this content saved In standard files like X files, or does each company use proprietary formats Thanks... Up Front: XNA GSE currently will not load 3D content, but should next spring, so this is about the future. Thanks for the link to 3D Content programs. I am confident that the bulk of XNA GSE can not come up with $3500 for 3DSMax, so what can we use for Landscapes I have 3D Canvas Pro, which works vwey well for 3D objects, but seems useless for Landscapes. Likewise, for all the other pr ...Show All
Game Technologies: DirectX, XNA, XACT, etc. RenderTarget2D and MipMaps
How to "enable" automatic mipmap generation in RenderTarget2D i don't know why but it don't work m_DrawBufferColor = new RenderTarget2D(m_GraphicsDevice, 1024, 1024, 4, SurfaceFormat.Color, MultiSampleType.None, 0); m_Game.GraphicsDevice.SetRenderTarget(0, m_DrawBufferColor); //here i render m_GraphicsDevice.ResolveRenderTarget(0); m_GraphicsDevice.SetRenderTarget(0, null); //now i use it Texture2D Tex = m_DrawBufferColor.GetTexture(); m_HDREffect.Parameters["DiffuseTexture"].SetValue(Tex); //part of fx file Out = tex2Dbias(DiffuseSampler, float4(In.TexCoord.xy, 0, 3)); and i get some thing that looks like like random (texture on this mip level is some random memory) //------ ...Show All
Software Development for Windows Vista custom workflow with document management
I have implements a simple workflow to determine document type, then put them into different folder under the same document library and wait for manager review. But when i use moveTo function to move a document into a folder, a workflow can continue successfully, but when i move this document to other folder again. It throws exception. I use the WorkflowActivateProperties to determine the workflow item, web, folder and files. Is this method correct I sounds like you are using SharePoint 2007. Your question should be asked in the SharePoint - Workflow forum found at http://forums.microsoft.com/MSDN/ShowForum.aspx ForumID=1207&SiteID=1 . ...Show All
Windows Forms How to store dataset to a table in the database. Please be specific. Urgent
I have create the following datarow: _dtProjectQuestion.Columns.Add("ProjectQuestionNo"); _dtProjectQuestion.Columns.Add("ProjectQuestionType"); _dtProjectQuestion.Columns.Add("ProjectQuestionName"); _dtProjectQuestion.Columns.Add("ProjectQuestionLastModifiedDate"); _dtProjectQuestion.Columns.Add("ProjectQuestionDateFormat"); _dtProjectQuestion.Columns.Add("ProjectQuestionShortLabel"); _dtProjectQuestion.Columns.Add("ProjectQuestionLongLabel"); _dtProjectQuestion.Columns.Add("ProjectQuestionMessage"); _dtProjectQuestion.Columns.Add("ProjectQuestionMinAnswer"); _dtProjectQuestion.Columns.Add("ProjectQuestio ...Show All
Visual Studio Express Editions How to solve the problem about MSVCRTD
when i compile my program, i add other libraries to my project, but vc7.1 gives me tips such as belows: warning LNK4098 : defaultlib "msvcrt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library" what does this mean has it affection to my progra how can i deal with it thks http://msdn.microsoft.com/library/default.asp url=/library/en-us/vccore/html/LNK4098.asp should help you deal with such warning. Thanks, Ayman Shoukry VC++ Team ...Show All
