|
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
|
|
|
|
|
tmp0 wrote: Do you guys know of any other library?
BTsharp[^]
|
|
|
|
|
|
Thanks Dave,
seems like exactly what I wanted.
|
|
|
|
|
Do you know of any other library?
|
|
|
|
|
If I did, I would have mentioned it.
|
|
|
|
|
Hi,
I have just installed the visual studio 2005 , previously i was using the VS 2003 .. I have some projects that use the sql server database.. How can I use the previously created database in SqlServer Desktop Edition in the Sql Server 2005 Express Edition?
regards.
Q@!$3r
|
|
|
|
|
what is the default login for sql server Express Edition?
Q@!$3r
|
|
|
|
|
i'm not sure what the admin password is but a windows admin on the box should be able to change it.
I don't think the old tools work on the new server version, go and get SQL Server Management Studio Express. You'll soon learn that when it comes to admin tools Newer is not always better if you didn't know that already
I'm not sure how you upgrade from 2k3 to 2k5 but i guess backup from one and restore to the other will work.
Russell
|
|
|
|
|
Hi!
im working on GSMComm library which manages SMS related tasks in GSM mobiles.
im not able to connect to mobile through DKU-5 cable, following execption is ocourred...
"A call to PInvoke function 'RS232!RS232.Rs232::EscapeCommFunction' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature."
plz tell me wats the reason of this error. is it a mobile fault or im missing sumthng...
Thanks
Affan Ahmad Toor
|
|
|
|
|
Hi,
Question... When i get my screensaver process, using getprocessbyname()
and then want to get the MainwindowHandle of it it alwas returns zero.
Anyone any idea why this is? even a screensaver has a form created..as main (for as far i can see in my screensaver code.)
I have found that when UseShellExecution is true, the function is not available and returns zero. And yes it is true, but why?
renaming the extension scr to exe and starting it manually gives the same problem..
thx
Kurt
|
|
|
|
|
hi every body,
me facing an problem in making a form as child form of mdi form.
on the click event of button in mdi form
i am able to create child from using
form1.MdiParent = this;
form1.show();
but me want to make (form2 as) child form on the click event of button in form1(form1 is already child form )
which i m unable to do.
Please help
Regards
rahul saini
|
|
|
|
|
Let me clearly firstly..
Form1 is a Child Form. You wanna make form2 as a child form of Form1.
eg: MDIMainForm -> Form1 (also MDI) -> Form2
Is it like that you wanna do??
AFAIK, it's impossible to do like that.. Sorry..
|
|
|
|
|
hi
thanks for rplying me,
then can u suggest me another sollution,
i hav three form
1) mdiForm
2) form1 this is child form of mdiForm
3) form2 which i want to make childForm of mdiForm
but condition is dat form2 should be shown on the click event of an button which is in form1.
Regards:
waiting 4 rply
rahul saini
|
|
|
|
|
Inside the click event handler try the following:
Form2 form2 = new Form2();
form2.MdiParent = this.MdiParent;
form2.Show();
"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,
i guess you have to use an event in form1 that invokes a methode on your mainform.
in this methode you can create your second form.
another way is making the mainform available in the form1. for example override the contructor of form1 with extra parameter that makes the mainform available as owner object.
i prefer the first solution
greetz
Kurt
|
|
|
|
|
hi
thanks again
i hav create these form already
only the issue is to call form2 in the mdiForm
i hav used this
on the load event of mdiForm
i hav made the form1 and form2 its child with following code:
form1 objForm1 = new form1();
objForm1.mdiParent = this;
form2 objForm2 = new form2();
objForm2.mdiParent = this;
then on click event of button in mdiForm form1 is opening in mdiForm
but when i tried to open form2 on the click event on button in form1
then it opening as new form not as Child form.
REGARDS
rahul saini
|
|
|
|
|
Your form declaration should be in the class, not in the onload.
but probably you have declared a new variable form2 in your form1
make an event in form1.. wich is called in your buttonClick.
public delegate void OnCreateForm2()
public event OnCreateForm2 OnCreateForm2Event
in the buttonclick call the event
if (OnCreateForm2Event != null)
OnCreateForm2Event()
assign the event in your mainform where you created it.
objForm1 = new form1();
objForm1.mdiParent = this;
objForm1.OnCreateForm2Event += OnCreateform2eventinMain
OnCreateform2eventinMain is a method in your mainform where you put the code
public void OnCreateform2eventinMain()
{
objForm2 = new form2();
objForm2.mdiParent = this;
}
this should do...
greetz
kurt
|
|
|
|