muratboy31 Posted May 8, 2015 Share Posted May 8, 2015 Merhaba arkadaşlar, form üzerinde eklediğim picturebox ları rotate etmek istiyorum ancak bu windows form da mümkün müdür ? Quote Link to comment Share on other sites More sharing options...
KintaRo Posted May 8, 2015 Share Posted May 8, 2015 https://yadi.sk/d/twlnlvyBgW9MK Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted May 11, 2015 Author Share Posted May 11, 2015 Örnek için çok teşekürler Kintaro, bir sorum daha var; 90 yada 180 değilde belirli derece de nasıl döndürebilirim ? yane ben belirlemek istiyorum 25 yada 30 yada 32 gibi... Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted May 11, 2015 Editor Share Posted May 11, 2015 http://www.codeproject.com/Articles/58815/C-Image-PictureBox-Rotations Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted May 25, 2015 Author Share Posted May 25, 2015 (edited) cevap için teşekürler pairs bir sorum daha var, buton ile form üzerine picturebox ekleyip sonra bu picturebox ı mouse ile sürükleyebilir miyim ? ama aslında amacım birden fazla pixturebox ekleyebilmek ve hangisini mouse ile tutarsam onu sağa sola yada yukarı aşağıda sürükleyebilmek... Bu konuda yardımcı olabilir misiniz... Teşekürler Edited May 25, 2015 by muratboy31 Quote Link to comment Share on other sites More sharing options...
MehmetErdo287du Posted May 25, 2015 Share Posted May 25, 2015 (edited) PictureBox p1; p1 = new PictureBox(); p1.BackgroundImage = Devre_Cizim.Properties.Resources.Toprak; l1.Text = Cihaz + TSayac.ToString(); p1.Location = new Point(0, 13); p1.Size = new Size(105, 31); p1.SendToBack(); p1.Enabled = true; p1.SendToBack(); this.Controls.Add(p1); p1.MouseUp += new MouseEventHandler(Birak); p1.MouseDown += new MouseEventHandler(Sec); p1.MouseMove += new MouseEventHandler(Tasi); bool Durum = false; public void Sec(object sender, MouseEventArgs e) { Durum = true; Panel pnl = sender as Panel; pnl.Cursor = Cursors.SizeAll; } public void Tasi(object sender, MouseEventArgs e) { if (Durum) { Panel pnl = sender as Panel; pnl.Left = e.X + pnl.Left; pnl.Top = e.Y + pnl.Top; } } public void Birak(object sender, MouseEventArgs e) { Durum = false; Panel pnl = sender as Panel; pnl.Cursor = Cursors.Default; } Edited May 25, 2015 by MehmetErdo287du Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted May 25, 2015 Author Share Posted May 25, 2015 (edited) teşekkürler MehmetErdo287du denedim ama resim eklenmedi nedense ! http://www.megafileupload.com/19jv/picturebox_drag.rar Edited May 25, 2015 by muratboy31 Quote Link to comment Share on other sites More sharing options...
MehmetErdo287du Posted May 25, 2015 Share Posted May 25, 2015 (edited) teşekkürler MehmetErdo287du denedim ama resim eklenmedi nedense ! http://www.megafileupload.com/19jv/picturebox_drag.rar kodları düzenledim Panel yerine PictureBox yaz Edited May 25, 2015 by MehmetErdo287du Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted May 25, 2015 Author Share Posted May 25, 2015 nerde yanlış yapıyorum acaba ? using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace picturebox_drag { public partial class Form1 : Form { PictureBox p1; bool Durum = false; public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { p1 = new PictureBox(); p1.BackgroundImage = Properties.Resources.ar; // label1.Text = Cihaz + TSayac.ToString(); p1.Location = new Point(20, 13); p1.Size = new Size(105, 31); p1.SendToBack(); p1.Enabled = false; p1.SendToBack(); p1.MouseUp += new MouseEventHandler(Birak); p1.MouseDown += new MouseEventHandler(Sec); p1.MouseMove += new MouseEventHandler(Tasi); this.Controls.Add(p1); } public void Sec(object sender, MouseEventArgs e) { Durum = true; PictureBox pnl = sender as PictureBox; pnl.Cursor = Cursors.SizeAll; } public void Tasi(object sender, MouseEventArgs e) { if (Durum) { PictureBox pnl = sender as PictureBox; pnl.Left = e.X + pnl.Left; pnl.Top = e.Y + pnl.Top; } } public void Birak(object sender, MouseEventArgs e) { Durum = false; PictureBox pnl = sender as PictureBox; pnl.Cursor = Cursors.Default; } } } Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted May 25, 2015 Author Share Posted May 25, 2015 (edited) Teşekkürler MehmetErdo287du, bunları hep p1 diye ekliyor, peki bunlardan birini silmek istediğimde hangisi olduğunu nasıl yapabilirim ? Edited May 25, 2015 by muratboy31 Quote Link to comment Share on other sites More sharing options...
MehmetErdo287du Posted May 25, 2015 Share Posted May 25, 2015 (edited) Teşekkürler MehmetErdo287du, bunları hep p1 diye ekliyor, peki bunlardan birini silmek istediğimde hangisi olduğunu nasıl yapabilirim ? silme işini mouse sağ click olaylarında kod yazıp visible = false yapabilirsin. fakat program hafızasından nasıl yapılır bilmiyorum mesela p1.Mousedoubleclick += new MouseEventHandler(Sil); this.Controls.Add(p1); } public void Sil(object sender, MouseEventArgs e) { PictureBox pnl = sender as PictureBox; pnl.visible = false; } resim döndürme yardımcı olabilir Bitmap Resim = (Bitmap)p1.BackgroundImage; Resim.RotateFlip(RotateFlipType.Rotate90FlipXY); p1.BackgroundImage = Resim; Edited May 25, 2015 by MehmetErdo287du Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted May 25, 2015 Author Share Posted May 25, 2015 Peki resmin köşelerine seçildiğidinde küçük kutucuklar eklemek mümkün müdür ? çevirme ve seçili olanı görme imkanı sağlar. aşağıdaki gibi ; Quote Link to comment Share on other sites More sharing options...
MehmetErdo287du Posted May 25, 2015 Share Posted May 25, 2015 fazla bilgi ücrete dahil :D espiri bi yana final sınavlarım var. zamanım yok kb Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.