![]() |
|
Program dissapears - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: Visual Basic & .NET Framework (https://sinister.li/Forum-Visual-Basic-NET-Framework) +--- Thread: Program dissapears (/Thread-Program-dissapears) |
Program dissapears - BlueCat - 08-12-2014 I decided to get rid of the border and make it set to "None". and apply a picture box as it. Hence, setting the code to this. It dissapears when clicking on the custom border. Code: using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace The_spirit
{
public partial class Form1 : Form
{
int TogMove;
int MValX;
int MValY;
public Form1()
{
InitializeComponent();
}
private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
{
TogMove = 1;
MValX = e.X;
MValY = e.Y;
}
private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
{
TogMove = 0;
}
private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
{
if(TogMove==1)
{
this.SetDesktopLocation(MousePosition.X - MValX, MousePosition.Y - MValY);
}
}
}
}RE: Program dissapears - h3r0 - 08-12-2014 Do you have an events log dump that might be helpful. RE: Program dissapears - BlueCat - 08-12-2014 (08-12-2014, 08:24 PM)h3r0 Wrote: Do you have an events log dump that might be helpful. I fixed it. Never mind thread closed RE: Program dissapears - chmod - 08-13-2014 (08-12-2014, 08:58 PM)BlueCat Wrote:(08-12-2014, 08:24 PM)h3r0 Wrote: Do you have an events log dump that might be helpful. It would be useful to mention how you fixed it if someone else has the same problem they can check here and see the solution, which means you help someone else. RE: Program dissapears - chmod - 08-13-2014 (08-12-2014, 08:58 PM)BlueCat Wrote:(08-12-2014, 08:24 PM)h3r0 Wrote: Do you have an events log dump that might be helpful. It would be useful to mention how you fixed it if someone else has the same problem they can check here and see the solution, which means you help someone else. |