Click here to Skip to main content
15,904,415 members
Home / Discussions / C#
   

C#

 
AnswerRe: Stitching Together Thousands Of Bitmaps Pin
Pete O'Hanlon20-Oct-16 21:18
mvePete O'Hanlon20-Oct-16 21:18 
AnswerRe: Stitching Together Thousands Of Bitmaps Pin
JBHowl21-Oct-16 3:26
JBHowl21-Oct-16 3:26 
GeneralRe: Stitching Together Thousands Of Bitmaps Pin
Eddy Vluggen21-Oct-16 3:50
professionalEddy Vluggen21-Oct-16 3:50 
GeneralRe: Stitching Together Thousands Of Bitmaps Pin
Midi_Mick21-Oct-16 14:40
professionalMidi_Mick21-Oct-16 14:40 
AnswerRe: Stitching Together Thousands Of Bitmaps Pin
Luc Pattyn21-Oct-16 13:52
sitebuilderLuc Pattyn21-Oct-16 13:52 
QuestionThere is no ViewData item of type 'IEnumerable<SelectListItem>' that has the key 'SelectedClientList'. Pin
amioni19-Oct-16 23:30
amioni19-Oct-16 23:30 
AnswerRe: There is no ViewData item of type 'IEnumerable<SelectListItem>' that has the key 'SelectedClientList'. Pin
Richard MacCutchan20-Oct-16 1:35
mveRichard MacCutchan20-Oct-16 1:35 
AnswerRe: There is no ViewData item of type 'IEnumerable<SelectListItem>' that has the key 'SelectedClientList'. Pin
Gerry Schmitz20-Oct-16 5:02
mveGerry Schmitz20-Oct-16 5:02 
QuestionInterface structure Pin
Mycroft Holmes19-Oct-16 17:38
professionalMycroft Holmes19-Oct-16 17:38 
AnswerRe: Interface structure Pin
Midi_Mick19-Oct-16 19:12
professionalMidi_Mick19-Oct-16 19:12 
GeneralRe: Interface structure Pin
Mycroft Holmes19-Oct-16 20:32
professionalMycroft Holmes19-Oct-16 20:32 
AnswerRe: Interface structure Pin
Midi_Mick19-Oct-16 21:32
professionalMidi_Mick19-Oct-16 21:32 
AnswerRe: Interface structure Pin
Pete O'Hanlon19-Oct-16 21:04
mvePete O'Hanlon19-Oct-16 21:04 
AnswerRe: Interface structure Pin
puneetdhawan200020-Oct-16 0:25
puneetdhawan200020-Oct-16 0:25 
AnswerRe: Interface structure Pin
Nathan Minier20-Oct-16 1:11
professionalNathan Minier20-Oct-16 1:11 
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 

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.