Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1085369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:40:50+00:00 2026-05-16T22:40:50+00:00

I have two file generated in visual studio c++ 2010 express. test2.cpp // test2.cpp

  • 0

I have two file generated in visual studio c++ 2010 express.

test2.cpp

// test2.cpp : main project file.

#include "stdafx.h"
#include "Form1.h"

using namespace test2;

[STAThreadAttribute]
int main(array<System::String ^> ^args)
{
// Enabling Windows XP visual effects before any controls are created
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false); 

// Create the main window and run it
Application::Run(gcnew Form1());
return 0;
}

and Form1.h

#pragma once

namespace test2 {

using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;

/// <summary>
/// Summary for Form1
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:
    Form1(void)
    {
        InitializeComponent();
        //
        //TODO: Add the constructor code here
        //
    }

protected:
    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    ~Form1()
    {
        if (components)
        {
            delete components;
        }
    }
private: System::Windows::Forms::WebBrowser^  webBrowser1;
public: System::Windows::Forms::Timer^  timer1;
private: 

private: System::ComponentModel::IContainer^  components;
protected: 

private:
    /// <summary>
    /// Required designer variable.
    /// </summary>


#pragma region Windows Form Designer generated code
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    void InitializeComponent(void)
    {
        this->components = (gcnew System::ComponentModel::Container());
        this->webBrowser1 = (gcnew System::Windows::Forms::WebBrowser());
        this->timer1 = (gcnew System::Windows::Forms::Timer(this->components));
        this->SuspendLayout();
        // 
        // webBrowser1
        // 
        this->webBrowser1->Dock = System::Windows::Forms::DockStyle::Fill;
        this->webBrowser1->IsWebBrowserContextMenuEnabled = false;
        this->webBrowser1->Location = System::Drawing::Point(0, 0);
        this->webBrowser1->MinimumSize = System::Drawing::Size(20, 20);
        this->webBrowser1->Name = L"webBrowser1";
        this->webBrowser1->ScrollBarsEnabled = false;
        this->webBrowser1->Size = System::Drawing::Size(284, 262);
        this->webBrowser1->TabIndex = 0;
        this->webBrowser1->Url = (gcnew System::Uri(L"http://wp.pl", System::UriKind::Absolute));
        this->webBrowser1->DocumentCompleted += gcnew System::Windows::Forms::WebBrowserDocumentCompletedEventHandler(this, &Form1::webBrowser1_DocumentCompleted);
        // 
        // timer1
        // 
        this->timer1->Enabled = true;
        this->timer1->Interval = 10000;
        this->timer1->Tick += gcnew System::EventHandler(this, &Form1::timer1_Tick);
        // 
        // Form1
        // 
        this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
        this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
        this->ClientSize = System::Drawing::Size(284, 262);
        this->Controls->Add(this->webBrowser1);
        this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::None;
        this->Name = L"Form1";
        this->ResumeLayout(false);

    }
#pragma endregion
private: System::Void webBrowser1_DocumentCompleted(System::Object^  sender, System::Windows::Forms::WebBrowserDocumentCompletedEventArgs^  e) {
         }
public: System::Void timer1_Tick(System::Object^  sender, System::EventArgs^  e) {
            Application::Exit();
         }
};
}

How to using argument from command prompt? For example how change

this->timer1->Interval = 10000;

on user var? Something like

this->timer1->Interval = time;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T22:40:51+00:00Added an answer on May 16, 2026 at 10:40 pm

    You can get a string array containing the command-line arguments by calling Environment::GetCommandLineArgs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two arrays built while parsing a text file. The first contains the
I have two databases, one is an MS Access file, the other is a
I want to split up the jQuery .js file into two, but I have
I would like a batch file to launch two separate programs then have the
If I have a comma separated file like the following: foo,bar,n ,a,bc,d one,two,three ,a,bc,d
I've got two PostgreSQL databases that have been created using the same sql file.
I have a PHP file, Test.php, and it has two functions: <?php echo displayInfo();
I have an xml file like this: <root> <item> <name>one</name> <status>good</status> </item> <item> <name>two</name>
I am building a project using Visual Studio. The project has a dependency on
I have created two wsdl files with shared types imported from xsd schema file.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.