Topics
-
- 0 replies
- 830 views
Hello! I need to print the content of a datagrid, but I want to be able to specify a size and the class/control should automatically wrap text to fit within. (I have a datagrid with lots of columns, and I want them printed all on the same sheet of paper) Any solutions?
Last reply by PROKA, -
- 0 replies
- 656 views
Hi, I made my own DataGridViewEditingControl, DataGridViewCell and DataGridViewColumn. Is it possible to use an Onvalidating event in an editing control in a datagridview? I wrote something like this: Code: Protected Overrides Sub OnValidating(ByVal e As System.ComponentModel.CancelEventArgs) MyBase.OnValidating(e) If Me.Text <> String.Empty Then If Me.Text <> "CORRECT" e.Cancel = True End If End If End Sub But when tabbing out the cell it gets executed twice plus that the incorrect value in the cell remains and the I can continue to edit in other cells.The event is correctly handled when I click somewhere else with the …
Last reply by styxke, -
- 3 replies
- 794 views
I am currently writing a program for a ame I play, it works out the profit I will make from manufacturing stuff. The blueprint requires 1 or more components to build and item and my program wrks out the profitability of the item based on the amount produced and sell prices etc. Each component line has component name, unit/batch, cost/unit, units/30days I then perform some maths which takes the unit/batch * unit/cost = units/30days I can create 4 new text boxes under the original ones and give then names and perform the maths etc but I am wondering how I manage these once I get up to say 20 rows, I assume a control array which is now and event handler i belei…
Last reply by azrael211, -
-
- Leaders
- 0 replies
- 1.9k views
The two (Tutor's Corner and Code Samples) are only a few pages of threads each, but already it is difficult to find a particular tutorial/sample, and that's if you know what you are looking for. The lack of organization can (and has) lead to people posting questions that are already answered and makes it hard for the topics to serve their purpose. Some kind of catalog would be really, really nice. If possible. I know that vBulletin isn't really made for that kind of thing.
Last reply by snarfblam, -
-
-
- Leaders
- 6 replies
- 1.6k views
I have a UserControl that consist of several other controls. I want to make sure any changes that are made to the controls are done through my class. The problem is I can go through the Controls Collection of my UserControl and modify them that way. Is there a way to make the Controls Collection of a UserControl read only? Thanks!
Last reply by snarfblam, -
-
-
- Administrators
- Leaders
- 6 replies
- 6.6k views
I was wondering if anyone had some thoughts on assigning a Delegate to a Property, as defining a "Property Delegate" does not seem to be allowed in VB.NET. However, since the underlying accessor methods are really just get_Property() and set_Property(value) methods, this restriction seems odd. In VB.NET, the accessor methods do not appear to be publicly exposed. Are they in C#? (I'm guessing no?) I guess I could create a Public Get and Set method pair and have those methods called by the respective Property Get and Property Set functions. But since the methods would have to be public (if I wish to assign delegates to them) it is then redundant to also have a public…
Last reply by snarfblam, -
-
-
- Leaders
- 8 replies
- 6.1k views
Fun question, I have an IMAGE (that I get from a bitmap file), it can be of pretty much anything (a character, an item, a weapon, a wall or floor, etc...) and depending on a value (level) I have to change its color. For example let us use the WEAPON->BOMB picture - a simple bomp.bmp file with a white background and a black filled circle in the middle representing a bomb... This is how I currently use it ... Bitmap imgCell = (Bitmap)Image.FromFile("bomb.bmp"); imgCell.MakeTransparent(); What I want to do is change the COLOR of the bomb from BLACK to something else depending on the variable (level), so if level=0 then leave it as is, if level=1 then make the b…
Last reply by snarfblam, -
-
-
- Administrators
- 7 replies
- 4.3k views
I have a class [baseClass] that has a the following code: ... if (SOMETHING) { A(nSomething); return true; } return false; } public virtual void A(int nSomething) {} Then I have a class that inherists from BaseClass called [CharacterClass] and it has the override function of A(int nSomething) as follows: public override void A(int nSomething) { // DO ALL THE REAL WORK } What I was expecting was that in the BaseClass when I called A(nSomething) I hoping it would actually use the function in CharacterClass (the inherited function) as opposed to the virtual one in BaseClass itself. As you could expect, the code in CharacterClass [A(nSomething)] is never exe…
Last reply by Shaitan00, -
-
- 1 reply
- 2.8k views
Greetings, Does any one know how to FTP files to a remote server ? I have this dll that someone on the web developed it is called ASPSimply.NETFTP but it does not always work.... Thx in advance,
Last reply by Gill Bates, -
-
- Administrators
- 4 replies
- 922 views
I have written a backup utility that simply copies certain files from one location to another on my computer. I used multithreading to handle the file copying so that I could let it run in the background while I am still working on things. The problem I am running into is that for some reason the application seems to just stop randomly some amount of time into the file copy. I also wrote a version of this software to automatically burn CD backups, and the same thing is happening. I decided to try one of my other multithreaded apps, and it also stopped in the middle of progress. These problems started occurring when I moved to a new dual-core machine. The programs se…
Last reply by grip003, -
-
- 2 replies
- 779 views
Imagine a grid control. It has a collection of columns. But no events to say when the columns are added. By default, each column created is set to Visible (and a few other things) and We need the default set to invisible (Visible = False) or really almost anything. We have a custom version of this Infragistics Grid control and would like our version to default columns to not visible My thought was to catch an event of the column being added and set the appropriate properties then, but there seems to be no events for this. I could also go into the source code and just throw in an Event or change the default there, but as Infragistics gives us updates/fixes, I'd …
Last reply by Denaes, -
-
- Administrators
- 4 replies
- 937 views
Hey, I have a customer application that has NUMEROUS dropdown lists. Most behave properly - i.e., when the list is longer than the screen, the list continues off the bottom of the screen instead of stopping and displaying a scroll bar. In some cases, there is a scroll bar, but it still goes off the bottom of the screen. I have adjusted the height and font size of this dropdown list, for use on a touch-screen kiosk, and this may have something to do with it. How do I correct this erroneous behavior? Thanks, Kahuna
Last reply by SteveoAtilla, -
-
-
- Leaders
- 9 replies
- 1.9k views
The Google Web Toolkit: http://code.google.com/webtoolkit/, the toolkit that allows you to program in JAVA, and have it converted to html and javascript. Has Microsoft just lost the war?? Mike55.
Last reply by Denaes, -
-
-
- Administrators
- 3 replies
- 891 views
Im trying to update my table in the database, using this code; ÄrendeBindingSource.EndEdit() ITMDBDataSet.Ärende.AcceptChanges() ÄrendeTableAdapter.Update(ITMDBDataSet.Ärende) What am I doing wrong? And also, what is the command to delete a record? Simple questions I know... Kind regards, Kid Icarus
Last reply by PlausiblyDamp, -
-
- 0 replies
- 892 views
Hi all We are implementing a mirrored db system, how can I set the servername of my crystal report when it is loading as I do not know what database is being used? One person suggested that I enclose the code for loading the report in a try catch block, and if the report throws an exception with the first servername, then I simple try reloading with the other servername. However, I don't think that this is an effective solution. Any suggestions? Mike55.
Last reply by mike55, -
-
- Administrators
- Leaders
- 8 replies
- 5.2k views
How can I load a System Resource image into a PictureBox with the CLR? (This is actually C++ code, but I'm not sure if there is a C++ tag, so I borrowed the CS tag) System::Windows::Forms::PictureBox^ PictureBox1; System::IO::Stream^ resource; System::Void Button_Click(System::Object^ sender, System::EventArgs^ e) { resource = Assembly::GetManifestResourceStream("MyNamespace.Fido.jpg"); // Error is // "error C2352: // 'System::Reflection::Assembly::GetManifestResourceStream' : // illegal call of non-static member function" PictureBox1->Image = gcnew Image::FromStream(Assembly::GetManifestResourceStream("MyNamespace.Fido.jpg")); // Error is // "error C2061: // synt…
Last reply by PlausiblyDamp, -
-
-
- Administrators
- 17 replies
- 3.1k views
Thanks for taking a look. Awhile back I made a program for spitting data and routing it to a few destinations each in a different ascii format, All and all it was still just a ascii format. Due to some upgrades, the data that will need to be in a specific format. I am not sure if I am explaining myself adiquitly, but the best thing I can compare it to would be how an mp3 has the id3 tag information stored only in a specific place in the file. At this point I am not 100% sure of the format I need to get the upgrade done first. I do know the packet will be a UDP packet. Everything that I have ever made have either been in vb or vb.net. I do have C for .net, and this m…
Last reply by ZeroEffect, -
-
-
- Leaders
- 1 reply
- 2.3k views
I have tried writing values to the Registry below. Even though the Registry Key "rk" is non-NULL, inspecting the Registry afterwards in the HKCU Software section does not show any new settings. Can the Registry be modified in Visual C++ 2005 Express (i.e. CLR)? I tried this code (actually C++ code, not CS): public ref class Form1 : public System::Windows::Forms::Form { public: Form1(void) { InitializeComponent(); String^ strKey; strKey = "Software\\Slick Co\\FancySoft 2"; RegistryKey^ rk = nullptr; rk = Registry::CurrentUser->OpenSubKey(strKey); if (rk) { rk->Close(); } } protected: ~Form1() { String^ strKey; strKey = "Software\\Slick Co\\FancySoft 2"; Regis…
Last reply by snarfblam, -
-
-
- Leaders
- 3 replies
- 919 views
Given an array (public int[,] levelMap; // Level layout of cells) that is used to define the cell layout of my screen. Now, everytime a value changes in levelMap [at a certain location in the array] I need to update an ArrayList (alChangeList) which the coordinates of the changes so that when I redraw I know where. Currently this means that at every location in my code that I change levelMap I need to also update alChangeList (manually), problem is there are a LOT of places where levelMap can change and I want to centralize the code required to update alChangeList. So, my idea ... and this is where I need help, a) no clue if this is do-able and b) no clue how to do i…
Last reply by snarfblam, -
-
-
- Administrators
- 2 replies
- 724 views
Hello all, Im trying to migrate my web project from ASP to ASP.NET, but I really want to know which will be more efficient 1.1 or 2.0, this is a big web project, and i have to convince my managers that asp.NET 2.0 is better than 1.1, but how? I wonder if u have samples or links related to this and also related to project management in this kind of projects
Last reply by PlausiblyDamp, -
-
Who's Online 0 Members, 0 Anonymous, 68 Guests (See full list)
- There are no registered users currently online