开启辅助访问 切换到宽版

精易论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

用微信号发送消息登录论坛

新人指南 邀请好友注册 - 我关注人的新帖 教你赚取精币 - 每日签到


求职/招聘- 论坛接单- 开发者大厅

论坛版规 总版规 - 建议/投诉 - 应聘版主 - 精华帖总集 积分说明 - 禁言标准 - 有奖举报

查看: 2041|回复: 1
收起左侧

[C#源码] C# CS程序设计版 HD Internet TV 未完成半成品

[复制链接]
结帖率:33% (3/9)
发表于 2012-12-20 17:42:36 | 显示全部楼层 |阅读模式   四川省成都市
[e]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Runtime.InteropServices;
//#define Leen "梦の続きへ ";
namespace HD_Internet_TV
{
public partial class _MainForm : Form
{
public _MainForm()
{
InitializeComponent();
}
const string NewLine = "\n";
const string text = "HD Internet TV";
const int MF_SEPARATOR = 2048;
const int MF_BYPOSITION = 1024;
const int IDM_MYITEM = 12345;
const int GWL_WNDPROC = -4;
const int WM_SYSCOMMAND = 274;
const int WM_KEYDOWN = 256;
const int WM_KEYUP = 257;
const int SW_SHOW = 5;
const int WM_GETTEXT = 13;
const int WM_Settext = 12;
const int IDM_MYEVEN = 2031619;
const string Lie1 = "http://www.tv123456789.com/ITV189高清网络电视.exe";
const string Lie2 = "http://www.tv123456789.com/v8/index.html?v=1&d=1&alliance_id=105183&sv=133234551";
const string URL = "http://tv.zqredstar.com/hdtv/index.htm";
const string HomeURL = "http://hi.baidu.com/windowsvipcuv/";
[DllImport("shell32.dll", EntryPoint = "ShellExecuteA")]
public static extern int ShellExecuteA(
int Hwnd,
string lpOperation,
string lpFile,
string lpParameters,
string lpDirectory,
short nShowCmd
);
[DllImport("user32.dll", EntryPoint = "FindWindowA")]
public static extern int FindWindowA(string ClassName, string TextName);
[DllImport("kernel32.dll", EntryPoint = "SetProcessWorkingSetSize")]
public static extern void SetProcessWorkingSetSize(int C1, int C2, int C3);
[DllImport("user32.dll", EntryPoint = "SetWindowLongA")]
public static extern int SetWindowLongA(int Hwnd, int nIndex, int dwNewLong);
[DllImport("shell32.dll", EntryPoint = "ShellAboutA")]
public static extern int ShellAboutA(int HWnd, string Text, string Tip, int HIco);
[DllImport("shlwapi.dll", EntryPoint = "PathIsDirectoryA")]
public static extern int PathIsDirectoryA(string pszPath);
[DllImport("user32.dll", EntryPoint = "SendMessageA")]
public static extern int SendMessageA(int Hwnd, int wMsg, int wParam, int lParam);
[DllImport("user32.dll", EntryPoint = "AnimateWindow")]
public static extern void AnimateWindow(int hwnd, int dwTime, int dwFlags);
[System.Runtime.InteropServices.DllImport("dwmapis.dll", EntryPoint = "ifosvar")]
private static extern bool ifosvar(double a);
[System.Runtime.InteropServices.DllImport("dwmapis.dll", EntryPoint = "OnAero")]
private static extern void OnAero
(
int A1,
int A2,
bool A3,
int A4,
int A5,
int A6,
bool A7,
int A8,
int A9,
int A10,
int A11,
bool A12
);
[DllImport("advapi32.dll", EntryPoint = "OpenEventA")]//
public static extern int OpenEventA(int dwDesiredAccess, bool bInheritHandle, string lpName);
[DllImport("advapi32.dll", EntryPoint = "CreateEventA")]
public static extern int CreateEventA(int lpEventAttributes, bool bManualReset, bool bInitialState, string lpName);
static WebBrowser explorer=new WebBrowser();
[DllImport("user32.dll",EntryPoint="CallWindowProcA")]
public static extern int CallWindowProcA(int lpPrevWndFunc, int hwnd, int uMsg, int wParam, int lParam);
[DllImport("user32.dll", EntryPoint = "MessageBoxA")]
private static extern int MessageBoxA(int Hwnd, string Tip, string Text, int Val);
private void _MainForm_Load(object sender, EventArgs e)
{
CshIe();
this.Text = text;
setH_W();
AnimateWindow(GetHwnd(), 1288, 24);
SetPeek();
SetTouMing(GetHwnd(), this.BackColor.ToArgb(), random(255,188), 3);
// IsPidExist();
}
void RegisterClass()
{
//TD::注册回调
}
const int IDM_yes = 123;
const int IDM_qlj = 758;
static int lpPrevWndProc = new Int32();
int WindowProc(int hwnd,int uMsg,int wParam,int lParam)
{
if(uMsg==IDM_qlj || uMsg ==IDM_yes)
{
return 0;
}
return CallWindowProcA(lpPrevWndProc, hwnd, uMsg, wParam, lParam);
}
// 此代码块做屏蔽右键回调函数块
static Timer Timer = new Timer();
void setTimer(int TimeMs)
{
Timer = this.timer1;
Timer.Interval = TimeMs;
}
void setH_W()
{
Hige = this.Height;
Whidh = this.Width;
}
const string tip1 = "已存在无法重复运行实例";
const string tip2 = "MyAppVideo";
const string tip3 = "信息:";
const int tipBtn = 64 + 0;
private void IsPidExist()
{
if (OpenEventA(IDM_MYEVEN, false, tip2) != 0)
{
MessageBoxA(GetHwnd(),tip1,tip3,tipBtn);
this.Close();
}
CreateEventA(0, false, false, tip2);
}
private void CshIe()
{
explorer = this.webBrowser1;
}
int GetHwnd()
{
int poiuiqnq = new Int32();
string[] uihjniu = new string[2];
uihjniu[1] = this.Text;
poiuiqnq = FindWindowA(uihjniu[0], uihjniu[1]);
return poiuiqnq;
}
int random(int MaxVal,int MinVal)
{
Random Random = new Random();
return Random.Next( MinVal,MaxVal);
}
void SetPeek()
{
if (ifosvar(6) == true)
{
int Hwnd = GetHwnd();
int rgb = this.BackColor.ToArgb();
OnAero(Hwnd, 32, true, rgb, 255, 2, true, this.Top, this.Left, this.Width, this.Height, true);
}
}
static int Register = new Int32();
private void _MainForm_Shown(object sender, EventArgs e)
{
Register++;
if (Register > 1)
{
return;
}
explorer.Navigate(URL);
object Object = new object();
EventArgs Evag=new EventArgs();
timer1_Tick(Object, Evag);
}
static int Hige = new Int32();
static int Whidh = new Int32();
private void _MainForm_Resize(object sender, EventArgs e)
{
if (this.Width < Whidh)
{
this.Width = Whidh;
}
if (this.Height < Hige)
{
this.Height = Hige;
}

}
[System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint = "GetWindowLongA")]
private static extern int GetWindowLongA(int hwnd, int nIndex);
[System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint = "SetLayeredWindowAttributes")]
private static extern int SetLayeredWindowAttributes(int hwnd, int crKey, int alrf, int dwFlags);
bool SetTouMing(int CHwnd, int CrKey, int bAlpha, int dwFlags)
{
int Ret = new int();
Ret = GetWindowLongA(CHwnd, -20);
Ret = Ret | 524288;
SetWindowLongA(CHwnd, -20, Ret);
if (SetLayeredWindowAttributes(CHwnd, CrKey, bAlpha, dwFlags) != 0)
{
return true;
}
return false;
}
[System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint = "FlashWindow")]
private static extern int FlashWindow(int Hwnd, bool dwY);
const int IDM_MYFY=-1;
private void timer1_Tick(object sender, EventArgs e)
{
SetProcessWorkingSetSize(IDM_MYFY,IDM_MYFY,IDM_MYFY);
}
const int F5 = 116;
private void webBrowser1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
{
//if (e.IsInputKey == true)
//{
int KeyVal = e.KeyValue;
System.Diagnostics.Debug.Write(KeyVal);
if (KeyVal == F5)
{
explorer.Navigate(URL);
}
//}

}

}
}

[/e]
下载学习地址:: HD Internet TV.zip (329.54 KB, 下载次数: 3)

点评

div 表单S哦   四川省成都市  发表于 2012-12-20 17:49
结帖率:33% (3/9)
 楼主| 发表于 2012-12-20 17:43:53 | 显示全部楼层   四川省成都市
易语言学习版本
HD Internet TV [HDのインターネットTV] 正式版 V1.0
http://www.3600gz.cn/thread-13622015-1-1.html
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则 致发广告者

发布主题 收藏帖子 返回列表

sitemap| 易语言源码| 易语言教程| 易语言论坛| 易语言模块| 手机版| 广告投放| 精易论坛
拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论,本站内容均为会员发表,并不代表精易立场!
论坛帖子内容仅用于技术交流学习和研究的目的,严禁用于非法目的,否则造成一切后果自负!如帖子内容侵害到你的权益,请联系我们!
防范网络诈骗,远离网络犯罪 违法和不良信息举报电话0663-3422125,QQ: 793400750,邮箱:wp@125.la
Powered by Discuz! X3.4 揭阳市揭东区精易科技有限公司 ( 粤ICP备12094385号-1) 粤公网安备 44522102000125 增值电信业务经营许可证 粤B2-20192173

快速回复 返回顶部 返回列表