|
No I dont think soo!!!!! It can only clip the image to be drawn in a particular rectangle but u cant select a particular portion in the image for doin soo u have to select pixels frm the image...using Bitmapdata and locking the bitmap.......Ya do read christian Gauss image processing articles U ll get to know lot abt image processing.... BEST OF LUCK
|
|
|
|
|
i am using csharp and i am calling a dll that was written in vb 6 and one of its methods i call has a optional parameter how do i call this function without a parameter without throwing a compiler error
Thanks,
Chad Aiena
|
|
|
|
|
I've never tried this so I'm only really guessing here, but have you tried passing in null?
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
yes and it did not work
Thanks,
Chad Aiena
|
|
|
|
|
VC# if I am correct does not support optional parameters. Have you tried creating an empty object of the type the parameter is set to be. Or you could possibly import Microsoft.VisualBasic namespace and use the vbNull constant and use that.
What is the compiler error?
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Hi,
I havent done this (I am not actively using VB) but I guess you cannot really do it,
unless you cheat a little by inserting a code layer in C# that offers you two methods
(one with, one without the optional out parameter), and have them both call the VB code
WITH the out parameter present (one real, one dummy).
Luc Pattyn
|
|
|
|
|
Just pass "System.Reflection.Missing.Value" for the optional parameter.
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter, VB to C++ converter
Instant Python: C# to Python converter, VB to Python converter
|
|
|
|
|
if String is a class in .net then we donot use new operator with it.
as String objString=new String();
we almost did like this string newString="";
can anybody explain...
thanks
vishal
Thanks & Regards
Vishal Sharma
vishalsharma556@yahoo.co.in
|
|
|
|
|
VishalSharmaDev wrote: if String is a class in .net then we donot use new operator with it.
You can use the new operator with it. It has 8 overloads.
VishalSharmaDev wrote: as String objString=new String();
Not all classes have a default constructor (i.e. A constructor with no parameters)
VishalSharmaDev wrote: we almost did like this string newString="";
"this is a string literal" and that is how you represent string literals in C#. Just as 123 is how you represent an interger literal or true a Boolean literal and so on.
|
|
|
|
|
Hi,
strings are objects, just like Forms, Panels, Timers, etc.
Yes, you can create instances of them with new.
For ease of use, the compiler adds some goodies, such as (not complete!):
- you can create a new string by quoting some text, hence string s="hello"; is
a shorthand for sting s=new string(helloChars); where helloChars would be a char array
containing the right characters.
- you can use a string and a set of string constants as a switch variable and its case values
(does not work for objects in general, switch requires some integer or a string)
- you get improved performance when using string expressions (e.g. "aha"+"yep"+"waw"
will get highly optimized).
- and probably many more.
Luc Pattyn
|
|
|
|
|
hi all,
I have an application which has a groupbox contained in a window. I want to resize the groupbox when the window is resized.
When i anchor the groupbox to the bottom of the window, it shrinks to almost half its size while blank space is displayed corresponding to its actual size.
Any solutions to this problem?
|
|
|
|
|
Can i make the entire line got highlighted when go to that line .
e g:
if u click the error line in log window as it is highlighting the entire line .
Thank You
|
|
|
|
|
hiremath71 wrote: Can i make the entire line got highlighted when go to that line .
What do you mean by that? Why type of control are you talking about. There are a number of controls that have a property that allow you to highlight an entire line.
|
|
|
|
|
hi,
i have created a editor a using a RichTextBox Control and i have implemented a go to functionality .
I wanted to highlight a entire line when go to that line.
E g:
when u compile a program if any compilation error occures if u click that line from log window that will take to the corresponding line where the error was occured.
Help me
Thank u
|
|
|
|
|
If you are using a RichTextBox and already moved the SelectionStart to the beginning of the line to be selected then the following should work:
richTextBox.SelectionLength = SelectionLength.Lines[lineNumber].Length;
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
hi,
thank u for u r response but i am not getting after i.e
RchtxtBx.SelectionLength=Selection
After equal sign i am not getting the option of selectionLength.
Thank u
|
|
|
|
|
Ups, I meant:
richTextBox.SelectionLength = richTextBox.Lines[lineNumber].Length;
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Thank you sir
it is working
With Regards
Prasad
|
|
|
|
|
i downloaded a code snippet from this site...the code snippet was to convert an rgb image to grayscale... i was able to understand the snippet but there is a line that is bothering me ... would any one plz explain it...
int offset=bitmapdata.stride-image.width*3;
i tried it on an image and found out that it returns the same as
int offset=image.width*3;
and yeah if bitmapdata.stride returns the scan width and image.width also returns the scan width then how come bitmapdata.stride-image.width*3 be equal to image.width*3.... plz help and yeah tell what bitmapdata.stride actually does....
haseeb
|
|
|
|
|
It is not the same! Stride is a scan width. If you have bitmap width 49 the bitmap.stride is 150 but your offset is 147. Of course if you use 24bpp colour format.
|
|
|
|
|
hello... sir... thanx for the reply... sir i still have a problem... for 49 width bitmap the scanwidth is 150... how come... it should be 147. how can it be 150? what is actually the offset... plz reply
haseeb
|
|
|
|
|
Sorry, my mistake, the scanwidth of 49 width (in pixles) picture is not a 150 but 148, but still is not a 147. All time we talk about 24bpp format, that means you have 1 byte per each component of RGB system. 3*49 is 147 but 147 is not a multiple of 4, 147 mod 4 is different than 0, the nearest number which is multiple of 4 is 148 (148 mod 4 = 0). I don't know exactly why, but is something with memory alocation.
|
|
|
|
|
i want to use a custom font in rich text box. How i will do that?
|
|
|
|
|
Hi,
I expect rtb.Font to define the default font (used when adding text),
and rtb.SelectionFont to set the font for the current selection (if any).
So if you want your one font for all text in the rtb, set rtb.Font before loading the rtb
with text; otherwise modify the font for (parts of) existing text by selecting and SelectionFont.
Luc Pattyn
|
|
|
|
|
Hello all,
I’m trying to implement a fairly simple bitTorrent client. A library would make my work much easier and until now I can only find FTKernelAPI (link). Do you guys know of any other library?
Thanks in advance,
Naimi
|
|
|
|