|
Ok, just tried it on my 2k box and it is missing the thumbnail data. I think this qualifies for bug material.
Can anyone confirm what happens on 98/ME/NT4/XP Home? Follow the directions in this post.
James
|
|
|
|
|
Running winver I get :windows 2000 ver 5.0(build 2195: Service Pack 2)
.net framework: ver 1.0.3705.
No thumbnails.
|
|
|
|
|
On NT 4.0 sp6a there are no thumbnails either.
|
|
|
|
|
Erick Ellis (MS) suggested installing this QFE.
Backup the gdiplus.dll in your %WINDIR%\Microsoft.NET\v1.0.3705\ .
Now since the QFE is made for Windows XP you'll need to use Winzip to extract the files. Then place the new gdiplus.dll in the v1.0.3705 directory.
I'm hoping this is just a temporary fix until the updated gdiplus.dll is included with .NET SP2.
James
|
|
|
|
|
That worked on my NT system here at work.
Thanks for your help.
David
|
|
|
|
|
I'm not sure why these functions were not included in the .NET release, they seem pretty important to me. They may be posted elsewhere, but I couldn't find them. I coded up these two functions (in C#), which I think should be public knowledge and this is the best place I could think of to post them. If you have any feedback, please reply.
---
// Time as represented by 32 (unsigned) bits is generally
// the number of seconds since midnight 01/01/1900.
// 1 tick = 100 nanoseconds ... 1 second = 10,000,000 ticks
static void ConvertInt32ToDateTime(UInt32 time32Bit, out DateTime time64bit)
{
// Convert an UInt32 representing seconds to an
// Int64 representing Timespan ticks
Int64 tempTimeSpan = Convert.ToInt64(time32Bit) * 10000000;
TimeSpan time32BitAsTimeSpan = new TimeSpan(tempTimeSpan);
DateTime baseTime32Bit = new DateTime(1900, 1, 1, 0, 0, 0);
time64bit = baseTime32Bit + time32BitAsTimeSpan;
}
static void ConvertDateTimeToInt32(DateTime time64bit, out UInt32 time32Bit)
{
DateTime baseTime32Bit = new DateTime(1900, 1, 1, 0, 0, 0);
TimeSpan time32BitAsTimeSpan = time64bit - baseTime32Bit;
time32Bit = Convert.ToUInt32(time32BitAsTimeSpan.TotalSeconds);
}
---
Thanks.
-Michael M
|
|
|
|
|
Hi,
This may be very easy question but i am new to c#.
I want to read the file from start to end line by line,my code is:
FileStream myFileStream = new FileStream("temp.txt" , FileMode.Open , FileAccess.Read);
myFileStream.Seek(0, SeekOrigin.Begin);
StreamReader myReader = new StreamReader(myFileStream);
while(??)
{
myReader.ReadLine();
}
What is the equivalent of EOF here.I want to read each line upto the End of File is reached,how should i do that?
Thanx n Regards
Tushar
|
|
|
|
|
I've not test this,but I think thats what you want.(its from MSDN)
StreamReader srReadLine = new StreamReader(
(System.IO.Stream)File.OpenRead("C:\\Temp\\Test.txt"),
System.Text.Encoding.ASCII);
srReadLine.BaseStream.Seek(0, SeekOrigin.Begin);
while (srReadLine.Peek() > -1) {
Console.WriteLine(srReadLine.ReadLine());
}
srReadLine.Close();
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
Tushar mahajan wrote:
while(??)
{
myReader.ReadLine();
}
change that code to:
string line = "";
while(line != null)
{
if(line != null)
{
line = myReader.ReadLine();
}
}
When you reach the end of file ReadLine retunrns null
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C# and C++!
|
|
|
|
|
Isn't the if (line != null) superfluous ?
Crivo
Automated Credit Assessment
|
|
|
|
|
Nope, It will throw an exception if you don't check line if it's null.
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C# and C++!
|
|
|
|
|
That's not true. Probably, what you whant is this:
string line = "";
while(line != null)
{
line = myReader.ReadLine();
if(line != null)
{
}
}
Crivo
Automated Credit Assessment
|
|
|
|
|
Ofcourse will ReadLine not be inside the if statement!!
I did a little misstake there!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C# and C++!
|
|
|
|
|
I don't know about you, but I never made a program that worked in the 1st try. No matter how simple, sometimes it doesn't compile. If it compiles, it doesn't run.
Crivo
Automated Credit Assessment
|
|
|
|
|
You're right!
But I've done that stuff so that's why I -->
Bye!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C# and C++!
|
|
|
|
|
im trying to draw a line in autocad. i copied the code directly from the liteture. but i recived this error "undeclared identifier" here is my code
//
// ObjectARX defined commands
#include "StdAfx.h"
#include "StdArx.h"
// This is command 'CREATLINE'
void RBH1creatLine()
{
AcGePoint3d startPt (4.0, 2.0 ,0.0);
AcGePoint3d endPt (10.0, 7.0, 0.0);
AcDbLine *pLine = new AcDbLine (startPt, endPt);
AcDbBlockTable * pBlockTable;
acdbHostApplicationServices()->workingDatabase()->getSymbolTable( pBlockTable, AcDb::kForRead);
AcDbBlockTableRecord *pBlockTableRecord;
pBlockTable->getAt(ACDB_MODEL_SPACE, pBlockTableRecord, AcDb::kForWrite);
pBlockTable->close();
AcDbObjectId lineId;
pBlockTableRecord->appendAcDbEntity(lineId, pLine);
pBlockTableRecord->close();
pLine->close();
return lineId;
}
could you please give me a hand
Richard
|
|
|
|
|
You might try in the C++ forum, instead of the C# forum
What identifier is undeclared?
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Hi all
I have the following line of code
System.Array myValues = (System.Array)range.Cells.Value;
how can I convert the myValues array to string array?????
Thanks in Advance
|
|
|
|
|
Have you tried this:
System.Array myValues = (System.Array)range.Cells.Value;
myValues = (string [])myValues;
Nick Parker
|
|
|
|
|
yes Idid but it didn't work
What I did is I wrote a function that takes a System.Array variable as a parameter and returns a String[] array by converting the elements one by one.
it works but I would like to if there is a function to do that in one line of code.
|
|
|
|
|
JTJ should be lurking about, I'm sure he will have the answer. Good luck.
Nick Parker
|
|
|
|
|
string [] stringValues;
System.Array myValues = (System.Array)range.Cells.Value;
stringValues = new string[myValues.Length];
Array.Copy(myValues, stringValues, myValues.Length); That should work, let me know if it doesn't.
James
|
|
|
|
|
I didn't work. I got the following message
"The specified arrays must have the same number of dimensions."
cause the myValues is a 2 dimensional array.
when I replcaed the StringValues with 2 dimensional array
I got the following:
" At least one element in the source array could not be cast down to the destination array type."
this type is double data type.
I am still in this problem !!!!!!!!!!!!!!!
|
|
|
|
|
i want to have a dialog to get the directoryname that i choose.
i have already make one use DriveListBox, DirListBox and FileListBox.
code:
using Microsoft.VisualBasic.Compatibility.VB6;
using .........
namespace CustomerFolderDialog
{
public class FolderDialog : System.Windows.Forms.Form
{
....................
public string Path
{
get { return dirListBox1.Path; }
}
private string tempDrive;
……
public FolderDialog()
{
InitializeComponent();
tempDrive = this.driveListBox1.Drive;
}
……
private void driveListBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
try
{
this.dirListBox1.Path = this.driveListBox1.Drive;
tempDrive = this.driveListBox1.Drive;
}
catch(Exception ex)
{
MessageBox.Show(ex.Message,"Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
driveListBox1.Drive = tempDrive;
}
}
private void Form1_Load(object sender, System.EventArgs e)
{
this.label1.Text = dirListBox1.Path;
}
private void dirListBox1_Change(object sender, System.EventArgs e)
{
try
{
this.fileListBox1.Path = this.dirListBox1.Path;
this.label1.Text = dirListBox1.Path;
}
catch(Exception ex)
{
MessageBox.Show (ex.Message,"Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
}
}
}
}
but i don't like this.
i want its face like the "OpenFileDialog"
who can tell me how to it?
|
|
|
|
|
Hello everyone !!!
In so many applications, I have seen a button "Browse", which fires up a simple tree-based directory picker, a small pop-up window that allows a user to pick a directory and click either "OK" or "Cancel" buttons. There is a similar control in VB 6.0 called DirListBox.
However, I have not found anything like that in C# - and I thought that C# is great GUI language for Visual C++/MFC developers
Does anyone know ???
Thanks a lot in advance.
Kirill
|
|
|
|