|
You were already helped here:
<a href="http://www.codeproject.com/script/Forums/View.aspx?fid=1649&msg=2359437">http://www.codeproject.com/script/Forums/View.aspx?fid=1649&msg=2359437</a>[<a href="http://www.codeproject.com/script/Forums/View.aspx?fid=1649&msg=2359437" target="_blank" title="New Window">^</a>]
Do not post the same query multiple times in the discussion forums. Read <a href="http://www.codeproject.com/scrapbook/forumguidelines.asp">http://www.codeproject.com/scrapbook/forumguidelines.asp</a>[<a href="http://www.codeproject.com/scrapbook/forumguidelines.asp" target="_blank" title="New Window">^</a>] on forum posting guidelines.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
haibec wrote: I making a project about Shopping Cart by C# 2005. Pleaase tell me about a project free !
Sorry, I don't do anything for free when it comes to coding
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi all!
I making a project about Shopping Cart by C# 2005. Pleaase tell me about a project free !
Thank you
Hello
|
|
|
|
|
|
What did I just tell you? I don't do free projects. Try working it out yourself.
Don't cross post. It'll only piss people off.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi all!
I making a project about Shopping Cart by C# 2005. Pleaase tell me about a project free !
Thank you
Hello
|
|
|
|
|
|
Hi all,
Is there a way for checking the file size of a Bitmap without saving it to disk (using C#)?
Thanks in advance,
Danny
|
|
|
|
|
Wouldn't using a Temp File be more cleaner approach?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Vasudevan Deepak K wrote: Wouldn't using a Temp File be more cleaner approach?
Thanks for you quick response.
Yes it would, BUT, I'm trying to limit a Bitmap to a certain file size, say 50kb, so my solution was to loop through the bitmap's dimmensions, while each iteration is scaling the bitmap down.
Now, inside this loop, using IO-write to the disk would be pretty slow...
Any other idea?
Danny
|
|
|
|
|
Hi, some suggestions:
1. you could save in a memory stream and get its size
2. you could do a binary search, example: if original width is 128 try 64; if too small,
try (128+64)/2 = 96, else try (0+64)/2=32; repeat until you reach the optimal size.
3. the file size depends on the image format; some use compression, some don't.
for the ones that don't, the size is proportional to width*height; for those that use
compression, this is also true to some extent.
4. when scaling down the size, for best quality I suggest you always restart from the
original image.
|
|
|
|
|
Hey Luc,
I figured I can use a memory stream, that was my first try, before posting in this forum, but now I got it to work, I didn't understand the use of the ImageFormat, and now I do.
#4 is a great idea, and I've implemented it.
Thanks man.
Danny
|
|
|
|
|
|
Hi,
Can someone help me out to embedd an ocx as resource an actually use the code without registering it in the OS ?
a site, a doc, some tips or where to search, every hint is welcome.
Thx
Kurt
|
|
|
|
|
I don't think you can use an ocx without registering it.
|
|
|
|
|
Hi,
Don't you think it's possible to acces the code through the interface if you know the interface?
I thought the guid (registration) was needed to determine the interface and object location?
Thx.
|
|
|
|
|
the problem is that the desinger will look in the system for the OCX - implementation and I don't think that there is an easy way to change this
|
|
|
|
|
i don't need it in the designer only in runtime so a posibility could be using axhost or reflection to create it, but axhost still search the object using the guid, not on filename. And reflection uses filename but needs an assembly to load and create it. The ocx has no assembly info so i'm stuck there.
thx
|
|
|
|
|
I Have 2 classes and have some global variables i want to use those in both classes so what can i do..
shall i create a new class and inherit or need to define at both places...
and please reply for my earlier post also ...
Thanks alot...
T@SU
|
|
|
|
|
that depends on the situation.
Normaly if you can't solve the problem without "global" variables you define a static class with public variables and use this class in both of your classes.
Or you define an struct/class to hold the shared Data and pass a reference/instance of this data to both of your instances through the constructor.
Or you use public properties in your classes and link these (not recommendet - never do something like class1 calls class2.method and class2 calls class1.method - it's just not good design)
|
|
|
|
|
I think defining struct will help out me here... or i can define a static class that will hold my data ...
Thanks for your reply...
and i am stucked here ..in some VB code design can u help out me here...
as it is described in my earlier post
vikas da
|
|
|
|
|
hi, may i know what suppose to be the answer for the below code and its reason for it?
Int16 minValue=-32768;
Int16 maxValue=32767;
Int16 delta=2;
Int16 Value = (Int16)(minValue - delta)
Int16 Value = (Int16)(maxValue + delta)
Thanks in advance.
|
|
|
|
|
this looks like your homework - why don't you give a try?
|
|
|
|
|
it is not my homework, just something that i encounter while programming...i want to know how the adding and minus works....how can it be negative number when the delta is 1 and it is added to the max value?
|
|
|
|
|
ok, this is because the numbers are just a bunch of bits in memory (16 in your case) and the negative numbers are those starting (or ending with 1 - for example: (100101....) - so if you add a value and the result is bigger the max pos value the last 1 will be set and alas the value will be negative.
|
|
|
|