Show Google Calendar in C# Windows Form - c#

I want to show my google calendar in my application's tabs. How can I do it?
private void tabPage6_Click(object sender, EventArgs e)
{
//I want to add the code in this tab
}

You need to use a WeBrowser control for this. Drag and drop a WebBrowser control from Tools, suppose name of the WebBrowser control is webBrowser1 the use below code to open calendar
private void tabPage6_Click(object sender, EventArgs e)
{
webBrowser1.Navigate("https://www.google.com/calendar/");
webBrowser1.Show();`
}

Related

How to add an event on a menu in C# project?

I have a C# Windows Forms App that contain a menu bar.
I want to display a Help Message when I press on the "HELP" menu button.
All that I can see when I press view code is this:
private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
{
}
I think that I need to create inside the function a MessageBox or an event that will display the desired message.
Do you have any idea how should I do this, please?
Below should work for what your asking. If you are on your form you can double click the button you want to interact with, and Visual Studio should take you to the empty method.
private void helpToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show("This is supposed to be helpful");
}

Disable and Enable a TabPage in C#

I am using Windows Forms application using C#.I would like to know, how can I disable the TabPages while it is not open or selected and it can be open by using another button.
Specifically, I want to disable the TabControl of TabPages and TabPages can be controlled by button click using C#.
In your code you have to remove the tab and re-add it when you want it
tabControl1.TabPages.Remove(tabPage1); // Hide the tab page
tabControl1.TabPages.Insert(0, tabPage1);// Show the tab page (insert it to the correct position)
For example:
Hiding a TabPage
private void ButtonHide_Click(object sender, EventArgs e)
{
tabControl1.TabPages.Remove(tabPage1);
}
Showing a TabPage
private void ButtonShow_Click(object sender, EventArgs e)
{
tabControl1.TabPages.Add(tabPage1);
}

ASP.NET Change the current webform

I am working at a problem in ASP.NET.
I have to create 2 windows (i think that I need to make web forms, i don't know why they said windows) one is the login form, when i press ok and the username and password is ok, I need to
show my second window (webform)
How can I do that?
I tried to do
protected void Button1_Click(object sender, EventArgs e)
{
Form2 form = new Form2();
form.SetFocus("id");
}
But it gives me error
A form tag with runat=server must exist on the Page to use SetFocus() or the Focus property.
What should I do?
Am i right, I have to do separate webforms for thoose windows?
This is the picture from the problem that they provided
If you use webforms you can just use the following code to redirect to second form:
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("Webform2.aspx");
}

Detect whether user has clicked on a specific link inside a Browser Control?

I'm not using the in-built browser control (ie wrapper) but i'm using Webkit.Net instead
When i click on button1, the WebkitBrowser will navigate to the link typed on textBox1
private void Button1_Click(object sender, EventArgs e)
{
backgroundWorker1.Navigate("https://www.facebook.com/cocacola");
}
Can i detect when user click on the Like button ? For example when the user likes the page, a MessageBox appears and says that the page has been successfully liked !
Anyhelp would be highly appreciated

Pop-up keyboard in Windows CE 5.0

Is it possible force the build in keyboard to appear within a Windows CE 5.0 application?
I am designing a project in C# and would like the keyboard or a numerical keypad to pop-up when the user has to input to the application.
You should look at the InputPanel control. Just drop one onto your form from the toolbox. Then just show and hide it on the GotFocus and LostFocus events of the input controls:
private void textBox1_GotFocus(object sender, EventArgs e)
{
inputPanel1.Enabled = true;
}
private void textBox1_LostFocus(object sender, EventArgs e)
{
inputPanel1.Enabled = false;
}

Categories

Resources