Posts

Image
Uploading video on Youtube from our .net website Video 1 Video 2 Video 3 Video 4 Video 5

Managinng Date and Time of Indian Timezone for US Servers with Asp.Net C# code

TimeZoneInfo INDIAN_ZONE = TimeZoneInfo.FindSystemTimeZoneById("India Standard Time"); DateTime indianTime = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, INDIAN_ZONE); string date1 = indianTime.ToShortDateString();                          string currentdate = Convert.ToDateTime(date1, CultureInfo.CurrentCulture).ToString("M/d/yyyy");
Web Hosting Guide for Beginners If you have been thinking of making your own website to take advantage of the Internet boom but don’t know about website hosting and other services that are essential for creating and hosting a site, this article is meant for you. There are many basic questions about website hosting and other  web hosting services  whose answers are sought by the beginners. Here we try to answers all such frequently asked questions on website hosting to guide the beginners. What is Website Hosting?  Hosting a website means making a website available to public worldwide. When you create website, it is composed of web pages having text, images, videos and other content for people to see them. However, people can see your website only when it is available on the Internet. To make your website available on the Internet, you have to store it on a computer called web server. When you buy some space on a web server and store your webpages there, your websit...

PHP Programs for MCA

Practical Slips Class Php Lecture Php

Write a VC++ Window Program to Display the Characters entered by User from the Keyboard and type five to six Lines also take care of backspace is work.

Add #define ID_EDIT 1 LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { int wmId, wmEvent; PAINTSTRUCT ps; HDC hdc; static HWND hwndEdit; switch (message) { case WM_CREATE: hwndEdit=CreateWindow(TEXT("edit"),NULL,WS_CHILD|WS_CHILD|WS_VISIBLE|WS_HSCROLL|WS_VSCROLL|WS_BORDER|ES_LEFT|ES_MULTILINE|ES_AUTOHSCROLL|ES_AUTOVSCROLL,0,0,0,0,hWnd,(HMENU)ID_EDIT,((LPCREATESTRUCT)lParam)->hInstance,NULL); break; case WM_SETFOCUS: SetFocus(hwndEdit); break; case WM_SIZE: MoveWindow(hwndEdit,0,0,LOWORD(lParam),HIWORD(lParam),TRUE); break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, message, wParam, lParam);    }    return 0; }

Write a VC++ Window program to display user defined push button and radio button on client area.As User Click the buttons appropriate message is displayed.

Add #define IDC_MAIN_BUTTON 101 #define IDC_MAIN_RBUTTON 102 LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { int wmId, wmEvent; PAINTSTRUCT ps; HDC hdc; HWND button,but; switch (message) { case WM_CREATE: button=CreateWindowEx(0,"Button","RadioButton",WS_VISIBLE|WS_CHILD|BS_AUTORADIOBUTTON,250,220,100,24,hWnd,(HMENU)IDC_MAIN_RBUTTON,0,0); but=CreateWindowEx(0,"Button","PushButton",WS_VISIBLE|WS_CHILD|BS_PUSHBUTTON,50,220,100,24,hWnd,(HMENU)IDC_MAIN_BUTTON,0,0); break; case WM_COMMAND: hdc=GetDC(hWnd); switch(LOWORD(wParam)) { case IDC_MAIN_RBUTTON: TextOut(hdc,50,50,"Radio Button Pressed.....",30); break; case IDC_MAIN_BUTTON: TextOut(hdc,50,70,"Push Button is Pressed....",30); break; } break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, message, wParam, lParam); ...
Write a VC++ Program to display line by pressing ctrl+F1 and Circle by Alter+F2. LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { int wmId, wmEvent; PAINTSTRUCT ps; HDC hdc; switch (message) { case WM_SYSKEYDOWN: hdc=GetDC(hWnd); if(GetKeyState(VK_MENU)<0 && GetKeyState(VK_F2)<0) { Ellipse(hdc,50,50,200,200); } break; case WM_KEYDOWN: hdc=GetDC(hWnd); if(GetKeyState(VK_CONTROL)<0 &&  GetKeyState(VK_F1)<0) { MoveToEx(hdc,100,100,0); LineTo(hdc,400,400); } break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, message, wParam, lParam);    }    return 0; }