muratboy31 Posted June 9, 2015 Share Posted June 9, 2015 Merhaba arkadaşlar, nedense formu köşeden kapattığımda görev çubuğuna gidiyor ve çift tıklama da form yine ekrna geliyor... ama minimize ettiğimde form başlat çubuğunda açılıyor ama ekrana gelmiyor, bunun sebebi nedir ? private void notifyIcon1_DoubleClick(object sender, EventArgs e) { Show(); } private void Form1_FormClosing(object sender, FormClosingEventArgs e) { if (e.CloseReason == CloseReason.UserClosing) { e.Cancel = true; notifyIcon1.BalloonTipText = "Program simge haline dönüştürüldü..."; notifyIcon1.ShowBalloonTip(5); Hide(); } } private void Form1_Resize(object sender, EventArgs e) { if (FormWindowState.Minimized == WindowState) { notifyIcon1.BalloonTipText = "Program simge haline dönüştürüldü..."; notifyIcon1.ShowBalloonTip(5); Hide(); } } Quote Link to comment Share on other sites More sharing options...
KintaRo Posted June 9, 2015 Share Posted June 9, 2015 private void notifyIcon1_DoubleClick(object sender, EventArgs e) { this.WindowState = FormWindowState.Normal; Show(); } böyle bir denesen? Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted June 9, 2015 Author Share Posted June 9, 2015 Olmadı, ayrıca bu formu normal size a çeviriyor, minimize ettiğimde size daha büyük normalde... ama yine sorun devam ediyor ekrana öne gelmiyor form ! Quote Link to comment Share on other sites More sharing options...
KintaRo Posted June 9, 2015 Share Posted June 9, 2015 using System; using System.Drawing; using System.Windows.Forms; namespace notifyIconAPP { public partial class Form1 : Form { NotifyIcon MyIcon = new NotifyIcon(); public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { MyIcon.Icon = new Icon(Application.StartupPath + @"\icon.ico"); MyIcon.MouseDoubleClick += MyIcon_MouseDoubleClick; MyIcon.ContextMenuStrip = contextMenuStrip1; } private void Form1_FormClosing(object sender, FormClosingEventArgs e) { if (e.CloseReason == CloseReason.UserClosing) { e.Cancel = true; Hide(); MyIcon.Visible = true; MyIcon.Text = "NotifyIcon Denemesi"; MyIcon.BalloonTipTitle = "Program Çalışıyor"; MyIcon.BalloonTipText = "Program sağ alt köşede konumlandı."; MyIcon.BalloonTipIcon = ToolTipIcon.Info; MyIcon.ShowBalloonTip(30000); } } private void Form1_Resize(object sender, EventArgs e) { if (FormWindowState.Minimized == WindowState) { Hide(); MyIcon.Visible = true; MyIcon.Text = "NotifyIcon Denemesi"; MyIcon.BalloonTipTitle = "Program Çalışıyor"; MyIcon.BalloonTipText = "Program sağ alt köşede konumlandı."; MyIcon.BalloonTipIcon = ToolTipIcon.Info; MyIcon.ShowBalloonTip(30000); } } private void MyIcon_MouseDoubleClick(object sender, MouseEventArgs e) { Show(); MyIcon.Visible = false; } } } https://yadi.sk/d/nda8mPPOhAfQp Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted June 9, 2015 Author Share Posted June 9, 2015 teşekkürler KintaRo ancak yine aynı, hatta sorun bende mi diye başka pc de denedim olmadı... close dan geri dönünüce ekrana geliyor ama minimize dan geri dönünce ekrana gelmiyor sadece başlat çubuğunda kalıyor... Quote Link to comment Share on other sites More sharing options...
KintaRo Posted June 9, 2015 Share Posted June 9, 2015 Tamam şimdi anladım sorunu, Yukarı çıkmıyor form. MouseDC eventini şu şekilde düzenleyince bende gayet güzel çalıştı: private void MyIcon_MouseDoubleClick(object sender, MouseEventArgs e) { Show(); WindowState = FormWindowState.Normal; MyIcon.Visible = false; } Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted June 9, 2015 Editor Share Posted June 9, 2015 Application.OpenForms["Form1"].Show(); WindowState = FormWindowState.Maximized; notifyIcon1.Visible = false; Quote Link to comment Share on other sites More sharing options...
KintaRo Posted June 9, 2015 Share Posted June 9, 2015 geldi yine muhalefet <_< pairs; arkadaş formun boyutunu, minimize etmeden önceki haliyle istiyor. Senin kodun olmaz cınım. Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted June 9, 2015 Author Share Posted June 9, 2015 teşekkürler KintaRo kafayı kıracam valla yine aynı... Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted June 9, 2015 Editor Share Posted June 9, 2015 (edited) Formun boyutunu niye minimize edeyimki :D zaten minimize edicek el ile :D Hem ben o kodları notify nin double click ine yazsın diye verdim :D Edited June 9, 2015 by pairs Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted June 9, 2015 Author Share Posted June 9, 2015 Üstadlar olmadı yine... close dan dönüşte sorun yok ama minimize dan dönüşte form aşşağıda başlat çubuğunda kalıyor... acaba devexpress tarafıyla alakalı olabilir mi ? Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted June 9, 2015 Editor Share Posted June 9, 2015 Verdiğim kod çalışıyor istersen team ver bakalım. Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted June 9, 2015 Author Share Posted June 9, 2015 (edited) ammyy verebilirim, olur mu ? PM attım... teşekkürler pairs Edited June 9, 2015 by muratboy31 Quote Link to comment Share on other sites More sharing options...
KintaRo Posted June 9, 2015 Share Posted June 9, 2015 olmadıysa bana ver team'i merak ettim nasıl olmuyormuş Quote Link to comment Share on other sites More sharing options...
muratboy31 Posted June 9, 2015 Author Share Posted June 9, 2015 oldu, pairs bağlandı ; aşağıdaki gibi değişiklik yapınca oldu... FormWindowState fState = FormWindowState.Normal; private void Form1_Resize(object sender, EventArgs e) { if (FormWindowState.Minimized == WindowState) { Hide(); MyIcon.Visible = true; MyIcon.Text = "Program Görev Çubuğunda Çalışıyor."; MyIcon.BalloonTipTitle = "Açmak İçin Çift Tıklayınız."; MyIcon.BalloonTipText = "Program sağ alt köşede konumlandı."; MyIcon.BalloonTipIcon = ToolTipIcon.Info; MyIcon.ShowBalloonTip(30000); } else { fState = WindowState; } } 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.