新聞中心
VB.NET中能否做一個像QQ那樣的聊天框,可以輸入文字和圖片?
第一個問題 qq聊天室 必須能 用vb都可以做

創(chuàng)新互聯(lián)專注于茄子河網(wǎng)站建設服務及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗。 熱誠為您提供茄子河營銷型網(wǎng)站建設,茄子河網(wǎng)站制作、茄子河網(wǎng)頁設計、茄子河網(wǎng)站官網(wǎng)定制、成都微信小程序服務,打造茄子河網(wǎng)絡公司原創(chuàng)品牌,更為您提供茄子河網(wǎng)站排名全網(wǎng)營銷落地服務。
第二個問題 vb.net插入數(shù)學公式 可以把這些公式封裝到一個類中,調用就是了
有vb.net 的網(wǎng)上商店可以參考下嗎?有的話發(fā)一下229747400@qq.com謝謝
可以應用百度Hi通知我
有時間可以解決你的問題
同樣的要求也可以通知我
ES:\\100C3BFFB79DC3F4BBFBC69C8DDC4BB9
交易提醒:預付定金是陷阱
VB.NET能編寫類似QQ程序的服務端么
可以的,服務器用WIN 2000/NT了,語言只是個工具而已,想實現(xiàn)的目的用所選的工具都能實現(xiàn),只是實現(xiàn)周期的長短了。vb可以做任何事,比如高級應用,線程等,但要用到API,如果用C/c++就不用API 了,所以工具的選擇還是蠻重要的!
vb.net 2008 我想用代碼復制一個文件到剪貼板。 用戶然后在QQ對話框中右擊粘貼就可直接發(fā)送。 代碼怎么寫
復制什么文件呢?
給你舉個例子:復制音頻文件
Public?Class?Form1??
'VB.Net復制讀取音頻文件并復制到剪貼板??
Private?Sub?Button1_Click(ByVal?sender?As?System.Object,?ByVal?e?As?System.EventArgs)?Handles?Button1.Click??
Try??
Dim?MyData?As?Byte()??
MyMyData?=?My.Computer.FileSystem.ReadAllBytes("WindowsXP.wav")??
My.Computer.Clipboard.SetAudio(MyData)??
MessageBox.Show("已經(jīng)成功將音頻數(shù)據(jù)VB.Net復制到剪貼板!",?"51cto提示",?MessageBoxButtons.OK,?MessageBoxIcon.Information)??
Catch?ex?As?Exception??
MessageBox.Show("將音頻數(shù)據(jù)復制到剪貼板出現(xiàn)錯誤,請檢查音頻文件是否已經(jīng)存在?",?"51cto提示",?MessageBoxButtons.OK,?MessageBoxIcon.Error)??
End?Try??
End?Sub??
'粘貼剪貼板音頻數(shù)據(jù)并播放??
Private?Sub?Button2_Click(ByVal?sender?As?System.Object,?ByVal?e?As?System.EventArgs)?Handles?Button2.Click??
Try??
Dim?MyData?As?Object??
MyMyData?=?My.Computer.Clipboard.GetData(DataFormats.WaveAudio)??
My.Computer.Audio.Play(MyData,?AudioPlayMode.Background)??
Catch?ex?As?Exception??
MessageBox.Show("剪貼板上不存在指定的音頻數(shù)據(jù)!",?"51cto提示",?MessageBoxButtons.OK,?MessageBoxIcon.Error)??
End?Try??
End?Sub??
'清空剪貼板上的音頻數(shù)據(jù)??
Private?Sub?Button3_Click(ByVal?sender?As?System.Object,?ByVal?e?As?System.EventArgs)?Handles?Button3.Click??
My.Computer.Clipboard.Clear()??
End?Sub??
End?Class
完善一下答案,現(xiàn)在所謂的復制粘貼文件操作,只是復制文件的地址,然后copy到指定地址,你要做的就是把文件的地址復制到剪貼板就好。所謂的剪切,也就是copy后多了一個delete功能。大同小異。
有誰搞過vb.net或c#給QQ好友發(fā)信息的?怎樣實現(xiàn)的,能不能說說
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Security.Cryptography;
using System.Diagnostics;
namespace QQLogin
{
public partial class QQLoginForm : Form
{
public QQLoginForm()
{
InitializeComponent();
}
UserInfo ui;
private void button1_Click(object sender, EventArgs e)
{
//單用戶登陸
if (ui == null)
{
ui = new UserInfo();//如果沒有提取出來對象,就創(chuàng)建一個
}
if (ui != null)
{
ui.Username = this.txtUser.Text.Trim();
ui.Password = this.txtPwd.Text;
ui.Type = this.cboType.Text == "正常" ? "41" : "40";
if (this.ValidateInput())
{//驗證是否輸入完全
if (string.IsNullOrEmpty(ui.Path))
{//判斷是否有QQ路徑,如果沒有就打開對話框來選擇一下
DialogResult dr = this.opfQQ.ShowDialog();
if (dr == DialogResult.OK)
{
ui.Path = opfQQ.FileName;//將選擇的路徑賦值給對象
this.LoginQQ(ui.Username, ui.Password, ui.Type, ui.Path);//登陸QQ
}
}
else
{
this.LoginQQ(ui.Username, ui.Password, ui.Type, ui.Path);
}
}
SerializeHelper.SerializeUserInfo(ui);//每次登陸都序列化保存一次
}
}
private bool ValidateInput()
{//驗證是否輸入完整
if (this.txtUser.Text == "")
{
this.txtUser.Focus();
return false;
}
else if(this.txtPwd.Text=="")
{
this.txtPwd.Focus();
return false;
}
return true;
}
private void LoginQQ(string user,string pwd,string type,string path)
{//登陸QQ的命令,通過CMD命令來執(zhí)行
Process MyProcess = new Process();
//設定程序名
MyProcess.StartInfo.FileName = "cmd.exe";
//關閉Shell的使用
MyProcess.StartInfo.UseShellExecute = false;
//重定向標準輸入
MyProcess.StartInfo.RedirectStandardInput = true;
//重定向標準輸出
MyProcess.StartInfo.RedirectStandardOutput = true;
//重定向錯誤輸出
MyProcess.StartInfo.RedirectStandardError = true;
//設置不顯示窗口
MyProcess.StartInfo.CreateNoWindow = true;
//執(zhí)行強制結束命令
MyProcess.Start();
MyProcess.StandardInput.WriteLine(path+" /start QQUIN:"+user+" PWDHASH:" + EncodeHash.pwdHash(pwd) + " /stat:"+type);//直接結束進程ID
MyProcess.StandardInput.WriteLine("Exit");
}
private void btnExit_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void txtUser_KeyPress(object sender, KeyPressEventArgs e)
{
if ((e.KeyChar '0' || e.KeyChar '9')e.KeyChar!=8)
{//只能輸入數(shù)字和退格鍵
e.Handled = true;
}
}
private void QQLoginForm_Load(object sender, EventArgs e)
{
LoadInfo();//單用戶獲取
}
private void LoadInfo()
{//單用戶獲取
ui = SerializeHelper.DeserializeUserInfo();//返回獲取后對象
if (ui != null)
{
this.txtUser.Text = ui.Username;//填充文本框
this.txtPwd.Text = ui.Password;//填充密碼框
this.cboType.SelectedIndex = ui.Type == "41" ? 0 : 1;//選擇登陸方式
}
else
{
this.cboType.SelectedIndex = 0;
}
}
private void btnConfig_Click(object sender, EventArgs e)
{
ConfigForm cf = new ConfigForm();
cf.ShowDialog();
LoadInfo();
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace QQLogin
{
public partial class ConfigForm : Form
{
UserInfo ui;
public ConfigForm()
{
InitializeComponent();
}
private void txtPath_Click(object sender, EventArgs e)
{//點擊一次文本框,彈出一次對話框來選擇QQ路徑
DialogResult dr = this.opfQQ.ShowDialog();
if (dr == DialogResult.OK)
{
this.txtPath.Text = opfQQ.FileName;
}
}
private bool ValidateInput()
{//驗證是否輸入完整
if (this.txtUser.Text == "")
{
this.txtUser.Focus();
return false;
}
else if (this.txtPwd.Text == "")
{
this.txtPwd.Focus();
return false;
}
else if (this.txtPath.Text == "")
{
return false;
}
return true;
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
private void ConfigForm_Load(object sender, EventArgs e)
{
LoadInfo();
}
private void btnSave_Click(object sender, EventArgs e)
{
ui = new UserInfo();
ui.Username = this.txtUser.Text.Trim();
ui.Password = this.txtPwd.Text;
ui.Type = this.cboType.Text == "正常" ? "41" : "40";
ui.Path = this.txtPath.Text;
if (this.ValidateInput())
{
SerializeHelper.SerializeUserInfo(ui);
this.Close();
}
}
private void LoadInfo()
{
ui = SerializeHelper.DeserializeUserInfo();
if (ui != null)
{
this.txtUser.Text = ui.Username;
this.txtPwd.Text = ui.Password;
this.cboType.SelectedIndex = ui.Type == "41" ? 0 : 1;
this.txtPath.Text = ui.Path;
}
else
{
this.cboType.SelectedIndex = 0;
}
}
}
}
你好,我問學過VB.NET,才學一些VB,不知VB。NET如何。我的QQ594470615,請加為好友,以便請教。謝謝。
vb.net和vb就語言來說區(qū)別不是很大,但是vb.net是基于dotnet的框架的,功能會強大許多,但是vb.net程序必須在裝有dotnet的機子上才能運行(普通xp系統(tǒng)不能運行,但vista、7可以),通用性大大降低
vb是一個簡易的語言,如果你有vb基礎,那么vb.net會很簡單
網(wǎng)站題目:vb.net發(fā)qq,VBNET下載
當前地址:http://www.dlmjj.cn/article/hdisii.html


咨詢
建站咨詢
