48
18 > Tạo 1 trình soạn thảo văn bản đơn giản (ví dụ notepad nhưng đơn giản hơn) 1>Tạo 1 giao diện như trong hình gồm 2 control MenuStrip và RichTextBox Khi viết như thế này thì lúc bạn to form ra thì cái richtexbox nó không to theo mà muốn thế thì bạn làm bước thứ 2 này 2>Chọn sự kiện SizeChanged của Form và viết code cho sự kiện đó như sau Cách làm chỗ này là bạn để ý lúc form to ra thì nó sẽ bằng độ phân giải của màn hình nên lúc đó bạn lấy độ phân giải này mà tính toán cho cái RichTextBox . private void Form5_SizeChanged(object sender, EventArgs e) { int intWidthScreen = Screen.PrimaryScreen.WorkingArea.Width; int intHeightScreen = Screen.PrimaryScreen.WorkingArea.Height; //intWidthScreen = intWidthScreen - 8; //intHeightScreen = intHeightScreen - 59; richTextBox1.Width = intWidthScreen; richTextBox1.Height = intHeightScreen; } 3> Viết code cho File>Open private void openToolStripMenuItem_Click(object sender, EventArgs e) {

Server Explorer

Embed Size (px)

Citation preview

18 > To 1 trnh son tho vn bn n gin (v d notepad nhng n gin hn)

1>To 1 giao din nh trong hnh gm 2 control MenuStrip v RichTextBox

Khi vit nh th ny th lc bn to form ra th ci richtexbox n khng to theo m mun th th bn lm bc th 2 ny

2>Chn s kin SizeChanged ca Form v vit code cho s kin nh sauCch lm ch ny l bn lc form to ra th n s bng phn gii ca mn hnh nn lc bn ly phn gii ny m tnh ton cho ci RichTextBox .private void Form5_SizeChanged(object sender, EventArgs e) { int intWidthScreen = Screen.PrimaryScreen.WorkingArea.Width; int intHeightScreen = Screen.PrimaryScreen.WorkingArea.Height; //intWidthScreen = intWidthScreen - 8; //intHeightScreen = intHeightScreen - 59; richTextBox1.Width = intWidthScreen; richTextBox1.Height = intHeightScreen; }

3> Vit code cho File>Openprivate void openToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog openFile = new OpenFileDialog(); if (openFile.ShowDialog() == DialogResult.OK) { Stream file = openFile.OpenFile(); StreamReader reader = new StreamReader(file); char[] data = new char[file.Length]; reader.ReadBlock(data, 0, (int)file.Length); richTextBox1.Text = new string(data); reader.Close(); } }

4>To tip File > Save v vit code cho n (Save)SaveFileDialog saveFDl = new SaveFileDialog(); if (saveFDl.ShowDialog() == DialogResult.OK) { StreamWriter writer = new StreamWriter(saveFDl.OpenFile()); writer.Write(richTextBox1.Text); writer.Close(); }

5>To Menu Format>Font v vit code cho FontFontDialog fontDl = new FontDialog(); if (fontDl.ShowDialog() == DialogResult.OK) { richTextBox1.Font = fontDl.Font; }

6>Kt Qu

Bi vit ny c chnh sa bi Phngip2410: 27 May 2008 - 08:36 AM http://winsocks.net/Are You looking for a good socks 5 service? But you don't know where to buy?Welcome to WinSocks.Net - Crazy Socks ServiceHere we provide Fresh Socks 5 with fast speed , less blacklist, especially price is cheaper than others service. More over, if you want to test our socks 5 before buying, don't be hesitate to contact our supporter through yahoo to receive Free Socks 5 0 #22 Phngip2410 Nhm: VIP Bi Vit: 1917 Gia Nhp: 08-March 07 Thc s CSTH Gi vo 27 May 2008 - 03:39 PM 19> a ng dng ca bn xung System Tray

1>Bn thng thy cc chng trnh ng dng c hnh nh th ny khi chy

2> lm c iu th bn hy ko control NotifyIcon t Toolbox vo Form ca mnh

3>Thuc tnh text ca control NotifyIcon ny l ci s c hin th khi bn r chut vo biu tng di System tray . Trong v d ny th l ch Phuong Diep

4>Vit code cho s kin Resize ca Form

==>S kin ny xy ra khi kch thc ca form thay i hay l bn nhn cho n thu nh li di thanh taskbarprivate void Form6_Resize(object sender, EventArgs e) { if (FormWindowState.Minimized == WindowState) { Hide(); } }

5>Vit code cho s kin double click ca control NotifyIcon private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e) { Show(); WindowState = FormWindowState.Normal; }

6>Khi bn mun icon ca chng trnh mnh di system tray s hin ra cc thao tc tt khi bn nhn chut phi vo nh th ny

lm c iu bn phi ko mt control na trong toolbox l ContextMenuStrip v Form ca mnh

7>Sau bn chnh thuc tnh ContextMenuStrip l tn ca ContextMenuStrip m ny bn ko vo , trong trng hp ca mnh th mc nh tn n l ==>contextMenuStrip1

8>Bn c th vit code cho Cc ContextMenuStrip ny nh sau private void exitToolStripMenuItem_Click(object sender, EventArgs e) { Close(); }

private void hideToolStripMenuItem_Click(object sender, EventArgs e) { this.Visible = false; }

private void showToolStripMenuItem_Click(object sender, EventArgs e) { this.Visible = true; }

Bi vit ny c chnh sa bi Phngip2410: 30 June 2008 - 11:41 PM http://winsocks.net/Are You looking for a good socks 5 service? But you don't know where to buy?Welcome to WinSocks.Net - Crazy Socks ServiceHere we provide Fresh Socks 5 with fast speed , less blacklist, especially price is cheaper than others service. More over, if you want to test our socks 5 before buying, don't be hesitate to contact our supporter through yahoo to receive Free Socks 5 0 #23 Phngip2410 Nhm: VIP Bi Vit: 1917 Gia Nhp: 08-March 07 Thc s CSTH Gi vo 27 May 2008 - 04:43 PM 20>To mt trnh duyt Web n gin

1> i khi bn mun lm mt Form cho coi mt a ch web nh th ny

2> lm c iu ny th trong Form mnh dng ba control . Hai control trong GroupBox Address l Button v TextBox cn control trong GroupBox Web l control WebBrowser

3>Sau Khi ko cc control vo th bn vit s kin cho Button Go nh sauprivate void button1_Click(object sender, EventArgs e) { //object o = null; //object address = (object)txtAddress.Text; webBrowser1.Navigate(txtAddress.Text); }

Bi vit ny c chnh sa bi Phngip2410: 27 May 2008 - 04:46 PM http://winsocks.net/Are You looking for a good socks 5 service? But you don't know where to buy?Welcome to WinSocks.Net - Crazy Socks ServiceHere we provide Fresh Socks 5 with fast speed , less blacklist, especially price is cheaper than others service. More over, if you want to test our socks 5 before buying, don't be hesitate to contact our supporter through yahoo to receive Free Socks 5 0 #24 Phngip2410 Nhm: VIP Bi Vit: 1917 Gia Nhp: 08-March 07 Thc s CSTH Gi vo 28 May 2008 - 03:10 PM 21 > To mt Form ging nh Mn hnh Screen saver ca Window (Lc my dng mt thi gian th c my hnh chy)

1>To 1 Form mi v chnh thuc tnh ControlBox l False v thuc tnh BackColor l Black ...

2 > Ko Control Timer vo v vit s kin Tick cho n nh sau private int ixStart; private int iyStart; private void timer1_Tick(object sender, EventArgs e) { int i; i = label1.Location.X; if (i >= 750) { i = 0; } else { i = label1.Location.X + 5; } label1.Location = new Point(i, 280); }

3>Vit Code cho s kin load ca Form gi control Timer ny private void Form8_Load(object sender, EventArgs e) { timer1.Enabled = true; }

4>Vit Code cho hai s kin ca Form l KeyPress v MouseMove cho khi ta nhn phm hoc di chuyn chut th Form s t ng thotprivate void Form8_KeyPress(object sender, KeyPressEventArgs e) { Application.Exit(); }

private void Form8_MouseMove(object sender, MouseEventArgs e) { if (ixStart == 0 && iyStart == 0) { ixStart = e.X; iyStart = e.Y; } else { if (e.X != ixStart || e.Y != iyStart) { Application.Exit(); } } }

Bi vit ny c chnh sa bi Phngip2410: 30 June 2008 - 11:34 PM http://winsocks.net/Are You looking for a good socks 5 service? But you don't know where to buy?Welcome to WinSocks.Net - Crazy Socks ServiceHere we provide Fresh Socks 5 with fast speed , less blacklist, especially price is cheaper than others service. More over, if you want to test our socks 5 before buying, don't be hesitate to contact our supporter through yahoo to receive Free Socks 5 0 #25 Phngip2410 Nhm: VIP Bi Vit: 1917 Gia Nhp: 08-March 07 Thc s CSTH Gi vo 29 May 2008 - 11:28 PM 22 > Kt Ni Form n SQL 2005

1>Bn to 1 Form v vit code cho s kin Load ca Form nh sau :private void Form9_Load(object sender, EventArgs e) { try { SqlConnection sqlCNN = new SqlConnection(@"Server=TUAN-3960BA9C1C\SQLEXPRESS;Initial Catalog=TestSQL2005;Integrated Security=SSPI"); sqlCNN.Open(); MessageBox.Show("Thnh Cng"); } catch { MessageBox.Show("Tht Bi"); } }

Nh l phi c k t ny @ khng thi l sai ... Mnh coi n trn Microsoft ...

2>Cc tham s trong ly t bng ny khi bn vo SQL Server Manager Studio Express ....QuoteServer=TUAN-3960BA9C1C\SQLEXPRESS TUAN-3960BA9C1C\SQLEXPRESS l Server Name trong hnh

QuoteInitial Catalog=TestSQL2005TestSQL2005 l tn Database

QuoteIntegrated Security=SSPI ==>lin quan bo mt mnh khng hiu lm

Bi vit ny c chnh sa bi Phngip2410: 29 May 2008 - 11:46 PM http://winsocks.net/Are You looking for a good socks 5 service? But you don't know where to buy?Welcome to WinSocks.Net - Crazy Socks ServiceHere we provide Fresh Socks 5 with fast speed , less blacklist, especially price is cheaper than others service. More over, if you want to test our socks 5 before buying, don't be hesitate to contact our supporter through yahoo to receive Free Socks 5 0 #26 Phngip2410 Nhm: VIP Bi Vit: 1917 Gia Nhp: 08-March 07 Thc s CSTH Gi vo 31 May 2008 - 04:55 PM 23 > In mt file text (.txt) trong my ca bn

1> Chng trnh ca chng ta s ch c mt nt print c tc dng in 1 file trong my ca mnh trong My Document theo ng dn sau :QuoteC:\\Documents and Settings\\Tuan Anh Tuan Em\\My Documents\\Link G2.1.txt

2>u tin bn Ko control PrintDocument vo Form ca mnh sau bn thm hai namespace ny vo chng trnh ca mnh .using System.Drawing.Printing;using System.IO;

3>Bn nhn double click vo control ny khi ko vo Form sinh ra s kin th n s sinh ra trong code on m sauprivate void printDocument1_PrintPage(object sender, PrintPageEventArgs e) { }

Bn vit code vo trong nh sau://S Kin Print Page xy ra cho mi trang c in private void printDocument1_PrintPage(object sender, PrintPageEventArgs ev) { float linesPerPage = 0; float yPos = 0; int count = 0; float leftMargin = ev.MarginBounds.Left; float topMargin = ev.MarginBounds.Top; string line = null; //Tnh ton s dng ca mi trang linesPerPage = ev.MarginBounds.Height / printFont.GetHeight(ev.Graphics); //In ra tng dng ca File while(count < linesPerPage &&((line=streamToPrint.ReadLine())!=null)) { yPos = topMargin + (count * printFont.GetHeight(ev.Graphics)); ev.Graphics.DrawString(line, printFont, Brushes.Black, leftMargin, yPos, new StringFormat()); count++; } //N tn ti nhiu dng s in trang khc if (line != null) ev.HasMorePages = true; else ev.HasMorePages = false; }

4> Bn vit code cho button Print na l xongprivate void btnPrint_Click(object sender, EventArgs e) { try { streamToPrint = new StreamReader("C:\\Documents and Settings\\Tuan Anh Tuan Em\\My Documents\\Link G2.1.txt"); try { printFont = new Font("Arial", 10); PrintDocument pd = new PrintDocument(); pd.PrintPage += new PrintPageEventHandler(this.printDocument1_PrintPage); pd.Print(); } finally { streamToPrint.Close(); } } catch(Exception ex) { MessageBox.Show(ex.Message); } }

Bi vit ny c chnh sa bi Phngip2410: 30 June 2008 - 11:38 PM http://winsocks.net/Are You looking for a good socks 5 service? But you don't know where to buy?Welcome to WinSocks.Net - Crazy Socks ServiceHere we provide Fresh Socks 5 with fast speed , less blacklist, especially price is cheaper than others service. More over, if you want to test our socks 5 before buying, don't be hesitate to contact our supporter through yahoo to receive Free Socks 5 0 #27 Phngip2410 Nhm: VIP Bi Vit: 1917 Gia Nhp: 08-March 07 Thc s CSTH Gi vo 30 June 2008 - 11:21 PM 24>Kt ni n c s d liu s dng Data Source Configuration Wizard

Trong Visual Studio .NET 2005 c mt vi cng c xy dng trong mi trng tng tc vi ngi pht trin (Integrated Development Enviroment) cho php ngi lp trnh to nhng chng trnh ng dng trn Windows s dng ADO.NET d dng v nhanh chng hn khi bn dng code . Trong phn ny mnh ch lm mt v d n gin m thi .

u tin bn m mt project mi (WinForm) . khi ca s ca project c m , bn hy thay i thuc tnh Text ca Form 1 l Customers .

Tip bn vo Tools > Connect to Database

khi bn lm iu ny th mt hp thoi nh sau s xut hin

Quan st trn u ca danh sch , bn chn lin kt trong danh sch l " Microsoft Access Database File " . Bn nhn vo vng ny ri sau nhn Continue . Khi bn lm , hp thoi Add Connection s xut hin nh sau :

Sau bn vo th mc c Database m dng lm v d trong bi ny . y mnh ly Database sn trong Visual Studio bn no cng c ... Trong my mnh th n trong th mc ny "D:\Microsoft Visual Studio .NET 2005\Crystal Reports\Samples\en\Databases" Sau bn copy qua th mc ca project v d "D:\Aptech\C#\Project\TestWinForm2008\TestWinForm2008"

Sau trong hp thoi Add Connection trn bn nhn vo nt Browse v chn Database m bn va copy qua trong "D:\Aptech\C#\Project\TestWinForm2008\TestWinForm2008"

Sau bn nhn vo nt Test Connection trong hp thoi Add Connection v nu bn thy nh hnh th coi nh bn thnh cng v bn c chn OK l xong ...

Sau khi hon thnh th Data Connections trong Server Explorer s c nt + bn tri . Nhn vi nt ny l ra nhng tu chn Tables, Views v Stored Procedures . Nhn vo nt + gn Tables hin ra nh di

Sau bn nhn vo tu chn Data trong thanh menu trn Data > Add New Data Source

Sau khi chn th mn hnh s hin ra nh sau :

Bn chn tu chn Database v nhn nt Next . Khi bn lm xong iu ny th s xut hin hp thoi sau :

Nhn Next v bn chn nh trong hnh :

Bn nhn vo thanh cng c trn ==> Data > Show Data Source nh hnh sau :

Ca s Data Source s xut hin nh sau :

Bn gi hy ko cc vng trn vo Form ca bn sau chnh li cho ngay ngn th bn s thy nh trong hnh :

Cc bn t chy v kim tra kt qu nha bi ny di qu hix :

Bi vit ny c chnh sa bi Phngip2410: 01 July 2008 - 12:31 AM http://winsocks.net/Are You looking for a good socks 5 service? But you don't know where to buy?Welcome to WinSocks.Net - Crazy Socks ServiceHere we provide Fresh Socks 5 with fast speed , less blacklist, especially price is cheaper than others service. More over, if you want to test our socks 5 before buying, don't be hesitate to contact our supporter through yahoo to receive Free Socks 5 0 #28 Phngip2410 Nhm: VIP Bi Vit: 1917 Gia Nhp: 08-March 07 Thc s CSTH Gi vo 02 July 2008 - 09:22 AM 25>S dng DataGrid View (tip theo ca bi 24)

S dng tip v d ca bi 24 m bn lm . gi bn hy ko form ca mnh cho kch c to ra thm sau bn nhn vo bng Customers trong Data Sources v ko bng vo Form ca bn .

Nu thnh cng th bn s thy nh trong hnh di :

Sau khi bn lm nhng thay i trn bn hy chy th chng trnh ca bn . Lc ny th d liu s khng ch xut hin trong cc TextBox m cn c trong c DataGrid nh hnh di . Bn c th chn cc gi tr trong bng v gi tr tng ng s hin ln TextBox pha trn .

lc ny bn s thy c mt s trng trong hai ct CompanyName v ContactName khng hin ra cho bn thy ht v rng ca ct khng ln ... khc phc iu ny bn hy nhn chut phi ln DataGrid v chn Edit Columns nh trong hnh di

Khi bn lm iu ny th mn hnh sau s xut hin :

Gi bn ca s Selected Colums bn hy chn ct tng ng cn chnh sa v bn ca s Bound Column Properies bn chnh sa thuc tnh Width l rng tng ng m bn cn , trong bi ca mnh th mnh ch thay i hai thuc tnh Width ca CompanyName v ContactName l 200 v 180 ... Cc thuc tnh khc cc bn hy t khm ph nha ^^

Tip theo bn c th thay i nhiu tu chn khc nh mu sc ca Form lc hin th ln chng hn ... Bn nhn chut phi vo DataGrid ny v chn Properties ... Gi bn nhn qua ca s Properties (thng l bn phi) sau bn chn thuc tnh ColumnHeadersDefultCellStyle v nhn vo nt bn cnh ca thuc tnh sau ca s mi hin ln bn c th chnh sa li cc tu chn v mu sc chng hn v.v....Sau khi chnh sa s s trong th Form mnh s nh sau :

Bi vit ny c chnh sa bi Phngip2410: 02 July 2008 - 10:35 AM http://winsocks.net/Are You looking for a good socks 5 service? But you don't know where to buy?Welcome to WinSocks.Net - Crazy Socks ServiceHere we provide Fresh Socks 5 with fast speed , less blacklist, especially price is cheaper than others service. More over, if you want to test our socks 5 before buying, don't be hesitate to contact our supporter through yahoo to receive Free Socks 5 0 #29 Phngip2410 Nhm: VIP Bi Vit: 1917 Gia Nhp: 08-March 07 Thc s CSTH Gi vo 02 July 2008 - 10:30 AM 26>S dng mt ListBox View (Tip theo hai bi 24 v 25)

Sau khi lm xong bi 25 , bn gi hy ko thm vo Form ca bn mt control mi na l ListView t ToolBox . Khi Form ca bn s hin thy nh hnh di :

Sau bn Click vo Listbox v chn Properties . Trong Properties bn chn DataSource v sau l customersBindingSource nh hnh sau :

Sau bn Click trn DisplayMember v chn CustomerID nh hnh di :

Sau bn chy th kt qu ca chng trnh s thy nh di :

Bi vit ny c chnh sa bi Phngip2410: 02 July 2008 - 10:40 AM http://winsocks.net/Are You looking for a good socks 5 service? But you don't know where to buy?Welcome to WinSocks.Net - Crazy Socks ServiceHere we provide Fresh Socks 5 with fast speed , less blacklist, especially price is cheaper than others service. More over, if you want to test our socks 5 before buying, don't be hesitate to contact our supporter through yahoo to receive Free Socks 5 0 #30 Phngip2410 Nhm: VIP Bi Vit: 1917 Gia Nhp: 08-March 07 Thc s CSTH Gi vo 02 July 2008 - 01:42 PM 27> S dng ADO.NET wizard trong nhiu bng c quan h vi nhau

Trong bi ny mnh s gip cc bn cch lm th no m mt chng trnh c th to v xem nhng vng t hai bng khc nhau nhng c quan h vi nhau l bng Customers v bng Orders . Gi bn hy to cho mnh mt project mi v thay i thuc tnh Text ca Form1 l Customer Orders. Nhng bc c bn kt ni C s d liu bn c th tham kho trong bi 24 trn . Bn ch lm khc bc nh trong hnh :

Ch l trong hnh trn th nhng vng m bn s chn trong hai bng Customers v Orders s l nhng vng sau :

*Customers Table:

--CustomerID

--CompanyName

--ContactName

--Phone

*Orders Table

--OrderID

--CustomerID

--EmployeeID

--OrderDate

Bc tip theo l trong thanh tu chn pha trn bn chn Data > Show Data Source

Sau bn ko nhng vng bn Data Sources c Form nh trong hnh di(cha hiu ch ny th bn xem li bi 25)

Kt qu s thy nh trong hnh :

Bi vit ny c chnh sa bi Phngip2410: 02 July 2008 - 01:59 PM http://winsocks.net/Are You looking for a good socks 5 service? But you don't know where to buy?Welcome to WinSocks.Net - Crazy Socks ServiceHere we provide Fresh Socks 5 with fast speed , less blacklist, especially price is cheaper than others service. More over, if you want to test our socks 5 before buying, don't be hesitate to contact our supporter through yahoo to receive Free Socks 5 0 #31 Phngip2410 Nhm: VIP Bi Vit: 1917 Gia Nhp: 08-March 07 Thc s CSTH Gi vo 02 September 2008 - 05:10 PM 28>To mt Setup Project

1>Bn to cho mnh mt Project mi bng cch vo File > New > Project ... Sau bn chn Setup Project nh trong hnh

2>Chn Project ca bn t ca s Solution Explorer v chn View > Editor > File System ...

3>Chn mt Application Folder ca ca s File System sau chn Add > File ... Sau bn chn cc file cn thit chy Project ca bn trong th mc bin > debug (.dll , .exe , .xml ....).

4>Bn tm File .exe (File chy chnh trong chng trnh nu bn c nhiu project) Sau bn nhn chut phi vo n v chn Create Shortcut to Project.exe ...Sau bn cut file va to ra qua mt User's Desktop ...Bn lm tng t v cut Shortcut qua tip User's Programs Menu

5> M Ca s File Type bng cch chn View > Editor > File Type . Bn nhn qua tri v chn mt File Types on Target Machine sau bn Click ln menu Action > Add File Type .Bn i tn mt va to l Vbn.doc .Bn xt thuc tnh Extension ca n l vbn .Bn xt thuc tnh Command l tn ca File exe bi vic chn n t Application Folder .

6>Bn m Launch Conditions Editor bng cch chn View > Editor > Launch Conditions.Chn mt Having the Requirements on Target Machine ... Sau bn nhn Action > Add File Launch Condition .i tn mt Search for file 1 thnh Search for Internet Explorer .Xt thuc tnh FileName l Iexplore.exe .Xt thuc tnh Folder n [ProgramFilesFolder].Xt thuc tnh Depth l 2 .Xt thuc tnh MinVersion l 5.0 .Xt thuc tnh Property l IEFILEXISTS .Bn chn mt Conditon1 v xt thuc tnh Condition l IEFILEEXISTS " " v thuc tnh Message l "Microsoft Internet Explorer 5.0 or heigher version not found. Installl IE and rerun the installer".

7>Chn User Interface Editor bng cch chn View > Editor < User Interface .Bn chn mt Start node ca mt Install ... Sau bn chut phi chn Add Dialog. iu ny s xut hin hp thoi Add Dialog .Bn nhn vo tu chn CheckboxesA t hp thoi Add Dialog sau nhn OK.Bn di chuyn mt CheckboxesA ln trn mt Installation Folder .Xt thuc tnh BannerText ca CheckboxsA l Test Draw.Xt thuc tnh BodyText nh "To install Text Draw, Select the Text Draw checkbox".Xt thuc tnh CheckBox1Label nh "Install Text Draw?" v bn xt thuc tnh Checkbox2Visible , Checkbox3Visible ,Checkbox4Visible l false .

8>Chn File System Editor .Chn Application Folder sau chn Action > Add > Folder .i tn th mc va to thnh "Text Draw" .

9>To file text cha ni dung l "In Rules.vbn" v lu n vi tn l Rules.vbn .To tip 1 file text na cha ni dung l "In Memo.vbn" v lu n vi tn l Memo.vbn ... (C th dng notepad lm).Thm 2 File trn vo th mc Text Draw va to ...Xt thuc tnh Condition ca hai file Rules.vbn v memo.vbn l CHECKBOXA1=1.

Xong Project >>>>

Thn! Bi vit ny c chnh sa bi Phngip2410: 02 September 2008 - 06:45 PM http://winsocks.net/Are You looking for a good socks 5 service? But you don't know where to buy?Welcome to WinSocks.Net - Crazy Socks ServiceHere we provide Fresh Socks 5 with fast speed , less blacklist, especially price is cheaper than others service. More over, if you want to test our socks 5 before buying, don't be hesitate to contact our supporter through yahoo to receive Free Socks 5 0 #32 Phngip2410 Nhm: VIP Bi Vit: 1917 Gia Nhp: 08-March 07 Thc s CSTH Gi vo 06 October 2008 - 03:27 PM 29> Hng dn vit mt auto n gin cho game Phong Thn (c mana + mu)

Cm n Anh hanumanqn v Anh Thm hng dn mnh vit bi ny ....

iu u tin vit auto l bn phi tm a ch ca cc vng nh trong game m c th y l cc offset v BaseAddress ... c th hiu r hn v vn ny bn c th tham kho cng c hack l Tsearch topic sau :

http://cuasotinhoc.v...howtopic=150522

1> Bn s to mt Form nh trong hnh

2> Bn down code di v v mnh hng dn trong code lun v vit bng C# ...(sory hi nng v mnh chung trong my bi m mnh nghin cu cc hm API)

Hook2005.rar (176.27K) Li ti: 427

Ci ny l vit bng VB6 ca anh hanumanqn

http://cuasotinhoc.vn/index.php?act=attach...st&id=25725Bi vit ny c chnh sa bi Phngip2410: 06 October 2008 - 03:38 PM http://winsocks.net/Are You looking for a good socks 5 service? But you don't know where to buy?Welcome to WinSocks.Net - Crazy Socks ServiceHere we provide Fresh Socks 5 with fast speed , less blacklist, especially price is cheaper than others service. More over, if you want to test our socks 5 before buying, don't be hesitate to contact our supporter through yahoo to receive Free Socks 5 0 #33 Phngip2410 Nhm: VIP Bi Vit: 1917 Gia Nhp: 08-March 07 Thc s CSTH Gi vo 18 October 2008 - 08:00 AM 30> Hibernate - Shutdown - Standby - Lock Computer - Log off - Restart in Windown

Ngun : http://www.c-sharpcorner.com

LockComp.zip (18.3K) Li ti: 106

1>Giao din chng trnh :

2>Codeusing System;using System.Collections.Generic;using System.Drawing;using System.Windows.Forms;using System.Runtime.InteropServices;

namespace LockComp{ /// /// Description of MainForm. /// public partial class MainForm { // Importing Windows API library [DllImport("user32.dll")] public static extern void LockWorkStation(); [DllImport("user32.dll")] public static extern int ExitWindowsEx(int uFlags, int dwReason); [STAThread] public static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainForm()); } public MainForm() { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); // // TODO: Add constructor code after the InitializeComponent() call. // } // Lock workstation void BtnLockCompClick(object sender, System.EventArgs e) { LockWorkStation(); } // Log Off void BtnLogOffClick(object sender, System.EventArgs e) { if(DialogResult.Yes==MessageBox.Show("Do you really want to Log Off?","Log Off", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)) ExitWindowsEx(0, 0); } // Reboot void BtnRebootClick(object sender, System.EventArgs e) { if(DialogResult.Yes==MessageBox.Show("Do you really want to Reboot?","Reboot", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)) ExitWindowsEx(2, 0); } // Shutdown void BtnShutdownClick(object sender, System.EventArgs e) { if(DialogResult.Yes==MessageBox.Show("Do you really want to Shutdown?","Shutdown", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)) ExitWindowsEx(1, 0); } // Force LogOff void BtnForceLogOffClick(object sender, System.EventArgs e) { if(DialogResult.Yes==MessageBox.Show("Do you really want to force Log Off?","Force LogOff", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)) ExitWindowsEx(4, 0); } // Hibernate void BtnHibernateClick(object sender, System.EventArgs e) { Application.SetSuspendState(PowerState.Hibernate, true, true); } // Stand By void BtnStandbyClick(object sender, System.EventArgs e) { Application.SetSuspendState(PowerState.Suspend, true, true); } }}

Bi vit ny c chnh sa bi Phngip2410: 18 October 2008 - 08:03 AM http://winsocks.net/Are You looking for a good socks 5 service? But you don't know where to buy?Welcome to WinSocks.Net - Crazy Socks ServiceHere we provide Fresh Socks 5 with fast speed , less blacklist, especially price is cheaper than others service. More over, if you want to test our socks 5 before buying, don't be hesitate to contact our supporter through yahoo to receive Free Socks 5 0 #34 Phngip2410 Nhm: VIP Bi Vit: 1917 Gia Nhp: 08-March 07 Thc s CSTH Gi vo 30 September 2009 - 02:02 PM 31> Cch Ly Source Ca Mt WebSite

ly c Source ca mt Website thng thng th s khng gy cho bn nhiu kh khn, nhng gi s ta gp phi mt trang dng nh th ny mi vo c th khi bn get Source ca n theo cch thng thng m khng truyn vo hai tham s l UserName v PassWord th chng trnh s a ra li sau : The remote server returned an error:(401) Unauthozied .

Cch khc phc th d thi, gi mnh s hng dn bn lm mt chng trnh ging nh sau:Resized to 100% (was 736 x 468) - Click image to enlarge

Gi mnh s a bn phng thc m mnh vit sau v cch dng chc cc bn s bit v y l bi 31 ri m private static string getSourceFromWeb(string strURL, string strUserName, string strPassWord) { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(strURL); request.Credentials = new NetworkCredential(strUserName, strPassWord); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); StreamReader sr = new StreamReader(response.GetResponseStream()); return sr.ReadToEnd(); }

Bi vit ny c chnh sa bi Phngip2410: 30 September 2009 - 02:52 PM http://winsocks.net/Are You looking for a good socks 5 service? But you don't know where to buy?Welcome to WinSocks.Net - Crazy Socks ServiceHere we provide Fresh Socks 5 with fast speed , less blacklist, especially price is cheaper than others service. More over, if you want to test our socks 5 before buying, don't be hesitate to contact our supporter through yahoo to receive Free Socks 5 0 #35 Phngip2410 Nhm: VIP Bi Vit: 1917 Gia Nhp: 08-March 07 Thc s CSTH Gi vo 07 November 2009 - 09:02 AM 31> Cch Hack Quyn Qun Tr Ca Mt WebSite Dnh Cho NewBies

1> Phn tch vn Resized to 82% (was 899 x 601) - Click image to enlarge

Gi s gi chng ta cn hack website trn.

Ta nhn thy rng site trn l dng ca mt site m cho ngi dng c thng tin v c mt ngi c quyn qun tr c th sa thng tin. Vy gi lm cch no m ta c th chim quyn qun tr ca n? Bn rng web ny khng h c phn ng nhp cho ngi dng nn chc hn link ng nhp vo website ca Admin s n u y. Gi mnh th c mt ln ai d c lun ... Bn truy cp vo a ch sau: http://www.cedasit.c.../Administrator/Resized to 83% (was 894 x 545) - Click image to enlarge

n vng ny th theo hiu bit ca mnh l s c hai cch hack. Th nht l bn c th tm li trong cu SQL d ra chnh xc ti khon qun tr. Cch th hai th d hn v c phn hn xui l d pass. Cch ny s p dng bng cch vit mt tool t ng ng nhp v login n khi no thnh cng th thi. S d m cch th hai c th lm c v khi mnh test mnh nhp vo 10 ln pass v ngha v n ch bo l sai ch khng thy c du hiu g hn ch c. Nh vy cch 2 gi tm thi c th p dng c.

Trong phm vi bi ny mnh ch p dng cch th 2 v hng dn cc bn lm n bng C#

2> Phn tch Source

Gi bn s dng trnh duyt v xem Source ca n. Sau khi xem th bn s thy hu nh code ca n n gin ch ch c g. Hi u mnh thy ci kho to th l th ngh chc bo mt cao lm ai d ... By gi bn c th dng chc nng Find trong trnh duyt kim tra nhng ch quan trng ca Source (Ci ny cc bn t tm hiu nha v l cch code ca mi ngi).

Mnh gi cho cc bn nhng dng sau:

C ci ID ca control m n cng ch thm n i th ph qu ... Gi bn c th dng cu lnh ny trong C# t ng in UserName v PassWord vo

try { webBrowser1.Document.GetElementById("modlgn_username").InnerText = "Administrator"; webBrowser1.Document.GetElementById("modlgn_passwd").InnerText = "PassWord"; } catch (Exception ex) { MessageBox.Show(ex.Message); }

V di y s l on lnh dng t ng click vo nt ng nhp try { webBrowser1.Document.GetElementsByTagName("input")[2].InvokeMember("click"); } catch(Exception ex) { MessageBox.Show(ex.Message); }

3> Hon thnh

Gi y bn c th s dng tng trn v vit thm mt on m t sinh ra nhng on User Name V Pass Word v t ng d ti khon qun tr