|
tal- wrote:
I'm probably a newbie.. but still.. that doesnt mean I'm an idiot..
If every newbie is an idiot ,so no one was going to be profressional in the programming ,right?;)
|
|
|
|
|
tal- wrote:
no... but i'm looking for more options..
You won't find any better.
tal- wrote:
how can i do it ? i didnt understand this step...
It looks to me like a command you need to run in the SQL Server query analyser. Start it up, select your database, and then type that into a window and execute it.
tal- wrote:
and yes, I'm probably a newbie.. but still.. that doesnt mean I'm an idiot..
I don't think either of us were trying to call you an idiot, just to get to the bottom of the problem so we could offer some advice.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I thought you were sarcasm.... anyway, thanks..
|
|
|
|
|
No worries, glad to help. One problem with web forums is that it can be hard to judge peoples intentions at times. I should use more smileys.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
yeap
|
|
|
|
|
You understood me wrong ,no?
|
|
|
|
|
Has anyone encountered the problem with FileStream inserting a carriage return into an input stream? I am reading a partially binary file which contains a character x0A somewhere in the middle of the file. There is no x0D associated with it. The stream provided by FileStream contains a x0D character which FileStream has apparently inserted in front of the x0A character.
Any idea whether this is a bug or designed behavior which I don't understand?
Allen Gleazer
|
|
|
|
|
|
I know what x0D is.
The question is: does FileStream actually corrupt in incoming data file by adding this extra character to the stream?
Allen Gleazer
|
|
|
|
|
Depends How you use it. If you use command from BinaryReader ReadBytes, Then incoming data will not be corupted.
Below is C++ Sample for copying File, I have tried about 1MB of File, and it make 1:1 Copy. (No Difrence)
String *fileName1 = S"Old.Dat";<br />
String *fileName2 = S"New.Dat";<br />
FileStream *fsOld = new FileStream(fileName1, FileMode::Open);<br />
FileStream *fsNew = new FileStream(fileName2, FileMode::Create);<br />
<br />
BinaryReader *br = new BinaryReader(fsOld);<br />
BinaryWriter *bw = new BinaryWriter(fsNew);<br />
do <br />
{<br />
if (br->BaseStream->Length == br->BaseStream->Position)<br />
break;<br />
<br />
Byte q[] = br->ReadBytes(10);<br />
bw->Write(q);<br />
<br />
} while(true);<br />
br->Close();<br />
bw->Close();
|
|
|
|
|
That's what I thought, too, but when I used the ReadBytes method of the Binary Reader, it made no difference. Then, in debug mode I took a look at the input buffer of the FileStream object (before the data even gets to the reader) and saw that the extra x0D character had already been inserted in the FileStream buffer.
Did the the input data in your test contain an isolated x0A somewhere in the input data?
Allen Gleazer
|
|
|
|
|
I Have tried and it didn't inserted in the file.
How do you declare?
Can you put code sample?
|
|
|
|
|
This is realy realy late post. (A Year)
At that time, i didn't know what can be wrong, but i have recently have some simular problem. I found this post when i was cleaning my e-mail box.
StreamReader ^sr = gcnew StreamReader(File::OpenRead("test.txt"), Encoding::Default);
Encoding::Default is using windows default setting. If you don't specificy the encoding it will use UTF7 encoding by default.
|
|
|
|
|
Hi,
I am speccing an application that requires a listbox control whose rows contain other (output-only) controls; namely a static image, a drawn image (i.e. can't be in a file), a progress bar and some plain text. Something like:
#pic# < Image > [---Bar-- ] Text<br />
All in one row, with different controls simultaneously visible in other rows.
I know it is possible to OwnerDraw all this from scratch.
Is it possible to build it up using existing other controls, esp. the progressbar control.
Any thoughts?
Ruth
|
|
|
|
|
|
Thanks for the link: it was useful.
Do you suggest the DataGrid because you know the ListBox cannott do what I want?
|
|
|
|
|
I am glad that you found the link useful. I certainly found it to be an interesting article. I have seen the ListBox control customised but not to the extent that you require. The DataGrid control was built with extensibility in mind whereas the ListBox control was always meant to be a simple control for simple situations.
Perhaps it is possible to do what you are asking with the ListBox control but I am not sure how you would go about it. I would personally stick with a method that is well documented and that is easier to find help for if you run into problems.
|
|
|
|
|
Hi,
I have the following problem and I would appreciate any help on it.
I want to create an OCX in unmanaged side and I would like to use/access a .NET component from it. Say the component want to access is a .NET control like a grid. Don't I need to specify to transfer the information about the parent window of the gridcontrol, which is my ActiveX window? How can I do this? How can I pass a window handle to the gridcontrol?
Please help.
Thanks a lot.
|
|
|
|
|
I have Visual Studio 2002 installed and would like to install VS 2003 on the same machine. I don’t want any old project-files from VS 2002 to be changed.
Is this possible or must VS 2002 bee uninstalled before?
_____________________________
...and justice for all
APe
|
|
|
|
|
sure you can...
it is the same (i think) as installing VStudio 2003 when you already had a Visual Studio 6...
when you try to open a project created with VS2002, just tell windows to "open with" ... visual Studio .NET 2002
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Ok. I'll do It in 2 days... Tnx
_____________________________
...and justice for all
APe
|
|
|
|
|
Hello, I am currently trying to develop a video game using .NET C++. The one thing I am having trouble with is when I move (with a Key_Down event) a pictureBox with an image set, there is always a lag, and thus a piece of the image's last position always appears. How would I get rid of this?? I had tried making it invisible, changing the pictureBox's location, then making it visible again, but that makes the image blink as it moves. Any help would be greatly appreciated. Thank you.
Michael
|
|
|
|
|
Hi,
in a video game you shouldn't use a picture box. Remove it and paint the bitmap yourself onto the form/control/whatever by overriding the Paint method (don't forget to call the base implementation) and calling e.Graphics.DrawImage. This should be by far faster than the picturebox.
|
|
|
|
|
Hey thanks, I tried that and it worked a lot better, however the image still jumps and is blurry as I move it. Would there be a way to get rid of that? I know that in java they use a buffering strategy, however I do not know how to do that in .NET C++. Thanks for the help so far.
Michael
|
|
|
|
|
(I'll use C# syntax as Im not very familiar with C++)
A simple double buffering can be enabled by adding this in the constructor of your form/control:
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);
Does your image have the correct size or do you resize it while painting? If it has already the correct size use the DrawImageUnscaled function. If not resize it somewhere in the beginning:
Bitmap resizedBitmap = new Bitmap(wantedWidth, wantedHeight);
Graphics g = Graphics.FromImage(resizedBitmap);
g.DrawImageUnscaled(oldBitmap, 0, 0, wantedWidth, wantedHeight);
g.Dispose();
EDIT: You should also search for 'double buffering' here on CodeProject. There are some articles which might be interesting for you.
|
|
|
|