EWANAME's Q&A profile
Visual C# How to change the height of MainMenu?
I need a graphical mainmenu and am able to do it with OnDrawItem(). However, I also need the mainmenu to be higher so that the sub-menu will show at a lower position and not block my graphical mainmenu. Any experts can teach me how Another way is to do it with PictureBox + Context Menu. The problem is I fail to hide a Context Menu when mouse leaves the PictureBox because when the Context Menu is shown, I simply cannot detect the mouse coordination. I've checked this page already: http://www.windowsforms.net/FAQs/default.aspx PageID=3&CategoryID=3&SubcategoryID=71&tabindex=3 Good to know tha you have done it. And Thanks for sharing the trick so other can take help if ...Show All
SQL Server Multiple selects on PArameter drop down
I have a parameter dropdown as USERID. I want a functionality that the user can selct multiple userid's to show more than one record as output for comparison purpose. How can i achieve this multiple select (i.e cntrl+click) within parameter dropdown. Thanks, Kiran. In the report parameters window, check the 'Multi-value' box on your UserID parameter. In the available values section, you can type the possible values, or query the database to get the list. You will also need to take the multiple values into account on your data query, you'll need to use 'IN' instead of '=' on your where clause for UserID. This will show on the report as a drop down, where the user can check which values to ...Show All
Visual C# error message: An object reference is required for the nonstatic field ....
I am getting the error 'An object reference is required for the nonstatic field, method, or property ' when I attempt to run my client application. I am not sure what is wrong and the documentation on this error (#CS0120) in the VS.NET IDE is confusing to me. Does anyone know what I am doing wrong MY code is below. People is a collection class and myPeople is obviously an instance of it. Because the error appears to involve the client code and not the class library with the implementation of People, I did not include that code. I could if it would be helpful. Thanks for any help. using System; using PeopleLib; namespace Ch11N01 { /// <summary> /// Summary description for Class1. /// </summa ...Show All
SQL Server Reporting Services 2005 - export to CSV with no header
I have a very simple table report. I need to be able to export it as a CSV, but I can not have the first line being the header. I need just the data and no header. Is there a way to do this I tried working with the Output tab on the tables properties, but I only seem to be able to include or exclude columns not the column headers. I look forward to you response. FredZilz Hello, To do this you need to set the DeviceInfo parameter "NoHeader" to True: http://msdn2.microsoft.com/en-us/library/ms155365.aspx -Chris ...Show All
Visual Studio Express Editions A load of errors I don't understand...
Hello. I get the following errors when trying to build a program that uses Winsock: ------ Build started: Project: Winsock, Configuration: Debug Win32 ------ Compiling... ws-util.cpp main.cpp Generating Code... Linking... main.obj : error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function _main main.obj : error LNK2019: unresolved external symbol "int __cdecl DoWinsock(char const *,int)" ( DoWinsock@@YAHPBDH@Z) referenced in function _main main.obj : error LNK2019: unresolved external symbol _WSAStartup@8 referenced in function _main ws-util.obj : error LNK2019: unresolved external symbol _WSAGetLastError@0 referenced in function "char const * __cdecl WSAGetLastErrorMessage(char ...Show All
Windows Forms reating BufferedGraphics resulting in "Parameter is not valid" exception
Hi I try to use double buffered graphics. The following lines work: private BufferedGraphicsContext plotBufferedGraphicsContext = new BufferedGraphicsContext (); private BufferedGraphics plotBufferedGraphics; protected override void OnPaint( PaintEventArgs pe) { plotBufferedGraphicsContext.MaximumBuffer = new Size (100, 100); plotBufferedGraphics = plotBufferedGraphicsContext.Allocate( this .CreateGraphics(), graphRect); This line doesn't: plotBufferedGraphics = plotBufferedGraphicsContext.Allocate(pe.Graphics, graphRect); Some questions: 1) Why can't I use the Graphics form the paint event The content of the 2 Graphics is the same, except that the PageUnit for thi ...Show All
SQL Server Getting SQL result in a variable
Hi there I have a global variable say cnt in SSIS package, now I want to get total number of rows from a table say emp in that variable cnt. how do we achieve that thanks and regards Rahul Kuamr on the same line,another query If we wish to get result of some SQL query say select name from emp where id='234' thanks and regards Rahul kumar ...Show All
Visual Studio Team System BEST PRACTICES: Importing Common Libraries
OK, This is something that has bugged me for a while. I'm hoping someone with a little insight might be able to solve this one for me. Let's say I have two solutions. One is a "common base framework" of often-used classes and utilities. The other is a current project I'm working on that uses this framework. Now here's the stickler. The common framework is on one TFS server, and the current project is on another server altogether. I want the current project to use the latest bits, but I don't want to copy the source and include it into my current project. Then I'll have two codebases to maintain. I wish there was some sort of "Partial Solutions" that TFS could incorporate that would allow me to pick and ch ...Show All
Visual C++ Cannot Deduce Argument for Type 'T'?
Could anyone tell me why: List<RobotPart^>^ test = s->FlatPartList(); results in the following error: Error 1 error C2783: 'System::Collections::Generic::List<T> ^TrossenRoboticsSystem::TROM::RobotPart::FlatPartList(void)' : could not deduce generic argument for 'T' c:\alex\flashdrive\projects\trossen robotics system\projects\demo navigation\demo navigation cpp\Form1.h 328 FlatPartList() is a method in a referenced C# DLL. Here's the code for FlatPartList(): public List<T> FlatPartList<T>() where T : RobotPart { List<T> part = new List<T>(); if (this is T) { part.Add((T)this); } //Recurse down the children. foreach (Socket socket in Sockets) ...Show All
Visual C++ AfxBeginThread() error C3867?
Hello all, I'm trying to launch a worker thread from within my view class. I have a class ("LiveVideoThreadData") that I've created that has been loaded with data the thread needs during operation. I'm getting compile-time error C3867 at the "AfxBeginThread" call. I'm following the MSDN documentation closely but can't get it to work. I've done the following: UINT CMyView::LiveVideoThreadFunction(LPVOID pParam) { //Cast to type LiveVideoThreadData: LiveVideoThreadData* videoData = (LiveVideoThreadData*)pParam; . . . } void CMyView::OnDraw(CDC* pDC) { videoThreadData.InitializeWithData(); AfxBeginThread(LiveVideoThreadFunction, (LPVOID)&videoThreadData); } Compiler produces: "error C3867: 'CMy ...Show All
Windows Live Developer Forums Windows Live Contacts Control beta v0.2 Released
The next iteration of the Windows Live Contacts Control is live! Read all about version 0.2 here and here . Questions and comments welcome! -Danny Brilliant, works much better than 0.1, no more cookie deletion! Prefer the way the callback works too, much neater. Good stuff. Thanks! Jeek ...Show All
Software Development for Windows Vista sdk sample - boot image problems
Using the sdk sample app: "C:\Program Files\Microsoft SDKs\Windows\v1.0\samples\winbase\storage\optical\imapi2sample" I tried taking the image from a boot cd (known to work). Then extracting the boot image. Then burning the data from the disc (temporarily copied to the hard drive) along with the boot image to create a new boot cdr. It does burn the disc (in separate attempts, I used both bbie and ultraiso to create the boot images) - but the disc will not boot a computer :-| The computer complains with: "CDBOOT: Couldn't find NTloader" Shouldn't this work Yes, we do repro the problem. The same files are used but the generation of the file system structu ...Show All
Windows Forms Problem occured while applying the launch condition check
I was able to add the launch condition but there's a small issue. I do not know if I am wrong or is it a .net issue or Mind Manager issue. I check for FILEEXISTS in the launch condition with Mindmanager.exe as file. The Min version value is set to 6.1.809.0. I have this version installed and this did not work. A kind of hack, I just changed the Min version value to 6.1.808.0 and it works. My problem is solved (unless there's a MindManager version 6.1.808.0). But thinking deeper,should not the min version should be checked I agree that this is not really intuitive. To detect the version match Windows Installer uses the same algorithm as for file overwriting. This means: if the existing version of the file is identical to the versi ...Show All
.NET Development VWD Express-Accessing the SqlDataSource: Can not open user default database. Login failed.
Hi all, In my VWD 2005 Express program, I created a website "DobsonCh11" that had (1) Norwind.mdf file in my SQL Server Management Studio Express(SQL Server Express), (2) Northwind.mdb and Northwind mdf files in the App_Data folder, and (3) the following default.aspx.vb: Imports System.Data.OleDb Imports System.Data.SqlClient Partial Class _Default Inherits System.Web.UI.Page Protected Sub form1_Load( ByVal sender As Object , ByVal e As System.EventArgs) Handles form1.Load If Not Me .IsPostBack Then Me .Title = "Connect/query local databases" Me .Button1.Text = "Query Access" Me .Button2.Text = "Query SQL Server" Me .Button1.Width = 125 ...Show All
Visual C++ Using VC++ 8.0
Hello, I have a project that was created/build using VC++ 6.0, the project uses a third party library iconnect.lib. I am trying to compile the project using VC++ 8.0 but I get a lot of linker errors - some of those errors are below. Note: the project compiles without errors or warnings when using VC++ 6.0. Can someone tell me what I need to do to get my project to compile/link successfully with VC++ 8.0 Thanks in advance! -Agustin ERRORS: Error 82 error LNK2001: unresolved external symbol __RTC_CheckEsp iconnect.lib Error 83 error LNK2019: unresolved external symbol __RTC_CheckEsp referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > ...Show All
