Kevgor's Q&A profile
Visual C++ Problems with the shortest code in C
Hi im just starting with the shortest program in c: //first_code.cpp #include "stdio.h" int main() { printf("Hello"); return 0; system("PAUSE"); } I compile it without errors, bit when i execute it, the window of ms-dos appears for a moment and then disappears and Visual C++ .NET shows this: 'first_code.exe': 'C:\My code\Debug\first_code.exe' loaded, Symbols loaded 'first_code': 'C:\WINDOWS\system32\ntdll.dll', It is not possible load symbols 'first_code': 'C:\WINDOWS\system32\kernel32.dll', It is not possible load symbols You system("Pause") is never executed. It is placed AFTER the return. Easier is to use Ctrl+F5 to launc ...Show All
Visual Studio Macros menu item missing from Microsoft Visual Studio 2005 Team Suite
I just installed Microsoft Visual Studio 2005 Team Suite and noticed there is no Macros (and any other submenu items). I can run macros by using toolbar customization, but I don't know how to get to Macros IDE. Can someone give me some guidelines how to correct this Thanks Rad You can try two things: 1) Click the Tools, Customize menu, Toolbar tab, select MenuBars and click the Reset button 2) Click the Tools, Import and export settings, and select the reset all settings radiobutton ...Show All
Architecture Problems with Owner Draw Menus in an out of process ActiveX Document Server
My Document Server is written with C++ MFC and built using VS .NET 2003 and is targetted to WinXP and newer. I’ve now run out of ideas on how to resolve my owner draw problem when an OLE container attempts to render my shared menus. Everything is fine when the keyboard is used to activate the menubar items. This is because the container is using WM_NCPAINT etc to create a real screen drawing context. This context is then passed through to the in place frame of my server where it will succeed in drawing the menu items ( WM_DRAWITEM ) When the menu bar item is clicked on with the mouse, however, the container make use of WM_PRINT, WM_PRINTCLIENT to render to a memory HDC. When this HDC is passed to my out of process serve ...Show All
Smart Device Development Call History - Managed Code
Hi. I am using VS2005, VB and CF2 to write an application for Windows Mobile 5 Smartphones. Is there a managed code way to access and manipulate the Call History, or is using the API my only choice Tony Hi, is there any sample code to read the call history programatically Please mail me back to kirankumar.gosu@gmail.com Regards, Kiran G ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Designer Property collections
I want to create a menu game component like the one in Mitch Walker's video (http://blogs.msdn.com/xna/archive/2006/08/31/734204.aspx) on the XNA team blog. I got a hardcoded menu working but how do I make it that the developer can add menu items from the property window in Visual Studio like in the video After further investigation you should rather put [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] on your collection property than make the class [Serializable] because the designer has problems after you've added items to your collection private List<MenuItem> menuitems = new List<MenuItem>(); [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public List< ...Show All
Visual C++ #using "AbsoluteFilePath". . .How do I. . .?
In my application I have 5 Dynamic Link Libraries I am using. Each of these libraries holds a Windows Form. One of these libraries has a class that holds ALL varaibles that will be used accross my entire application. This is how it works: DCMPMessenger.EXE -> AcsLib.DLL OR LgnLib.DLL -> MainLib.DLL -> ExtLib.DLL Variables come from: VarLib.DLL Now in DCMPMessenger.EXE, I have a Windows Form which is used as my splash screen. In my splash screen I have a reference to both AcsLib.DLL and LgnLib.DLL. Here is how I have it coded: #using "C:\\Documents and Settings\\Dave S. Anderson\\My Documents\\Visual Studio 2005\\Projects\\DCMPMessenger\\debug\\VarLib.dll" #using "C:\\Documents and Settings\\Dave S. Anderson\\My ...Show All
Smart Device Development POOM(Pocket Outlook Object Model) Problem.
I have downloaded "In The Hand Pocket Outlook Trail" version and it works fine on the Visual Studio 2005 Emulator but it gives me an "Access Denied" error when executed on the Pocket PC itself. Is this because of the trail verion or is there some kind of autherisation or access rights that I have to set to use Outlook on the Pocket PC itself Thanks, DD One of the reasons this can occur is that the free community version is not code-signed, one some devices the operator may have set the security model such that it only allows signed code to run, or it may prompt the user in which case you must respond to the onscreen prompt. The emulators have the most open security settings. The professional version of the l ...Show All
Visual C# How do I get 2 buttons on a form, the first one moves to form2, the second quits the app?
Im a newbe big time. I'm working on an RPG (to help develop my skills) that features 3 buttons on form1. The first is a button which is suppose to close form1 and open form2 for charicter creation. The second button is a credits button which simply pops a messagebox saying I made the game (which this button works), but button 3 is suppose to quit the program altogether. How do I get button1 to close form1 and open form2, and how do I get button3 to quit the program Please be very specific (like, dumb it down!). I have only experence with QBASIC and just stared with C# like 4 days ago. Thank you for your time and patience. no worries, glad I could help. I like to try to help people understand which way is correct/wrong and why that ...Show All
Visual Studio 2008 (Pre-release) DLINQ SubmitChanges() failure on SQL 2000
I have a sample application which works with our SQL 2005 server but not with the SQL 2000 server. When the data is bound to the grid the save button works just as expected with the SQL 2005 database, but fails when I use the SQL 2000 database (which is on the same server). I modified the DTC configuration on the client and server after referencing this article http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=230390&SiteID=1 , but still get the error "The transaction has already been implicitly or explicitly committed or aborted (Exception from HRESULT: 0x8004D00E)". Sample Code: public partial class Form1 : Form { DataGridView _grid = new DataGridView (); BadgerDataContext _dataContextSQL ...Show All
.NET Development SerialPort issues
Hi, I just started using the SerialPort class, but I have some problems on sending and receiving. When I use WriteLine and ReadLine everything works fine, but, when I use Read and Write or the event DataReceived with ReadExisting, I don't get back the correct data. For example, if I send the string "Hello" with Write, after converting it to an array of bytes, I receive, on the other side, something like "He\0ll\0o" or even worse. Using the event, looks like it's splitting the string in two different messages. What do I have to do to make everything working I'm a serial port newbie, so I don't know much about this kind of communication. Thanks in advance for your kind help, Massimo ...Show All
SQL Server Where did all these instances come from???
I've been having slow responses from VS 2005 and trying to diagnose that I see in Task Manager there are 4 instances of sqlservr.exe running with mem usage between 31 MB & 90 MB. Where did all these instances come from How do I prevent some of them from starting up And how do I determine what version of SQL they are One thing you can do is take a look at your services control panel and see if somehow you have managed to get 4 installs of SQL Server or SQLExpress. There are several applications that do install a copy of SQLExpress for their own data store. If you see only one "SQL Server" entry in the services control panel then it is quite possible that you are seeing SQLExpress spa ...Show All
Windows Forms Loading Image (Visual C# 2005)
Hey, I after these lines of code what should I put to make it load the image into a PictureBox openFileDialog1.DefaultExt = "*.gif" ; openFileDialog1.Filter = "Gif Images (*.gif)|*.gif|JPG Images (*.jpg)|*.jpg|TIF Images (*.tif), (*.tiff)|*.tif|PNG Images (*.png)|*.png|BMP Images (*.bmp)|*.bmp" ; openFileDialog1.InitialDirectory = "MyDocuments" ; openFileDialog1.CheckFileExists = true ; openFileDialog1.CheckPathExists = true ; Thanks :) PictureBox1.Image.Save(<filename> , System.Drawing.Imaging.ImageFormat.Jpeg) ...Show All
Visual Basic Error from custom control & ToolStrip problem
I have created a Custom control, containing 4 masked text boxes.and most times when i build it, i get a error: "InvalidArgument=Value of '-2147483648' is not valid for row position.' What is it i searched MSDN, it looks like one of the SQL errors. How can this happen, i didn't use SQL. Edit: i fixed this tool strip problem. seems that i put visible to false unknowingly. I also have a problem with my Tool strip. The tool strip on the top works well, but the one i placed in a table layout panel, is missing from view, it only appears in Design view when i select it from the bottom strip. Hi, Can you post a code snippet relating to your custom control and the line that produces this error at all p ...Show All
SQL Server Row by Row Copy
I'm writing a stored procedure that requires I duplicate records through a loop, one record at a time (required because I need to execute SCOPE_IDENTITY() logic on each insertion). But each row has 40 or so columns, making my stored procedure ridiculously full of long declaration lists. So I want to either: 1) Learn a way to auto-insert the column declarations into my code without having to type them all by hand, or... 2) Learn a way to represent the whole row for insertion, without having to specify each column specifically. The latter solution would be the most elegant, but I'll take what I can get... Wow, that is quite the solution. I think I need just a wee more help...since I am so rusty/inexperienced with T/SQL. ...Show All
SQL Server No idea if this is the right place to post... Need stored proc help
Hello, I am trying to make a stored proc that will tell me if there are any rows in a table. The table name is a variable that I get at the start of the proc it is not sent in. What I am looking for in the table is sent into the stored proc. here is where the problem is, i can not save it. It does not seem to allow me to use the if exists with variables. I have tried it also without the + and with the + ' to create a string I cant seem to get it anyway I try. if exists (SELECT * FROM + @TableName + WHERE + @ColumnName + = + @SearchStr2) print 'got here ' +@TableName + ' '+ @ColumnName END Thanks for any help You need to build the entire query string in a variable, and then use the dbo.sp_ ...Show All
