Click here to Skip to main content
15,887,135 members
Home / Discussions / C#
   

C#

 
GeneralRe: Interface structure Pin
Mycroft Holmes20-Oct-16 12:53
professionalMycroft Holmes20-Oct-16 12:53 
GeneralRe: Interface structure Pin
Eddy Vluggen21-Oct-16 0:37
professionalEddy Vluggen21-Oct-16 0:37 
GeneralRe: Interface structure Pin
Nathan Minier21-Oct-16 1:09
professionalNathan Minier21-Oct-16 1:09 
GeneralCan we use Azure Table as database in CRM application? Pin
amit singhniet18-Oct-16 23:11
amit singhniet18-Oct-16 23:11 
GeneralRe: Can we use Azure Table as database in CRM application? Pin
dan!sh 18-Oct-16 23:58
professional dan!sh 18-Oct-16 23:58 
GeneralRe: Can we use Azure Table as database in CRM application? Pin
amit singhniet19-Oct-16 1:35
amit singhniet19-Oct-16 1:35 
GeneralRe: Can we use Azure Table as database in CRM application? Pin
Dave Kreskowiak19-Oct-16 6:15
mveDave Kreskowiak19-Oct-16 6:15 
QuestionCode to move window not working. Pin
Member 1280196718-Oct-16 22:47
Member 1280196718-Oct-16 22:47 
I'm trying to get a window to move along the x axis however currently the code(timer4_tick) that i have is having no effect. Is there something that i am missing? I'll try to post only the code that is relevant.

C#
//This is in my form1.cs
 
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

public partial class Form1 : Form
    {
        private int WindowVx, WindowVy;
        private int WindowX, WindowY;
        private int width = Screen.PrimaryScreen.WorkingArea.Width;
        private int height = Screen.PrimaryScreen.WorkingArea.Height;

 private void timer1_Tick(object sender, EventArgs e)
        {

            WindowX = random.Next(width);
            WindowY = random.Next(height);
            int wx = random.Next(width / 2);
            int wy = random.Next(height / 2);
            WindowVx = random.Next (1, 4);
            WindowVy = random.Next (1, 4);
            this.Left = WindowX;
            this.Top = WindowY;
            this.Width = wx;
            this.Height = wx;
            //form.Show();
            //new Form1().Show();

        }


private void timer4_Tick (object sender, EventArgs e)
        {
            WindowX += WindowVx;
            if (WindowX < 0) {
                WindowVx = -WindowVx;
            } else if (WindowX + width > ClientSize.Width) {
                WindowVx = -WindowVx;
            }


            this.Refresh ();
        }

//The following part is in form1.designer.cs

 this.timer4 = new System.Windows.Forms.Timer (this.components);

            this.timer4.Enabled = true;
            this.timer4.Interval = 1000;
            this.timer4.Tick += new System.EventHandler (this.timer4_Tick);

        private System.Windows.Forms.Timer timer4;

AnswerRe: Code to move window not working. Pin
OriginalGriff18-Oct-16 23:03
mveOriginalGriff18-Oct-16 23:03 
GeneralRe: Code to move window not working. Pin
Member 1280196718-Oct-16 23:15
Member 1280196718-Oct-16 23:15 
GeneralRe: Code to move window not working. Pin
OriginalGriff18-Oct-16 23:19
mveOriginalGriff18-Oct-16 23:19 
GeneralRe: Code to move window not working. Pin
Member 1280196718-Oct-16 23:49
Member 1280196718-Oct-16 23:49 
GeneralRe: Code to move window not working. Pin
OriginalGriff18-Oct-16 23:59
mveOriginalGriff18-Oct-16 23:59 
GeneralRe: Code to move window not working. Pin
Member 1280196719-Oct-16 0:26
Member 1280196719-Oct-16 0:26 
GeneralRe: Code to move window not working. Pin
OriginalGriff19-Oct-16 0:31
mveOriginalGriff19-Oct-16 0:31 
GeneralRe: Code to move window not working. Pin
Member 1280196719-Oct-16 0:36
Member 1280196719-Oct-16 0:36 
GeneralRe: Code to move window not working. Pin
OriginalGriff19-Oct-16 0:47
mveOriginalGriff19-Oct-16 0:47 
GeneralRe: Code to move window not working. Pin
Member 1280196719-Oct-16 0:59
Member 1280196719-Oct-16 0:59 
GeneralRe: Code to move window not working. Pin
OriginalGriff19-Oct-16 1:17
mveOriginalGriff19-Oct-16 1:17 
GeneralRe: Code to move window not working. Pin
Member 1280196719-Oct-16 1:59
Member 1280196719-Oct-16 1:59 
GeneralRe: Code to move window not working. Pin
OriginalGriff19-Oct-16 2:07
mveOriginalGriff19-Oct-16 2:07 
GeneralRe: Code to move window not working. Pin
Rahul VB19-Oct-16 9:06
professionalRahul VB19-Oct-16 9:06 
QuestionHow i pass the list view column value in stored procedure as a parameter in vb dot net. Pin
Member 1280150118-Oct-16 19:28
Member 1280150118-Oct-16 19:28 
AnswerRe: How i pass the list view column value in stored procedure as a parameter in vb dot net. Pin
OriginalGriff18-Oct-16 19:39
mveOriginalGriff18-Oct-16 19:39 
AnswerRe: How i pass the list view column value in stored procedure as a parameter in vb dot net. Pin
OriginalGriff18-Oct-16 19:40
mveOriginalGriff18-Oct-16 19:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.