noombee's Q&A profile
Windows Forms System.Drawing
I have the code below and when I use DrawEllipse, it works ok, but when I try to use DrawLine, it doesn't show in the pictureBox - or rather shows for a second or two then nothing. int w = pictureBox1.Width - 1; int h = pictureBox1.Height - 1; // Create the bitmap Bitmap bmp; bmp = new Bitmap(w, h, System.Drawing.Imaging.PixelFormat.Format24bppRgb); g = Graphics.FromImage(bmp); Pen myPen = new Pen(Color.Blue, 1); myPen.Width = 1; for ( int i = 0; i < a.Length; i++) { if (rbLines.Checked == true ) { g.DrawLine(myPen, c, 700, c, a[ i ]); //Does NOT work right c = c + 5; //spread the lines out } else { g ...Show All
Windows Forms Textbox as "a required entry" using triangle mark in its right bottom corner
Hi, anybody help me, please I want create a Textbox which inherits System.Windows.Forms.Textbox but have the ability to indicate that the Textbox is a "required field entry" by giving triangle mark at its right bottom corner. A boolean Required property can be added, allright, but my problem is how to draw the triangle mark when user set the Required property to true Inheriting from System.Windows.Forms.Textbox is another one I needed, because I don't want to lose the default implementation of original Textbox. Thanks. The textbox is drawn by the operating system unless you told .NET that you're going to override painting of the contro ...Show All
SQL Server Filter out null values on a field
I'm trying to configure a filter on my table (SSRS 2005) to filter out any instances where a certain field in my table has a null to control which records do or don't show up for the entire row. I am not able to figure out how to form this filter. I've tried several things such as: Expression Operator Value --------------------------------------- -----------   ...Show All
Windows Search Technologies Using and querying custom property sets/items
Hi In terms of the Windows Indexing Service and IFilters you can register custom property sets and return data for these custom properties when your IFilter is called. In the MSN-DS (WDS) dev guide at http://addins.msn.com/devguide.aspx they mention that your IFilter should return values for all properties that it finds for the item types it indexes. However the docs go on to state that : For a complete list of supported properties used by Desktop Search, see: C:\program files\MSN Toolbar Suite\DS\<VERSION>\en-us\Data\Config\msscolmn.txt Which is a fixed subset that won't know anything about custom property sets that ...Show All
Windows Forms Securing files
Hi, I doing a program that has alot of media files (images, sounds, videos, animations). I want to encrypt these media files so that they can be opened only by my application. Is there a way I can do that Thanks Kind-of. You can find plenty of encryption methods in System.Security.Cryptography, but you need to understand the concept of&n ...Show All
Visual FoxPro Populating a grid - strategy.
Hi all - another newbie question: I'm trying to have a grid populated by a sql statement. I am wondering if the proper strategy is to create the grid in the form designer by dropping the original table from the DE into the form, and then tweek the fields, record source etc, or do the whole thing in code Thanks, Aleniko I am looking to have the grid provide a drop down box to show all the countries when it goes to edit mode. You can download the white papaer and sample code from the session I gave on "How to put a combo box in a grid" from http://www.tightlinecomputers.com/Downloads.htm . It will ...Show All
Visual Studio File or assembly name CrystalDecisions.Web, or one of its dependencies, was not found.
To All I have developed a report in VS 2003 that is ran in both a Win App and a Webpage. When I run the app or the webpage via "localhost" the report is ran correctly. When I run the webpage on our webserver (different machine) I get the error: "File or assembly name CrystalDecisions.Web, or one of its dependencies, was not found." I have found a post on the http://support.businessobjects.com website refering to the assemblies being different versions but this not the case here. Following is the full error from the website: Server Error in '/webKanban' Application. Merger modules for Crystal XI Release 2: ...Show All
.NET Development best practice for user session
Trying to, for fun, create my own custom forum in ASP.NET. I have done this once before just very rough stuff no security in place. But I want to make a more serious forum now. I want to know what is the best practice to store a users log in session Is it best to add it in a session state What I mean is that, I want users to reply/post to topics when they are logged in. Of course I am not going to pass the user id via querystring for obvious reasons. So assuming username/password is correct, should I store that info in a cookie or session state or both Any tips and advice is much appreciated :) It depends on a lot of things. Th ...Show All
Visual Studio Add-in howto
I do not know if this is the right forum for this. How do I even begin my first steps to write a visual studio 2005 add-in Is there a sample example somewhere. I can create a sample add-in from the Visual Studio when creating a new project but after that there is not any good information in help or on MSDN. I want to basically add a new menu item to the context menu in the solution explorer and when the user clicks on it, I need to create a new window which gets filled in with stuff based on the project selected. Then based on what the user selects, I want to start Visual studio debugging session with certain arguments. I looked at the ...Show All
Software Development for Windows Vista Saving the ink image for an inkedit control
Hi, We have an inkedit control on a windows form 2.0 We need to save both the text and ink mode values for this control in a SQL server database. Is this possible or do we have to use an inkpicture control to get the ink rtf display Thanks in advance. Vishal Hi Vishal, you can use the SelInks property on the InkEdit control to get to the embedded ink object for selected text. Then you can save that as byte array and persist it to your database. See some sample code below. Note that the Save() method also has an overload that allows you to save the ink as GIF if you prefer that. i ...Show All
.NET Development AWhy Does Deleted Rows Keep Coming Back?
Can someone comment (DataGridView dev team...hint, hint, nudge, nudge!) why deleted rows in the grid keep coming back. I'm sure its programming error on my part, but after about 3 weeks of fiddling with the DataGridView, trying to find the ideal steps to do all the steps, I can't seem to find the ideal combination to assure that rows get deleted and stay deleted. Also, seeing a lot of errors trying to save rows. I've implemented various combinations of: dataGridView9.EndEdit(); customerBindingSource.EndEdit(); myDS.AcceptChanges(); customerTableAdapter.Update(myDS); Also, tried to F ...Show All
Windows Forms help me :how can l get any cell of dataGridView ??
help ,l`am a new ...Show All
SQL Server Need help with User Defined Function
I am accustomed to doing most of my function work in Access, but the boss would really like it if I could shedule some cubes to do the stuff that takes forever when you run it live. To that end, I have an Access function that I call to get a field value for a query. I would like to be able to create an User Defined Function on the SQL server and call that function as a field value in a view. I have searched the forums and have not really found anything that wants to make sense to me as to how to do this. The access function is as follows: Public Function BuyerDeltas(IFSDate As Date, PODate As Date) As Long If IFSDate < (Date ...Show All
.NET Development How can I get the local windows user folder in WinXP using C#?
I am tryin to get the local user folder in C# using SHGetSpecialFolder and I wrote this code but it didn't work [ DllImport ( "shell32.dll" )] private static extern bool SHGetSpecialFolderPath( int hwndOwner, string lpszPath, int nFolder, bool fCreate); private void btnUserData_Click( object sender, EventArgs e) { const int MAX_PATH =700; string folder = new string ( ' ' , MAX_PATH); bool x = SHGetSpecialFolderPath(0, folder, 5, false ); } I didn't get any exception from this code and when I checked the value of x I found it true but the folder didn't change from it's original. PS my development environ ...Show All
Windows Forms Any shortcut to passing a form as an argument?
Any shortcut to passing a form as an argument I was hoping that vs 2005 would ease the problem of passing a form as an argument over vs 2003. Looks like not. It is very cumbersome to overload a procedure for each form, so much so that there's no reason to do it. sub XXX(frm as New Form1) Sub XXX(frm as New Form2) etc. It's easier to repeat the code within the form. Is there a workaround dennist Adam, Oi, ve voi. Thank you very much. I was hoping studio 2005 would have had a shortcut. Looks like it doesn't. Thanks again. dennist ...Show All
