Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
K

kennyhibs

@kennyhibs
About
Posts
17
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • video transition
    K kennyhibs

    hi how would i go about creating a directshow filter that would disolve between 2 video sources when activated (fade out first video while fading in second) kenny

    C / C++ / MFC

  • order by problem
    K kennyhibs

    the bottom part of code (awayteam) uses same table in database and sorts correctly so values are correct, for some reason home team doesnt sort

    MySQL database sharepoint mysql help

  • order by problem
    K kennyhibs

    I have a page that displays 2 lists of names and a squad number next to them. the awayteam part of the page displays and sorts fine but the hometeam part of page doesnt sort. code below the bold bit is the part that doesnt sort

    mysql_select_db($database_newleague, $newleague);
    $query_rsHometeam = "SELECT teamid.teamname AS hometeamname, players.squadnumber, players.playername FROM players INNER JOIN teams AS teamid ON teamid.teamid = players.teamid WHERE players.homeaway='h' AND players.playing=1 ORDER BY position ASC, squadnumber ASC ";
    $rsHometeam = mysql_query($query_rsHometeam, $newleague) or die(mysql_error());
    $row_rsHometeam = mysql_fetch_assoc($rsHometeam);
    $totalRows_rsHometeam = mysql_num_rows($rsHometeam);

    mysql_select_db($database_newleague, $newleague);
    $query_rsAwayteam = "SELECT teamid.teamname AS awayteamname, players.squadnumber, players.playername FROM players INNER JOIN teams AS teamid ON teamid.teamid = players.teamid WHERE players.homeaway='a' AND players.playing=1 ORDER BY position ASC, squadnumber ASC ";
    $rsAwayteam = mysql_query($query_rsAwayteam, $newleague) or die(mysql_error());
    $row_rsAwayteam = mysql_fetch_assoc($rsAwayteam);
    $totalRows_rsAwayteam = mysql_num_rows($rsAwayteam);

    MySQL database sharepoint mysql help

  • how to use temporary values
    K kennyhibs

    Hi i have a mysql database which i use to update a soccer league table when i enter in results from a form, works fine, however i would like to be able to enter latest scores and update table based on latest scores entered but i cant work out how to do this as at the moment when i enter an update in the score for a match it will treat it as a new match and allocate points etc all over again Example teama 1 teamb 0 would give the following teama goals for 1, teamb goals for 0, goaldifference = teama goals for - teamb goals for which in thiscase would be 1 if it changed to teama 3 teamb 0 would give the following teama goals for 3, teamb goals for 0, goaldifference = teama goals for - teamb goals for which in thiscase would be 3 but it adds the 3 from this update to the 1 from previous update giving 4. so i need a way to stop it treating each update as a new result and only update with new data - the previous data so in my example 3 goals - 1 goal from first update = 2 goals , i have other fields like points that need to be treated same way. hope someone can helpout with this and point me in right direction kenny

    Linux, Apache, MySQL, PHP tutorial database mysql regex announcement

  • listbox
    K kennyhibs

    Thanks for reply, i've removed second list box as i dont think it has any use for what i want it to do. i now use the textbox to change name of listbox1 selecteditem and i am now trying to rename the actual file with "file.move" but i'm having a problem with second part of "file.move"

     private void fileSystemWatcher1\_Created(object sender, System.IO.FileSystemEventArgs e)
        {
            listBox1.Items.Add(e.FullPath);
            listBox1.SelectedIndex = listBox1.Items.Count - 1;
            listBox1.SelectedIndex = -1;
                    }
    
        private void listBox1\_Click(object sender, EventArgs e)
        {
           
            int itemSelected = this.listBox1.SelectedIndex;
            string itemText = this.listBox1.Items\[itemSelected\].ToString();
    
            Rectangle r = this.listBox1.GetItemRectangle(itemSelected);
            this.textBox1.Location = new System.Drawing.Point(r.X + 217, r.Y + 520);
            this.textBox1.Size = new System.Drawing.Size(r.Width + 4, r.Height - 10);
            this.textBox1.Visible = true;
            this.textBox1.Text = itemText;
            this.textBox1.Focus();
            this.textBox1.SelectAll();
        
        }
    
       
        private void textBox1\_KeyPress(object sender, KeyPressEventArgs e)
        {
            
            
            if (e.KeyChar == 13)
            
            {
                File.Move(Path.GetFullPath(listBox1.SelectedItem.ToString()), this.textBox1.Text.ToString()+".avi" );
                this.listBox1.Items\[this.listBox1.SelectedIndex\] = this.textBox1.Text;
                
                this.textBox1.Visible = false;
                
                
    
            }
            if (e.KeyChar == 27)
                this.textBox1.Visible = false;    
    

    It renames the file ok but moves file to debug directory of my project instead of leaving it where it is and just renaming it kenny

    C# help database graphics question

  • listbox
    K kennyhibs

    Hi can anyone help with the following i use filesystemwatcher to watch a folder and add a new entry into a listbox everytime a new file is created, there is a second listbox that duplicates whats in the first but with some code allows me to change the file name via a text box, works ok as long as the item in listbox2 is highlighted when i change text, however if the listbox updates while i'm in process of changing text it removes the highlight from the item i'm editing and crashes if i press enter to confirm new file name. Ther error i get is no doubt due to it not knowing what index to change as none are highlighted. So how can i get it to keep the file i am changing name of highlighted until i enter the new text.

    private void fileSystemWatcher1_Created(object sender, System.IO.FileSystemEventArgs e)
    {
    listBox1.Items.Add(e.FullPath);
    listBox2.Items.Add(e.FullPath);
    listBox1.SelectedIndex = listBox1.Items.Count - 1;
    listBox1.SelectedIndex = -1;
    listBox2.SelectedIndex = listBox2.Items.Count - 1;
    listBox2.SelectedIndex = -1;
    }

        private void listBox1\_Click(object sender, EventArgs e)
        {
            listBox2.SelectedIndex = listBox1.SelectedIndex;
        }
    
        private void listBox2\_Click(object sender, EventArgs e)
        {
            int itemSelected = this.listBox2.SelectedIndex;
            string itemText = this.listBox2.Items\[itemSelected\].ToString();
    
            Rectangle r = this.listBox2.GetItemRectangle(itemSelected);
            this.textBox1.Location = new System.Drawing.Point(r.X + 217, r.Y + 520);
            this.textBox1.Size = new System.Drawing.Size(r.Width + 4, r.Height - 10);
            this.textBox1.Visible = true;
            this.textBox1.Text = itemText;
            this.textBox1.Focus();
            this.textBox1.SelectAll();
        }
    
        private void textBox1\_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == 13)
            {
                this.listBox2.Items\[this.listBox2.SelectedIndex\] = this.textBox1.Text;
                
                this.textBox1.Visible = false;
            }
            if (e.KeyChar == 27)
                this.textBox1.Visible = false;
        }
    
    C# help database graphics question

  • how to change a value over a set period of time
    K kennyhibs

    Hi again trying to create a simple video fade effect by changing the contrast value of video from 0 to -128 over a period of 2 seconds, tried using time_tick and a for loop but it didnt work as all that happened was timer started and then loop exacuted timer set to 100 millisecs private void timer1_Tick(object sender, EventArgs e) { for (int i = 0; i < -128; i--) { contast = i } } anyone point me in right direction thanks

    C# tutorial

  • DS virtual capture device
    K kennyhibs

    Hi Developing a a project in visual studio 2008, c# .net, using videolab (www.mitov.com) components. has a component that outputs video to DSfilters and i would like to use this so windows media encoder picks it up, i have been playing around with VCam sdk http://www.e2esoft.cn/vcam/vcamsdk.asp[^] and it works great however i enquired over 2 weeks ago about buying the software and no one has got back to me. does anyone know of any similar software that will be seen by windows media encoder as a capture device or is there a way to do this with media encoder sdk kenny

    C# csharp visual-studio com

  • rename listbox item
    K kennyhibs

    would like to enter new name by just typing at listbox, dont want to double click as i use that for playing the video file kenny

    C# csharp visual-studio help tutorial

  • rename listbox item
    K kennyhibs

    can anyone point me in the right direction on how to right click on a listbox entry and be able to rename it. my project logs video clips in 60 sec files and stores them in a folder, i use filesystemwatcher to populate a listbox of with the file names as they are created minute 1 minute 2 minute 3 and so on... i want to be able to select a file and rename it so i can find that bit of video quicker so far i got private void listBox1_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) //not sure what to add here any help would be great using visual studio 2008 c# kenny

    C# csharp visual-studio help tutorial

  • getfilename
    K kennyhibs

    Thanks for that it was exactly what was wrong, i was trying to get the mp3 to play the filename but was taking out the full path to the file so it couldn't find it :-D kenny

    C# tutorial question

  • getfilename
    K kennyhibs

    Hi i have a simple window form with a listbox that plays a highlighted mp3, works great if i add the mp3 to the project bin, however when i try and put a path in for mp3 for example f:\mp3\song.mp3 it says it "cant play file " if i put a copy of the mp3 (song.mp3) in the project bin but leave the path as f:\mp3\song.mp3 then it plays fine so i'm guessing it is defaulting to the project bin to get filename, what am i missing? code: private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { dsAudioPlayer1.FileName = Path.GetFileName(listBox1.SelectedItem.ToString ()); kenny

    C# tutorial question

  • file list
    K kennyhibs

    Didn't think asking a simple question was such a big deal!

    C# csharp visual-studio help tutorial announcement

  • file list
    K kennyhibs

    Hi Being very very limited in my knowledge of this could you help me a little further as to what else i need to add to make that bit of code work, assume i'm starting with a blank form! kenny

    C# csharp visual-studio help tutorial announcement

  • file list
    K kennyhibs

    Google is a great place however even that doesn't always give you what you want in a format you understand, everyone got to ask to learn kenny

    C# csharp visual-studio help tutorial announcement

  • file list
    K kennyhibs

    yes came across them many times but every time i tried to use them i got errors :-D :-D

    C# csharp visual-studio help tutorial announcement

  • file list
    K kennyhibs

    Hi working on my first ever project with c# in visual studio 2008 using net framework 3.5 i'm trying to work out how to display a list of AVI files from a fixed directry (c:\video) and have that list update itself everytime a new file is added and to highlight the latest flle. been looking and trying things out for over 2 weeks and getting no where so any help would be great, even just getting the list of AVI files to display would be a great start thanks kenny

    C# csharp visual-studio help tutorial announcement
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups