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
  1. Home
  2. General Programming
  3. C#
  4. i need some help

i need some help

Scheduled Pinned Locked Moved C#
helpquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mohamed El Wehishy
    wrote on last edited by
    #1

    hi i have two forms i want after 3 seconds the first form is hiden and the second one is appeared sorry for that silly question but the first form has user control that playing a movie i trying to use the usually code to hide the first one but it is not disappeared and the second is appeared thanks very much Mohamed

    N 1 Reply Last reply
    0
    • M Mohamed El Wehishy

      hi i have two forms i want after 3 seconds the first form is hiden and the second one is appeared sorry for that silly question but the first form has user control that playing a movie i trying to use the usually code to hide the first one but it is not disappeared and the second is appeared thanks very much Mohamed

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      Hard to tell without seeing the code. Could you post relevant code here?

      Navaneeth How to use google | Ask smart questions

      M 1 Reply Last reply
      0
      • N N a v a n e e t h

        Hard to tell without seeing the code. Could you post relevant code here?

        Navaneeth How to use google | Ask smart questions

        M Offline
        M Offline
        Mohamed El Wehishy
        wrote on last edited by
        #3

        in form1 this code

        public partial class Form1 : Form
        {

            public Form1()
            {
                InitializeComponent();
                Form2 gv = new Form2();
                
                dd();
                this.Hide();
                
        
                
            }
        
            private void dd()
            {
                Form2 ss = new Form2();          
                ss.Show();
            }
        

        sorry i can not write the design of form 1 part but it an user control that represent a .avi video thanks very much Mohamed

        N 1 Reply Last reply
        0
        • M Mohamed El Wehishy

          in form1 this code

          public partial class Form1 : Form
          {

              public Form1()
              {
                  InitializeComponent();
                  Form2 gv = new Form2();
                  
                  dd();
                  this.Hide();
                  
          
                  
              }
          
              private void dd()
              {
                  Form2 ss = new Form2();          
                  ss.Show();
              }
          

          sorry i can not write the design of form 1 part but it an user control that represent a .avi video thanks very much Mohamed

          N Offline
          N Offline
          N a v a n e e t h
          wrote on last edited by
          #4

          I believe Form1 is your start-up form. When Application.Run(new Form1()) is executed, it sets the Form1's visibility to true. This happens after your call to this.Hide() in Form1's constructor. This is the reason why first form is still visible. Are you looking to implement a splash-screen? If yes, this is not the correct method. Try the following points

          1. Show the Form1 before the call to Application.Run
          2. Keep a timer on Form1 with interval as 3secs and when timer ticks, unload the form.
          3. Instantiate Form2 and start message loop on that. Application.Run(new Form2()).

          Navaneeth How to use google | Ask smart questions

          modified on Thursday, September 24, 2009 4:47 AM

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

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