|
Green Fuze wrote:
as far as I know there is none.
None what ?
|
|
|
|
|
I have a comma seperated string that I need to be seperated and put into a ArrayList. The string looks like the following:
,-75.91067,45.31986,75.91067 West,45.31986 North,Peter- IT Development,0404000045,{233423},SMTP,27/05/2005 5:20:00 PM,27/05/2005 5:20:07 PM,27/05/2005 17:20:07,Sensors.xml,Y,0,0,0,0,0,0,00000000,01000000,Previous: 0 Current: 0,Previous: 0 Current:1,Previous: 0 Current: 0,Good,0,Pending,Info,Info,,;,
Thanks
|
|
|
|
|
ArrayList l = new ArrayList(myString.Split(','));
-- Rocky Dean Pulley
|
|
|
|
|
|
Hi, folks --
I did a ton of searching today on Google and searched The Code Project's forums but haven't been able to find an answer to this question yet. (Too much noise from related topics, I think.) But I *know* I ran across something on this topic a month ago or so...
Anyways, I'm writing an app that allows you to create graphs. So I'd like to create a small thumbnail of the graph and apply it to the File so that when the user is in a folder in Thumbnails view, the user can see a that thumbnail.
Can someone point me to an article, blog, or other posting with info on this topic?
Many thanks!
Anthony
|
|
|
|
|
Hi,
See this code
Image.GetThumbnailImageAbort myCallback =
new Image.GetThumbnailImageAbort(ThumbnailCallback);
Image img =Image.FromFile("d:\\tests.bmp");
Image tmpImg=img.GetThumbnailImage(20,20,myCallback,IntPtr.Zero);
Image myThumbnail = img.GetThumbnailImage(
40, 40, myCallback, IntPtr.Zero);
Upto here it is working fine
this.CreateGraphics().DrawImage(myThumbnail, 150, 75);
It is not drawing see this
|
|
|
|
|
Just to clarify...
I'm not asking how to create a thumbnail of any given image. Fortunately, there are a ton of resources out there on that topic.
I'm asking how to apply a "preview thumbnail" to a file so that when the user is browsing through his harddrive, he'll be able to see it without opening the file.
For example, create a drawing in Visio and save the file.
Now open the folder which contains the saved Visio document. Change the view style for the folder from "Details" (or "List" or whatever) to "Thumbnails". Instead of seeing the Visio file type icon representing the document, you'll actually see a "preview thumbnail" of the first tab's drawing in the folder.
Cool!
So how can we achieve the same effect?
Thanks!
Anthony
|
|
|
|
|
I'm writing a nic configuation app. I want to same each of my profiles for each card in an XML file. I'm looking at a program already written called SwitchNetConfig. I'm not quite sure how he's writting out the profiles. Can anyone suggest and easy XML class for writting out profiles to and XML file. Will XMLTextReader and XMLTextWriter work for me?
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
|
Thanks Marc,
I'll take a look at it. I'm new to C# so I may have questions. I am, however, finding C# to be a heck of a lot easier to work with than VC++.
Thanks again
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
Tom Wright wrote:
I'm new to C# so I may have questions.
Well, that's what we're here for!
Tom Wright wrote:
I am, however, finding C# to be a heck of a lot easier to work with than VC++.
Indeed. But there are times when I really miss C++. And sites like this[^] wouldn't need to exist if you could do everything with .NET that you can do with MFC or direct API calls.
Marc
My website
Latest Articles:
Undo/Redo Buffer
Memento Design Pattern
|
|
|
|
|
I need help with the following problem:
In the constructor of my form I call Application.EnableVisualStyles() to enable the Windows XP visual styles in my form; however, when the Alignment property of a tab control is set to either Left or Right, the text on the tab still shows as horizontal; therefore, only part of the first character in the tab text is visible.
|
|
|
|
|
One of the known bugs in the Tab control. This can be fixed quite easily by inheriting from the tab control, then only override the functionality of drawing a tab that is left- or right-aligned.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: The Secular Left, the Religious Right, and Prejudice
Judah Himango
|
|
|
|
|
Thanks Judah,
I verified in Microsoft's site and it is definitely a bug. Same problem occurs in Visual Studio 2005 Beta 2, so I guess I have no choice but to override drawing of Left/Right aligned.
Problem with overriding the painting of the control is that if it won't be able to paint the same control painted for users that have a fancy XPStyle applied set in their PC.
Regards,
Rudy.
|
|
|
|
|
rudy.net wrote:
Problem with overriding the painting of the control is that if it won't be able to paint the same control painted for users that have a fancy XPStyle applied set in their PC.
With .NET 2, you can. There is a System.Windows.Forms.VisualStyles namespace that allows you to draw themed controls, including tab controls. For .NET versions prior to 2.0, you can use one of the various wrappers around the UxTheme Win32 API (search CP for more info).
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: The Secular Left, the Religious Right, and Prejudice
Judah Himango
|
|
|
|
|
Cool, thanks for letting me know.
|
|
|
|
|
Hey everybody!
lets say I have a file with the following information:
string name: "StringName0" and its value is "Text0".
now, I want the user to enter more text but it will be saved under a different "StringName", but if I will try to serialize only the new text all I will have in my file is this:
"StringName1" and the value "Text1", without "StringName0" and "Text0", it will overwrite the old infomation, what I want to know if there is a way to add the new "StringName" while keeping the old one.
maybe I will explain my final goal and than maybe everything will be clearer.
I am trying to make a user list for my app, so a new user will enter his "Name", "UserName" and "Password".
and there will be a listbox that will contain all Names (so the users can choose themselves).
what I am trying to do is that when a new user will add himself, it will ADD the new info into the file without replacing the other users...
I am trying to work on this for a long time, and everytime I encounter new problems and I'm really close to give up, so PLEASE HELP ME!!!
Thanks in advance!
|
|
|
|
|
try to open the file with FileMode: FileMode.Append
-- Rocky Dean Pulley
|
|
|
|
|
my god! it works! Thank You!
it really saves again, but I have one more question to understand how exatcly should I load the information.
lets say that I'm saving every time using the same "StringName" and only the value changes. and as I saw using the Append it does not overwrite even if it is using the same "StringName", I want to know if there is anyway to load all the values even though all of them has the same StringName of must I create StringName0 and its value, StringName1 and its value, etc.
Thanks Alot!!!
|
|
|
|
|
I use ado.net as data source for crystal report,I wanted to dynamic changed DataSet to display filter data ,I use follow code ,but It can't work,Plz help me, Thanke u.
.............
try
{
if (comboBox1.Text == "All")
strSQL = "select * from authors";
else
strSQL = "select * from authors where state ='" + comboBox1.Text + "'";
cmd = new OleDbCommand("SELECT * FROM authors",cn);
adpter = new OleDbDataAdapter(cmd);
dataset = new DataSet("authors");
adpter.Fill(dataset,"authors");
oRpt.SetDataSource(dataset);
crView.ReportSource = oRpt;
}
catch(Exception err)
{
MessageBox.Show(err.Message);
}
.........
|
|
|
|
|
I'm not sure if you are getting the error message or if you are returning your resultset. Can you directly issue your SQL statement against the database and have it return results (note your use of single quote in your SQL statement)? If you cannot get results with the use of single quotes, which generally returns only CHAR, then try:
... where state = \"" + comboBox1.Text + "\""
|
|
|
|
|
I realy want to display different report by user select filter string .
|
|
|
|
|
Can somebody tell me where i can download Visual Studio.Net 2005 Beta. Please tell me whow knwo
|
|
|
|
|
|
|