|
Please check what Luc has pointed out and also it behavior on Win2K. Take a look at the messages posted for the article.
|
|
|
|
|
You do know that the hard disk serial number changes when it's reformatted, right?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I not mean like that, I mean get the HDD serial that has on the HDD.
Socheat
|
|
|
|
|
Some properties, in controls, like Font , ForeColor etc. that automatically pick up their value from their parent control have a special name in .Net I thought they were called Foundation Properties but I cannot find any reference to that.
Would someone please help a chap whos few remaining brain cells are becoming weaker by the day.
WTF are they called?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Ambient,that is unless my memory is going too!
Alan.
|
|
|
|
|
Thanks a bunch!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Good People,
I have a quick question. The Infragistics graphing controls (for WPF) come in two flavors - signed assemblies and unsigned assemblies. What is the difference?
Also, I am working on an application that will be sold to the general public, should I use signed or unsigned graphing assemblies? Which one is better?
Thanks,
BP
|
|
|
|
|
Check this: http://www.morganskinner.com/Articles/StrongNameIdentityPermission
|
|
|
|
|
Signed. Always protect your customers and yourself to the fullest extent possible. Also, use an obfuscation tool.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hello,
I am trying to build an application where I can navigate through a series of images (either forward or backward). For example, if the "forward" button is pressed, the current displayed image is collapsed and the next image will be displayed. In my application, the image control names for these images are: Image1, Image2, Image3, etc.
I currently have over 150 images that I am trying to manipulate. I'd like to find a way to use a string or char array to refer to the image control name. So far I have no luck as I am not very familiar with C#. I copied below a snippet of what I am trying to do:
private void ShowPreviousImage()
{
//proceed backward to show the previous image
string currentImage;
string nextImage;
char [] buf;
if (imagePosition > 0) //imagePosition is the index of the image that is currently displayed
{
currentImage = "image" + imagePosition;
nextImage = "image" + (imagePosition -1);
buf = currentImage.ToCharArray();
buf.Visibility = System.Windows.Visibility.Collapsed;
//Error generated: ‘System.Array’ doesnot contain a definition for ‘Visibility’ and no extension
//method ‘Visibility’ accepting a first argument of type ‘System.Array’ could be found…
//Same thing I get when I use the original string as shown below
currentImage.Visibility = System.Windows.Visibility.Collapsed;
//Error generated ‘String’ doesnot contain a definition for ‘Visibility’ and no extension
//method ‘Visibility’ accepting a first argument of type ‘System.Array’ could be found…
imagePosition--;
}
}
Any help will be appreciated.
Regards,
|
|
|
|
|
This sounds like a disaster. You can iterate over the controls collection and find the control with a given name, or you can create a Dictionary of names to control references.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Where I think you are getting confused is the ToCharArray() method.
This is a method of the string class, and what it does is to return the string calling it as an array of characters. I does not convert an image into an array.
The fields currentImage and nextImage , that you are using are strings representing a name that you have assigned to an image. They do not point to the image in any way.
Look up, either in MSDN or Google, 'List<t>' or 'ArrayList' and learn how to create a list of images, or better, since that would take up a lot of memory, a list of file names.
Then use your imagePosition field to index into that list.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks for the reply,
The currentImage and nextImage are supposed to be strings that represent the name of the current image and next respectively. Maybe I should use something like currentImageIndx and nextImageIndx to be clear next time.
Anyways, I am not trying to save or convert the images in any how. I just want to be able use the string or char_array value as the image name.
Sorry for any confusion.
|
|
|
|
|
I think that you are OK with just your existing index imagePosition . the thing is to use it to index into a list or array of some kind. You can still make the current and next names as you are doing, if you need to display those values somewhere, if not they are of no use.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Im using the split function to parse a text file. How do I detect the end of a line? I tried '\0' but it didnt work as chars cant be null.
|
|
|
|
|
How about Environment.NewLine ?
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
You can use Environment.Newline as mav suggested, or why not simply use File.ReadAllLines to read the file into an array of strings?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I have a class that returns a dataset,
csServices GetDataServices = new csServices();
gvServices.DataSource = GetDataServices.ServicesDS;
gvServices.DataMember = "tbl_Services";
all im doing is reading data, dont need to update etc..
Although my dataset (ServicesDS) returns 1 table and 6 columns,
i dont need to show all the columns in my gridview(gvServices),
how can I only show the columns I specifiy ie "ID", "Name"?
Following on.. should I be ref to a dataset or datatable,
pros, cons?
thanks
|
|
|
|
|
You're not telling which GridView you're using, web control, WPF etc?
Anyway, most gridviews work in a way that if you don't add columns to it before you bind the data, all columns are added automatically. So you should create the necessary columns beforehand either in code or in designer.
|
|
|
|
|
|
If you're using DataGridView, then you could use for example DataGridViewColumnCollection.Add Method [^] to add desired column to the DataGridView before you bind the data (or add the columns in designer).
|
|
|
|
|
I use 2 methods
limit the columns selected from the database, this gets rid of useless columns
set the column. visible = false - this hides the columns that are required but do not need to be seen by the user (id column)
You can still access the data in a non visible column
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello,
I'm trying to retrieve the columns from an Oracle 9i database using OdbcConnection class's getSchema method. While I can retrieve the tables and views just fine with getSchema("tables"), everytime I call getSchema("columns") I get a System.FormatException with message "Input string was not in a correct format".
I've tried various combinations of the schema string, such as "Columns", "COLUMNS", etc.
Thanks in advance.
Reference: http://msdn.microsoft.com/en-us/library/cc668760.aspx[^]
|
|
|
|
|
The GetSchema functionality depends on the ODBC driver. Are you using Microsoft's Oracle ODBC driver and if not, could you test GetSchema using that driver?
|
|
|
|
|
I was unable to configure Microsoft's ODBC Oracle driver successfully with the database, so I'm using Oracle's 9i driver. Thanks for the reply.
|
|
|
|