Reza Bemanian's Q&A profile
Windows Forms DataGridView Datasource property
ArrayList Ips=c1.getIPs(); dataGridView1.DataSource = Ips; The getIps returns an arraylist with count 1 the content of arraylist 0th element is 'Pencil'. but in grid its displaying the length of string i.e 6 rather than displaying Pencil.What should i do to display the content of arraylist rather than the length. regards Your arraylist is probably filled with simple strings. You need to fill it with some custom objects, which would expose appropriate properties, e.g.: public class IP { private string text; public IP() {} public IP(string text) { this.text = text; } public string Text { get { return text; } set { text = value; } } } ... ArrayList list = new ArrayList(); list.Add(ne ...Show All
Visual C# Trim file path to file name
Ok, so I want to take a file path and trim it down to the file name. Sounds simple, right So I take this: "C:\Program Files\Test\Test.txt" And I get this: "Test.txt" I realize that this is probably a commonly asked question, but search yielded no results. (Not to mention that the msdn website search is horrible - you can't just search in your current section instead of the whole global msdn) actually I find msdn search is pretty accurate, well with the keywords I use (specifics) but thats just me. of course the best way to get just the filename is what cgraus suggested - Path.GetFileName(filepath). Just something extra to chip in, string theFileNameOnly = theFileName.Sub ...Show All
SQL Server Problems Creating Report
Hi, I have only recently started playing around with Reporting Services (2005), and I am having some problems creating a basic report. What I want to display is a table which shows product names in the first column, sales for a specific period this year in the second column, and sales for the same period last year in the third column. The 'specific period' is determined by specifying a start week and an end week which I have set up as parameters. I have managed to produce the first 2 column with no trouble. However, for the third column I need to subtract 52 weeks from the parameters and use them as new parameter in the third column. Can anyone offer any suggestions Dave Hi Adam, Aga ...Show All
.NET Development RSAProtectedConfiguration Provider Use In Windows Forms Apps
Hi folks, I've been developing two enterprise apps for deployment to selected users within the company. Both of the applications have sections of their App.Config files encrypted using the RSAProtectedConfigurationProvider. It all works fine. The problem is this: These apps will be deployed to run from the network, and will not live on the user's machine. This is also true of the App.config files. What this means is that I need to be able to create and export an RSA key container to be imported on each authorized user's machine which will be used to decrypt the encrypted sections of App.config. During development, the default .NET key has been used. Once the new key has been imported, I need a way to tell the RSAProtectedC ...Show All
Visual FoxPro "Select" is different from "browse"?
I use select and browse with a cursor but I get 2 different result. Code: SELECT refno, ItemID, ItemInvId ,convertquantity from curDetailAlias WHERE ALLTRIM(refno) == b; ORDER BY ItemID INTO CURSOR curBangDoiTru Browse last for ItemID = b Can anybody help me Thanks in advance. I don't understand why you don't buffer the table itself or use plain insert w/o select. Anyway you might have a reason to do so. Here is a sample that uses (buffering = .t.) - supported in VFP9 and up: SET MULTILOCKS ON SELECT * FROM customer INTO CURSOR xx readwrite CURSORSETPROP("Buffering",5,'xx') INSERT INTO xx (cust_id,company) VALUES ('xxxxx','New company1') INSERT INT ...Show All
SQL Server No rows were deleted
My SQL 2005 table has 7 exact redundant records. I opened it in a data sheet view and selected these rows and tried to delete them. No keys are defined and null values are allowed. Error says: The rows values updated or deleted either do not make the row unique or they alter multiple rows (7 rows) Help: Why error message and How to delete these 7 rows If you don’t have a natural key for your data like so Social Security Number you wil have to either use more than one column to create a surrogate unique key. If this is not achievable based on your current data you will have to create an artifical key using identity columns or GUIDs or your own logic to create unique values. HTH, Jens K. Suessmeye ...Show All
Gadgets Sidebar and Aero
Hi, What's the relationship between Sidebar and Aero For example when Aero is off (automatically or manually) then sidebar will be turn off as well And vice versa Thanks. Hi Eric, Well I guess it is. It's not that sidebar is not available at all. It's always there and the sidebar application can be launched whenever you wish to. It's just that Vista doesnt seem to start it up by itself when Aero effect is not supported i.e. the machine's display is not Aero capable. Regards, Amol. ...Show All
Windows Forms When launching a clickonce in IE7, the popup window doesn't close
In IE6, I would launch my clickonce by creating a popup with url set to the clickonce's install url. After installation, the popup window closes itself automatically. If I try to launch the clickonce the same way with IE7, the popup doesn't close itself. Anything I can do Is there a setting in IE7 ...Show All
Visual C# Ctrl+Space has stopped working
I am using Visual Studio 2005 Professional and C# (this happens in all other languages, though), and Ctrl+Space seems to have stopped working. I have never messed around with the keyboard bindings before, so this is a mystery to me. In the text editor, normally I would get a list of variables, etc. by pressing Ctrl+Space and could select from them. If I just start typing on a blank line, or type a period after an object, the Intellisense still pops up, but Ctrl+Space has stopped doing anything. I have tried going to Tools->Options->Environment->Keyboard to see what that key configuration was mapped to. In the box that says Press Shortcut Keys, I can press ANY other key combination and it will tell me what it maps to, but pressing ...Show All
Visual C++ Problem with application icon
Hello ! My application has some icon, and i need to change it at run time. And change accordingly icons in all relation elements (desctop, sturtup menu, etc...) So icon should be changed in system icon image list. How to do this Thanks, Maniluk Alexander You mean the icon shown in other applications like Explorer Or the application icon shown in the title bar of your application. The icon displayed by other application is manually extracted from the binary, you can't edit your own binary and modify the resources while you're running. ...Show All
Visual Studio Express Editions Storing Stuff
Dear All, This may seem a little simple to some of you but its been slowly winding me up for a while now, so any pointers or advice would be greatly received. What I'm looking to do is store information inside my application, with out using a database (I mean Access, SQL etc.) I have used *.bin files in the past but I'm not sure that they would meet the needs of what I need to do. The project is for a small charity and so far has about 850 records that they wish to store, they mainly use open source or freeware and need to be able to move the data between desks and back it up on a daily basis. Also some times they are not connected into the network so a local copy of the said information needs to be copied to the local machine. ...Show All
Visual C# Call Method by Name
How do you call(inside the class itself) a method of a class using its string name Something like: for(n=0; n<10; n++) {"MyMethod" + n} Cool! The J# assembly vjslib.dll has some neato stuff as well. Highlights I see are java.math.BigInteger and BigDecimal for arbitrary precision arithmetic, java.util.Random for advanced random number generation and java.util.zip.ZipFile to handle .zip archives... ...Show All
Windows Forms Minimum Height for Form?
I can't seem to get a form of mine to draw at a height of 16 pixels. It always seems to add on an extra 16, I have FormBorderStyle set to None, not sure what's causing this I can't reproduce this either. The only restriction I see looking at the code is the MinimumSize property, make sure it is still set to 0,0. Other than that, Windows controls the minimum window size too. Look at the value returned for SM_CYMIN by the GetSystemMetrics() API function. Paul DiLascia mentions this in one of his MSDN journal columns ... ...Show All
Visual Basic please help with date problem
Hi I use 2 datetimepicker in my form and my insert look like this "INSERT Into kursusplan ( startdato , slutdato ) VALUES (" & Me .Date_start.Value & " , " & Me .Date_slut.Value & " )" But it is not the right date i get into my SQL DB all the dates are in year 1894 I use dk format in my DB like dd-mm-yyyy Can seomeone help Alvin Hi Alvin, I would appreciate if you could describe how you solved this problem as i am experiencing similar difficulties. (I have tried several formatting options). Regards in advance AndyJ ...Show All
Visual C++ Can't run file on other comp, what gives?
So i codded a program in Visual Basic 2005 when they told me it would be better in C++ because i will not have to have the user to require .NET Framework so i created it in C++ and now when i try to open it in my Virtual PC which has a freshly install xp installion with no updates or framework i get it will not open it and says something about the configuration is incorrect. I used Panels, WMP, Web Browser, Drop-down box, and Linkboxes in the this program. What can i do to fix this Panels WebBrowser This sounds like you did a Windows Forms Application in C++. This still needs the .NET Framework. You need a Win32 Project or MFC Application to not have a dependency on .NET Framework. ...Show All
