|
Thank u Mr.Harvey
it worked 
|
|
|
|
|
glad to have helped
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
|
You're not giving us a lot to work with in how you're doing it but sounds like it might be an order of operations issue. You draw your rectangle first and then the datagrid draws over it. That's why when you set it to invisible, it doesn't tromp all over your rectangle.
If you don't have the data, you're just another a**hole with an opinion.
|
|
|
|
|
I want to impliment radial layout tree. is it fesible on C# form?
and how?
|
|
|
|
|
Sohial A Rana wrote: I want to impliment radial layout tree. is it fesible on C# form?
Yup!
Sohial A Rana wrote: and how?
With code!
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
Hi everyone,
I dont know is this correct forum for ask this question or no?
How can I make plugin for photoshop
|
|
|
|
|
|
Thanks for your links. 
|
|
|
|
|
Hi Group,
I have a little app that loads a PNG image (128x128x32), and draws it to another canvas, with scaling. The destination size is 512x512, and, using VB.net, I use the commands (g is a graphics Canvas)
g.FillRectangle(Brushes.White, New Rectangle(0, 0, 512, 512))
g.DrawImage(Img, 0, 0, 512, 512)
However, the image drawn to the canvas is more like 560x560 pixels.
Does anyone know why this is happening? The source image is definately 128x128, and is 72dpi... although this shouldnt affect anything... should it?
Thanks,
Jason
|
|
|
|
|
How about trying DrawImageUnscaled?
|
|
|
|
|
Hi Leppie,
That wont work - I need the image scaling.
Looking around a bit, I think that GDI+ is being too clever. I noticed that the PNGs that didnt work well had a different Dots-per-inch setting to ones that did.
So, I suppose I aught to amend my question to say how do I get GDI+ to ignore these values, and simply do what I asked of it - scale a bitmap to fit a rectangle
thanks
Jason
|
|
|
|
|
I don't htink GDI+ does anything with DPI. You can set DPI in code tho, if you need to try that.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
Am in a windows application(C#) where i need to rotate,move,pan for the loaded DWG file through "CODE".Is that possible??
Priya
|
|
|
|
|
I just posted this in the VB group, but then realized that this is most likely the proper place to post my question. Here it goes:
I have opened an image as a bitmap using GDI+. Before I save it I want to know if the image has transparency in it. That is; is there any pixels in the bitmap that has the transparent color? I have made a solution that looks like this:
Dim objImage As Drawing.Bitmap = Drawing.Image.FromFile("png_with_transparent_bg.png")
Dim booTransparentColorFound As Boolean = False
If Bitmap.IsAlphaPixelFormat(objImage.PixelFormat) Then
For y As Integer = 0 To objImage.Height - 1
If booTransparentColorFound Then Exit For
For x As Integer = 0 To objImage.Width - 1
Dim objColor As Drawing.Color = objImage.GetPixel(x, y)
If objColor.A = Color.Transparent.A And _
objColor.R = Color.Transparent.R And _
objColor.G = Color.Transparent.G And _
objColor.B = Color.Transparent.B _
Then
booTransparentColorFound = True
Exit For
End If
Next
Next
End If
The problem is that if the image is very big, and there is no transparent pixel in it (or a transparent pixel is located in the lower right corner), the routine is very slow. Is there some quicker way to determine if there is transparency in the image?
Thanks in advance.
...Allan, Denmark
|
|
|
|
|
There are two things you could do (first way will not speed up the processing but is just a method improvement):
1) Only need to check the alpha channel (assuming any transparent colour is counted)...
If objColor.A != 255 Then ...
(As the alpha channel IS the 'trasparency' aspect of the colour, you only need to check this).
2) Lock the Bitmap and loop through the raw data (this is REALLY fast)... loads of examples on web... from msdn[^]
Also... if all you want to know is if the image could contain transparency... check the PixelFormat of the bitmap for transparency.
Hope this helps.
Matthew Butler
|
|
|
|
|
You will have to use C# and go unsafe for better performance.
|
|
|
|
|
Hi all,
i make one application in which i have one picturebox and i want to make picturebox mirror vertically. so image is displayed mirror vertically. so is there any methode or property available for this situation ?
Thanks in advance ..
Rana Krishnraj
|
|
|
|
|
Before you load the PictureBox with the image...
theImage.RotateFlip(RotateFlipType.RotateNoneFlipY);
Hope this helps.
Matthew Butler
|
|
|
|
|
hi Matthew,
Thanks for replying.. Its a perfect solution
Rana Krishnraj
|
|
|
|
|
hi
it dosent work for an image that captured by BitBlt?!!!
what should i do if i want to mirror this image(a BitBlt image)?
و این منم زنی تنها در آستانه فصلی سرد...
|
|
|
|
|
i fix that!
System.IntPtr srcDC = GetDC(f.Handle);<br />
Bitmap bmp = new Bitmap(50, f.Height + 30);<br />
Graphics g = Graphics.FromImage(bmp);<br />
System.IntPtr bmDC = g.GetHdc();<br />
BitBlt(bmDC, 0, 0, 50, bmp.Height, srcDC, r, -30, 0x00CC0020 );<br />
r += 10;<br />
ReleaseDC(f.Handle, srcDC);<br />
g.ReleaseHdc(bmDC);<br />
g.Dispose();<br />
<br />
Image img;<br />
img = bmp;<br />
img.RotateFlip(RotateFlipType.RotateNoneFlipX);<br />
f3.pictureBox1.Image = img;
i should set bitmaps width to 50!(because my pixtureboxs width and actually my last images width is 50);
tnx.
و این منم زنی تنها در آستانه فصلی سرد...
|
|
|
|
|
Alan Simes did the port. Is it avaialable anywhere?
|
|
|
|
|
seriously, try looking here:[^]
Learn to write self marginalizing code!
Call 1-888-BAD-CODE
------------------
Silver member by constant and unflinching longevity.
|
|
|
|
|
I did try using google. All the links I found are no longer functioning.
|
|
|
|