为何我的 ListBox1.listindex=1 代码会引发 ListBox_click 事件?

zwbwork 2005-10-21 10:06:42
我的VB程序中有一处把LISTBOX的某一项设为当前选择项,例如ListBox1.listindex=1,结果单步执行时发现它引发了ListBox_click事件,造成了不必要的操作,而第二次再执行到它时就不会引发click事件,为何呢?怎么解决?
...全文
720 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
chenyu5188 2005-10-22
  • 打赏
  • 举报
回复
你给值这个控年的ListIndex属性时就代表你选中了这一项所以会引发事件
xmf_jx 2005-10-22
  • 打赏
  • 举报
回复
combox这个控件也有这种问题。。一样的
faysky2 2005-10-21
  • 打赏
  • 举报
回复
这个问题不只是对ListBox控件,其他像ComBoBox等控件也有这种情况,如果不符合你的要求,你把代码放到另外的事件中去
winehero 2005-10-21
  • 打赏
  • 举报
回复
如果是引用,如楼上用List(Index)。
如果不是,又不想执行Click,那么
可以设一个窗体变量布尔型:m_AllowClick
在设置前将其设为False,设完后改为True,即:
m_AllowClick=False
List1.ListIndex=1
m_AllowClick=True

然后在Click事件开头加上 If Not m_AllowClick Then Exit Sub

不过在List1.ListIndex赋值很多的情况下,这样就有点郁闷,如果这样就将这三句话包到
一公用过程中,在赋值地方调用吧。


fishmans 2005-10-21
  • 打赏
  • 举报
回复
是这样的
如果你只是要引用listbox中的值

可以这个list1.text=list1.list(1)
上官云峰 2005-10-21
  • 打赏
  • 举报
回复
那是因为ListBox1.listindex=1是个固定的值,
第一次运行的时候listbox1.listindex由0变成1 ,值变了,所以触发ListBox_click
只要你继续运行ListBox1.listindex=1一直不变,所以就不会触发ListBox_click

你试试下面的程序
Private Sub Command1_Click()
List1.AddItem "aaa"
List1.AddItem "bbb"
List1.ListIndex = List1.ListIndex + 1
End Sub

Private Sub Form_Load()

End Sub

Private Sub List1_Click()
MsgBox List1.ListIndex
End Sub
wangtopcool 2005-10-21
  • 打赏
  • 举报
回复
似乎没有好的办法解决
你可以把click事件中的代码放到List1_DblClick事件中去啊
winehero 2005-10-21
  • 打赏
  • 举报
回复
不错,设置ListBox的ListIndex属性时会触发ListBox的Click事件。
northwolves 2005-10-21
  • 打赏
  • 举报
回复
比较一下:

Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const LB_SETCURSEL = &H186
Private Const LB_GETCURSEL = &H188
Sub SetListIndex(ByVal Index As Long)
SendMessage List1.hWnd, LB_SETCURSEL, Index, 0&
SendMessage List1.hWnd, LB_GETCURSEL, Index, 0&
End Sub


Private Sub Form_Load()
Dim i As Long
For i = 1 To 10
List1.AddItem i
Next
'List1.ListIndex = 3 '引发List1_Click
SetListIndex 3 '不引发List1_Click
End Sub

Private Sub List1_Click()
MsgBox List1.List(List1.ListIndex)
End Sub
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Net; using System.Net.Sockets; using System.Threading; namespace WindowsFormsApplication2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private int port = 49151; private UdpClient udpclient; delegate void AppendString(sendData sendDatas);//添加用户列表委托 AppendString appendString; delegate void AppendStrings(string text);//添加广播消息委托 AppendStrings appendStrings; delegate void AppendStringGB(sendData text);//添加私人消息委托 AppendStringGB appendStringGB; public sendData sendDatas = new sendData(); IPHostEntry myentry; IPAddress myIp; Thread MyRecData; private void Form1_Load(object sender, EventArgs e) { udpclient = new UdpClient(port); myentry = Dns.GetHostEntry(Dns.GetHostName()); IPselect(); sendDatas.fromIP = myIp; sendDatas.toIP = IPAddress.Parse("255.255.255.255"); sendDatas.content = ""; appendString = new AppendString(AppString); appendStrings = new AppendStrings(AppStrings); appendStringGB = new AppendStringGB(AppStringGB); MyRecData = new Thread(new ThreadStart(RecData)); MyRecData.IsBackground = true; MyRecData.Start(); States(); } /// /// 广播本机IP /// public void States() { IPEndPoint iep = new IPEndPoint(IPAddress.Broadcast, port); byte[] sen = Class2.senDataToByte(sendDatas); udpclient.Send(sen, sen.Length, iep); } /// /// 获取本机IP /// public void IPselect()//查找本机第一个IP地址 { string strHostName; strHostName = Dns.GetHostName(); Console.WriteLine("本机名:{0}", strHostName); IPHostEntry ipEntry = Dns.GetHostEntry(strHostName); IPAddress[] ipAdd = ipEntry.AddressList; foreach (IPAddress ip in ipAdd) { if (ip.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) { myIp = ip; return; } } } /// /// 私聊消息写入消息框 /// /// private void AppString(sendData sendDatas) { int i = forms(sendDatas.fromIP); if (arryFrom[i].Forms.InvokeRequired == true) { arryFrom[i].Forms.Invoke(appendString, sendDatas); } else { arryFrom[i].Forms.textBox1.AppendText("信息来自"+sendDatas.fromIP+":\r\n"+sendDatas.content + "\r\n"); } } /// /// 广播消息写入 /// /// private void AppStringGB(sendData text) { if (textBox1.InvokeRequired == true) { this.Invoke(appendStringGB, text); } else { textBox1.AppendText("消息来自"+text.fromIP+":\r\n"+text.content+"\r\n"); } } /// /// 判断接收的私聊消息是否有窗体,有就反回是哪个窗体。没有就创建一个窗体反悔集合最后一个索引 /// /// /// public int forms(IPAddress sens) { int f = 0; foreach (ArraysForm af in arryFrom) { if(sens.Equals(af.ToIp)) { return f; } f++; } MethodInvoker mi = new MethodInvoker(this.PerChat);//使用MethodInvoker委托跨线程访问 this.BeginInvoke(mi); Thread.Sleep(100); return arryFrom.Count-1; } /// /// 添加发言者的IP到用户列表有的将不添加 /// /// private void AppStrings(string text) { foreach(string str in listBox1.Items) { if(str.Equals(text)) { return; } } if (listBox1.InvokeRequired == true)//使用委托跨线程访问 { this.Invoke(appendStrings, text); } else { listBox1.Items.Add(text); States(); } } sendData sendsa; /// /// 接收广播消息 /// private void RecData() { IPEndPoint remote = null; while (true) { try { byte[] bytes = udpclient.Receive(ref remote); sendsa = Class2.byteTosendData(bytes); AppStrings(sendsa.fromIP.ToString()); string str = sendsa.content; string form = sendsa.fromIP.ToString(); if (str != ""&&sendsa;.toIP.Equals(IPAddress.Parse("255.255.255.255"))) { AppStringGB(sendsa); } if(sendsa.toIP.Equals(myIp)) { AppString(sendsa); } } catch(Exception e) { //MessageBox.Show(e.Message); break; } } } private void button1_Click(object sender, EventArgs e) { Sees(); } /// /// 广播消息 /// public void Sees() { UdpClient myUdpClient = new UdpClient(); try { sendData sens = new sendData(); IPEndPoint iep = new IPEndPoint(IPAddress.Broadcast, port); sens.fromIP = myIp; sens.toIP = IPAddress.Parse("255.255.255.255"); sens.content = textBox2.Text; byte[] bytes = Class2.senDataToByte(sens); myUdpClient.Send(bytes, bytes.Length, iep); textBox2.Clear(); myUdpClient.Close(); } catch { MessageBox.Show("发送失败!"); } finally { myUdpClient.Close(); } } /// /// 关闭窗口 /// /// /// private void Form1_FormClosing(object sender, FormClosingEventArgs e) { udpclient.Close(); } /// /// 双击用户可以私聊 /// /// /// private void listBox1_DoubleClick(object sender, EventArgs e) { sendsa.fromIP = IPAddress.Parse(listBox1.Text); PerChat(); } /// /// 右键点击聊天可以私聊 /// /// /// private void 发送消息ToolStripMenuItem_Click(object sender, EventArgs e) { sendsa.fromIP = IPAddress.Parse(listBox1.Text); PerChat(); } public static List arryFrom = new List();// 装私聊窗口的集合 PersonalChat[] perChat=new PersonalChat[100];//私聊窗口数组 ArraysForm aForm;//私聊窗体类,包含聊天对象IP和窗体 int index = 0; /// /// 新建私聊窗口窗口, /// public void PerChat() { sendData preChatsenData = new sendData(); preChatsenData.fromIP = myIp; preChatsenData.toIP = sendsa.fromIP; preChatsenData.content = ""; perChat[index] = new PersonalChat(preChatsenData); perChat[index].Show(); aForm = new ArraysForm(perChat[index], preChatsenData.fromIP); arryFrom.Add(aForm); index++; } /// /// Enter发送消息 /// /// /// private void textBox2_KeyDown(object sender, KeyEventArgs e) { //if (e.KeyData == (Keys.Enter | Keys.Control)) //{ // textBox2.AppendText("\r\n"); //} if(e.KeyData==Keys.Enter) { Sees(); } } /// /// 发送完消息清空textBox /// /// /// private void textBox2_KeyUp(object sender, KeyEventArgs e) { if (e.KeyData == Keys.Enter) { textBox2.Clear(); } } } }
1 , TaskBar_v0.5.zip"Form_Taskbar is a control for Visual Basic which, once placed onto a form, makes the form act like the Taskbar (minus the Start Menu)." -- David Newcum2 , RemBuilderplus.zip"Rem Builder will auto load on startup to use Rem Builder; start your Visual Basic program with your project code showing, right click and you should see "Rem Builder".3 , syntax.zipThis is an excellent example of how to highlight HTML code in a rich textbox. I encourage everyone to check it out.4 , status.zipThis example demonstrates how to display text about each control the mouse is currently above.5 , dm10e.zipThis COM object allows you to send SMTP mail from many of the most used applications, including:Active Server Pages (Microsoft IIS or Chili!ASP extensions) Microsoft Visual Basic 4.x/5.x/6.x Microsoft Word, Access, Excel 95/97 (VBA) Windows Scripting Host (cscript / wscript) Perl 5.x for Win32 Inprise Delphi 4 Microsoft Visual C++ 4.x/5.x/6.x Microsoft Visual J++ 1.x/6.0 (Java) 6 , ocxex.zip"This is a quick example I made to show you how to use Events and properties in a OCX."7 , news.exeThis control aids as a complete Newsgroup control. It can post messages and recieve messages through the internet.8 , optiondemo.zipThis example demonstrates how to create realistic Option Buttons in Visual Basic.9 , mencrypt.zipThis ocx allows you to encrypt strings while utilizing a password shift method.10 , listtxt.zipThis shows how to retrieve the text from the current selection in a listbox.11 , list_index.zipThis example tells you if the inputted List Index is selected or not.12 , fade.zipThis is a bas to fade a pictuerbox. Can be used to make a progressbar13 , subcls32.zipThis demonstrates hoe to write a subclassing control. And it has many examples as to how to use the control (included.)14 , djmeter.zipThis is the source for a Progress Bar control. Also includes a helpful example.15 , progress.zipThis is an example on how to use the Progress Bar included with Microsoft's Visual Basic.16 , slider.zip"This is a sample of the Slider control that is part of the Microsoft Windows Common Controls(COMCTL32.OCX). "17 , statusbar.zip"This is a sample of the StatusBar control that is part of the Microsoft Windows Common Controls(COMCTL32.OCX). "18 , tabstrip.zip"This is a sample of the TabStrip control that is part of the Microsoft Windows Common Controls(COMCTL32.OCX). "19 , uncommondialog.zipThis is an alternative to Microsoft's (tm) Common Dialog control by Nick Mancini.20 , ucmdex.zipThis is the example to go with Uncommon Dialog OCX.21 , scroll.zipThis demonstrates how to create an auto-scrolling textbox.22 , splitter.zipThis demonstrates how to "split" controls. This is an excellent example, and I reccomend this file for everyone. 23 , mtymse.zip"This project is a fully working ActiveX control, with code, that allows you to control almost every aspect of the mouse. You can move the mouse, click the buttons and adjust the click time from your application."24 , ucmdsrc.zipThis is the source to my OCX. This demontrates how to create a basic OCX. This will aid anyone who wants to create an OCX.25 , avb-systray.zipThis is a good example to add your programs' icon to the Systray. This Zip also includes a helpful example.26 , cmdex.zipThis is an example of how to use the Common Dialog. This demonstrates most of the event procedures of the CM Dialog control.27 , campbell-reg.zipThis demonstrates how to write and retrieve information from the registry.28 , basChangeCursor.zipThis module demonstrates how to animate your cursor through Visual Basic, and Win32.29 , hdcat.zipThis will grab every file on your hard drive and add its path to a listbox.30 , vbo_bump.zipThis DLL allows programmers to easily draw 3D grippers and lines on Device Contexts (DC). 31 , vbo_user32_bas.zipThis BAS file contains many functions to ease the process of using the USER32 DLL. 32 , vbo_gdi32_bas.zipThis BAS File conatains many functions to ease the process of using the GDI32 DLL. 33 , vbo_button_bas.zipThis bas contains functions to manipulate Button class objects34 , LPT_Port.zipRead/write to LPT parallel port35 , DancingBaby.zipA Dancing Baby Screen Saver Which Dance on A Famous Song Macarena ( With Sound ) A Very Cute Screen Saver ,with source code, If you want more avi files then please mail me.36 , superwriter.zipA complete Wordprocessor, with source code. You can save, open files, print them out, copy, cut, paste, well you know the concept!37 , LogOff.zipThis conveniently placed program allows you to log off from your system tray.38 , ChPass.zipChanges NT Domain Passord. This program has two compenants... a server and a a client. The Server must run on a Domain Controller.39 , Reboot.zipThis conveniently placed program allows you to restart your computer more easily, from your system tray. 40 , analogclock.zipThis is a very good demo OCX for an analog clock. Although quite big in size, this is due to the very good background to the clock face. The analog click itself is very accurate and looks very impressive.41 , edge.zipThis program uses a few API calls/functions to set 3D, sunken and etched effects to an image inside an image control. It also has an example of how to change a label control to a 3D command button.42 , splitpanel2.zipA re-written version of the SplitPanel that David originally put onto this site about a year ago. It basically is a control that you place on a form and you can put other controls on the form and by dragging the splitpanel bar around, it does the resizing for you. 43 , avcontrol.zipThis control takes care of many audio and visual functions needed for game and graphical programmers. You can easily retrieve or change the screen resolution and color depth, play audio CDs and standard wave files 44 , fsocontrol.zipThis demonstration version of this control is a wrapper around the FileSystemObject - and makes using the FSO much easier.45 , slidingtoolbar.zipThis project shows how to implement a sliding toolbar in an application using one quick Kernel32 API function "Sleep". The application is fairly simple and easy to implement. 46 , dcsize.zipWhen this control is put onto a form, it ensures that all other controls retain the correct aspect-ratio from the design time view. Basically, it resize all controls on a form when the form resizes. This code is 100% free.47 , colorchooseocx.zipThis great OCX allows you to have a drop down list of colors to allow your user to choose from. The control itself has all the events and properties that you need.48 , xgraphmeter.zipThis is XGraphMeter, a bargraph/meter control good for displaying constantly changing values such as CPU usage or DUN throughput.49 , dynlistmnu.zipWhile trying to come up with a Dynamic menu in VB, I decided that VBs menu object was just too much of a pain to work with This project contains a form to mimic the functionality that I was looking for.. Part of my design criteria was that the menu form 50 , runtime.zipSupposedly, what this code does cannot be done... But it works. Basically, its a demonstration of how you can change control properties at run-time. If you try it in VB, you will get a runtime error, but this code shows you how to do it. Gilbert says51 , ledbulb.zipThis is a first for this author. Its an OCX which represents a characters in the form of led bulbs.52 , textapiroutines.basContained here is a small set of routines can be used with a Rich Text box (RTF) control. It can be used for other controls as well with minor modifications. You are welcome to change, use and distribute the code as you see fit.53 , xflatbutton.zipFlatButton is an owner-drawn flat button that pops up when the mouse passes over it. This version is text-only, but has flexible color support.54 , urllabel.zipWith the development of the internet and intranet applications, this control could could in more and more useful. Its a hyperlink label which will change color or underline when the mouse goes over it 55 , progbar.zipThis is a great replacement for the standard VB progress bar. Its smooth, totally free (all the source code is here), and more versitile than the one that comes with VB.56 , splitpanel.zipThis little control with full source code is remarkably compact but does a lot of fancy things. It allows you to be able to split panels and handles all the resizing behind it. We couldn't think of how to describe it properly, but 下载 it and try it57,basicreg.zipBasic Save and Retrieve Functions58,proguse.zipKeep Track of a Programs Usage59,millisec.zipCount Time in Milliseconds 60,getday.zipGet the Day of Week that a Day Falls On61,shellend.zipNotify the User when a Shelled Process Ends 62,varlist.zipGet a List of Windows Variables 63,detdisp.zipDetermine Display Colors 64,ctrlntwk.zipControl Panel - Network65,ctrluser.zipControl Panel - User Properties66,ctrltwui.zipControl Panel - TweakUI67,ctrlthm.zipControl Panel - Themes68,ctrltele.zipControl Panel - Telephony69,ctrlsys.zipControl Panel - System Properties70,ctrlscrn.zipControl Panel - Screen Savers71,ctrlreg.zipControl Panel - Regional Settings72,ctrlprnt.zipControl Panel - Printers73,ctrlpwr.zipControl Panel - Power Management74,ctrlpw.zipControl Panel - Passwords75,ctrlodbc.zipControl Panel - ODBC3276,ctrlmm.zipControl Panel - Multimedia77,ctrlmdm.zipControl Panel - Modem78,ctrlkbd.zipControl Panel - Keyboard79,ctrlmous.zipControl Panel - Mouse80,ctrlpoa.zipControl Panel - Post Office Admin81,ctrlotlk.zipControl Panel - Outlook82,ctrljoy.zipControl Panel - Joystick83,ctrlie4.zipControl Panel - Internet Explorer 84,ctrlgame.zipControl Panel - Game Controllers85,ctrlfont.zipControl Panel - Fonts86,ctrlarmp.zip Control Panel - Add/Remove Programs87,ctrlanh.zipControl Panel - Add New Hardware88,ctrlanp.zipControl Panel - Add New Printer89,ctrlaccs.zipControl Panel - Accessibility90,ctrlbrf.zipControl Panel - Create Briefcase91,ctrlcdsk.zipControl Panel - Copy Disk92,ctrlcns.zipControl Panel - Create New Shortcut93,ctrldun.zipControl Panel - Dial-Up Networking94,ctrldisp.zipControl Panel - Display Properties95,RegControl.zipFree Registry ActiveX Control. Read/Write String/Binary/DWord values, Check if key/value exists, CreateKey, Delete key/value and enumerate keys/values!96,MouseEvent.zipThis is a Mouse Event procedure that is pretty cool. It can be used for Web designing. Check it out!97,ShellTrayIcon.zipThe CShellTrayIcon class allows your VB application to set, change and delete icons in the system's tray 98,Reboot2.zipReboot remotely. I wrote this to reboot selected PC's during off hours. It is a standalone application that will display a 10 second countdown. Any open data will try to be saved prior to the shutdown process.99,S-Secure.zipThis is S-Secure.....a security program I've coded for Windows. It has 4 modules each in a separate VB project. 100,DriveSpace.zipThis Program finds and displays the Drive's Space.101,Disable_X.zipThis user control allows you to disable the windows close "X" button. Example program included.102,SetParnt.zipShows how to assign controls to different forms at run time. 103,phone.zipA Cellular Phone Application Uses MSCOMM, Modem and normal telephone lines to make calls. You can use this application to make local as well as International calls. 104,Timer01.zipSimple program demonstrating how to create a stop watch using the Timer control. 105,Bubblesort.zipA simple Bubble Sort code that shows how the program works within a VB program. 106,systray.zipJust another Systray Utility, but worse than the others !!! static, flashing and animated Tray-Icons 107,FolderFiles.zipDemonstrates usage of progress bar and list box controls. Its purpose is to get all the files from a specified folder while showing the progress completed. 108,MultipleDataSets.zipThis is a simple, (1) form VB 6.0 program which demonstrates how to plot multiple sets of data on the same graph using the MSChart Control 6.0 (OLEDB). 109,MthVwPrj.zipMonthView control. Lets users view and set date information via a calendar-like interface. 110,calculator4.zipI know this is wierd but I made a calculator control. Just add it to your control bar, double click, and you can use the calculator when your project is at run-time. Source included.111,GradientButton.zipThis button was created to be an enhanced replacement for Visual Basic's standard command button by adding 2 more Border appearance schemes, 2 more button styles, and hover effects. 112,MSChart.zipMSChart. You can view MSChart in Line graph,Pie , Area, etc.. also you can update data provided in the Grid.. Very interesting must see it... 113,printing_tut.zipI made this for a freind to help him out with some basic Printing, i got the idea from a printing tut i found on the net, so the code is not mine. 114,treeview.zipThis code can as many child nodes to a tree view control and can save the data and structure of the treeview control in a text file. Later the data and structure can be retrieved from the text file and filled in the tree view control by clicking the load button. 115,alarm_clock.zipIt simulates an alarm clock. 116,DesktopByAlexDrankus.zipThis program hides/shows desktop, hides/shows taskbar, hides it self from the ctrl+alt+delete, uses pictures to create the forms (pretty cool forms) and many other functions just place this program and all components in a sub-folder 117,Label3D.zipLabel3D lets you change the Label Face Color Shadow Color ON/OFF Shadow. 118,HotLinks.zip Custom Control which acts like a text box, except the developer can specify hot links in the control which act like web page links allowing users to click them, while allowing the developer full control over the result of the click. 119,custbutt.zipThis application shows how to create non rectangular buttons. 120,grid.zipComplete grid coded in vb. supports : locked rows/columns , fg/bg colors , text alignment , cell-edge styles , different selectionstyles . texbox/dropdown cells , cell icons and lots more... 121,analogmeter.zipCreate your own analog meters using MSPaint. These .bmp or .gif files become your meter face. Use the (analogmeter) subroutine to automatically draw the meter needle over the meter face 122,wheel.zipSpinWheel control to be used in place of either the UpDown control or the ScrollBar control.123,ArielBrowseFolder.zipA browse folder control resembling a combobox. When the dropdown button is clicked, browse through a folder treeview to select a directory. Uses the SHBrowseForFolder function, amongst other APIs. A call back procedure is implemented showing the currently selected folder in the browse for folder dialog. 124,pp_prj.zipThis program shows you how to create a sample project that adds print preview capabilities to your Visual Basic program by using a generic object and the Printer object. 125,popup.zipPopUp buttons with only 4 lines of code. 126,adbevel.zipThe bevel control in Delphi is now available in VB. 127,rainbow.zipCool! Have a ProgressBar like in InstallShield!With free selectable fore- and backcolor and the percent value displayed in the middle!Check it out.128,gb12.zipWell folks. Another version of Gold Button is here. I've added a few things. Here they are: Property descriptions, MaskColor, UseMask, Base Address in OCX, picture will now automatically align with text and when you are in desing mode and OnUp property is bsNone, a Dash-Dot-Dot box is drawn over the button, so you can see th button's area. 129,gb11.zipA new version of Gold Button is here dudes.New version has Picture Property and Skin Support. 130,BIGDOGMEDIA.zipMEDIA PLAYER THAT SUPPORTS FORMATS LIKE MP3,AVI,MPEG,WAV ECT.EXAMPLE OF USING ANIMATION WHEN PLAYER IS LAUNCHED. 131,HTML.zipAn HTML editor with complete VB source code. 132,PrintPreview1.zipPrint Setup, and Print Priview application. 133,RTFEditor.zipRTF text editor, HTML text editor, web browser, and more...Try it. Note, make sure your printer is turned on before running the application. 134,VBExplorer-II.zipVBExplorer file utility application. This application uses the Visual Basic TreeView and ListView controls to create a file management application similar to Windows Explorer.135,resizepic.zipShows how to resize a picture box control on a form at run time.
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~= ~ Import REConstructor v1.7c FINAL by MackT/uCF2000 in 2001-2008 ~ = = ~ - *for Windows 9x, ME, NT, 2K, XP, Vista32/64* - ~ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~= If you would like to help continue developing and bug fixing ImpREC and you have ideas, suggestions or bug fixes please visit Tuts 4 You forum in the following topic to share your ideas: http://www.tuts4you.com/forum/index.php?showtopic=6410 Thank you! v1.7c FINAL (PUBLIC VERSION) ---------------------------- - Misc - Fixed bug introduced in 1.7b when DLL's have discardable sections (jstorme) v1.7b FINAL (PUBLIC VERSION) ---------------------------- - Misc - Fixed invalid API bug in user32.dll on Windows 98 (jstorme) - Modified code to improve support for discardable/unreadable sections (jstorme) - Fixed ImageBase problem with DLL's when "Use PE Header from Disk" is checked (jstorme) - Added an "ImpREC Classic" looking version v1.7a FINAL (PUBLIC VERSION) ---------------------------- - Misc - Fixed Win2K crash, AllocConsole was replaced with ActivateActCtx (jstorme) v1.7 FINAL (PUBLIC VERSION) --------------------------- - Misc - Fixed RestoreLastError API set to SetLastError for WinXP/Vista compatibility (MaRKuS_TH-DJM) - user32.dll is always read from the system, prevents a crash from corrupted PE of user32.dll (MaRKuS_TH-DJM) - Latest version of psapi.dll (6.0.6000.16386) included - Fixed Vista64 crash bug (jstorme) - GUI modified and improved (based upon Fly's modification) - Updated/corrected plugins and deleted dups v1.6 FINAL (PUBLIC VERSION) --------------------------- - Misc - Finally fixed the bug in the check for adding section (Thanks to Christoph) v1.6 beta *PRIVATE* ------------------- - Tracers - Tracer Level3 - Added EIP Log - Misc - Finally, support relative calls rebuild (not with the loader yet) - Added a disassembler window for redirected code - Added colour to all known imports (Thanks to Jeff Schering) - Added a hex viewer (built with the disassembler) - Fixed blink in RichEdit control - Checkbox "OpCodes" is enable/disable depending on "Hex View" (Thanks to Muffin) - Removed the useless '/' when there's no name (ordinal only) - Disassembler is allowed on valid slot too now - Fixed HexView to show all printable chars - Added disasm comment for where - Added Right Click function on disasm code to ease the life (TRY IT!) - Added 'Get Imports Filter' in 'Advanced Commands' (Greetings to Titi) - Tooltips added in Options - Fixed bug in "Fix dump" renaming (with the char '_' before the ext) - Added Original First Thunks rebuilder (in Options) - Fixed bug on disabled editboxes (you could edit them.... erm) - Added checks in PEFile.cpp for invalid executables (Thanks to Snacker!) - Fixed some possible problems on sscanf and ordinals ("%X" with WORD type) v1.5.1 beta2 *PRIVATE* ---------------------- - Tracers - Error codes updated for the Tracers Level2 and 3 - Misc - Fixed bug from the 1.5.1 beta1 in the Import Editor (a string bug) - Fixed bug on validation check for the 'Congratulations' text (Thanks to LordByte) - Fixed bug in the (Thanks to LordByte) - New imports scheme added (NOT COMPLETE SO DO NOT USE IT) - Support relative calls rebuild => visible with a (R) tag in imports - Fixed a bug with "Create New IAT". It can now manage a thunk which has several apis of different module (Thanks to EOD) - Added 'Load PE Header'. It could be useful to force ImportREC to use your own PE Header (Thanks to EOD) v1.5.1 beta1 *PRIVATE* ---------------------- - Tracers - Tracer Level3 - New approach (Thanks to EliCZ) - Support SEH chain - No more FS instructions emulation - Dumb Mode (YES, it could be useful for redirected scheme which copies the start code of an API and jump later. It has the behaviour of the Tracer Level1 but it really executes the code) - Misc - Added 'Get API Calls' dialogbox to set addresses filter and heuristics - Added 'Mode Cloak' (for anti-imprec tricks) v1.5 *PRIVATE* -------------- - Loader - Clean up code (the injected loader) - Added an IRC log to explain how to use it (Greetings to LaBBa) - Tracers - Error codes updated for the Tracers Level2 and 3 - Plugin Tracer - Redesigned interface for good reasons (See ) - All examples have been updated for the new interface - Support 'Exact Call' feature - GUI switched into a Submenu (ala WorkerBee#2 by ZigD) - Misc - 'AutoTrace' will not use the Tracer Level2 anymore (play CAREFULLY with the TL2 because it's a global hook) - Windows 95 Support (Thanks to EliCZ, Unknown One and ZigD for testing) - Tested under NT4 (Thanks to Unknown One) - The Import Editor (double click on a function) will look for the nearest valid function in the thunk and will get its module name. => Much faster when editing each function by hand. - Improved 'Exact Call' (It will not retrace all exact calls from a slot if they have already been resolved) - New Module Loader (It should be faster) - Support function names which have more than 256 characters. ImportREC left when clicking on (Thanks to ToyBomB and shandi for reports) - added (Right click on the Log listbox) - Fixed Import Editor to look for the name first before looking for the ordinal - Added 'Skip Main Slot' in Options. It will allow you to trace *ONLY* on all Exact Calls. The main slot will be skipped by the tracer. - will stop any tracers (except 'Plugin' if you did not manage it) even when you have selected several slots to trace - ApiHooks Updated (Greetings to EliCZ) - Added an Exact Calls window (right click on the tree) - Added Remove buttons - Sort datas by column when clicking on it (Yop G-RoM! ;p) - will set the IAT RVA and Size in the PE Directories to 0 (Thanks to Crusader) - *ALL* docs have been updated v1.4.2+ ------- - Misc - Fixed wrong image base/size usage when disabling "Use PE Header From Disk" AGAIN! v1.4.2 ------ - Loader - Finally fixed the bug when rebuilding imports of ripped layers (sometimes, it produced an invalid PE file) - Tracers - Tracer Level3 - A little bit faster - Fixed wrong opcodes (Damn copy&paste! Erm)... (Thanks to necrotoad for his target so i could find that bug) => Should work for latest SD2 => The target should not quit anymore under XP - Misc - Added a filter to "Get API Calls" to get valid addresses only - Fixed wrong image base usage when disabling "Use PE Header From Disk" for reloc'ed target for example (Thanks to Thigo) v1.4.1a ------- - Tracers - Tracer Level1 - Fixed a little bug added from the previous version (It could trace into k32.dll... D'oh myself!) v1.4.1 ------ - Loader - Can handle Kernel32 Ordinal - Tracers - Tracer Level1 - It will not be fooled anymore by latest ASProtect Emulated API - Misc - Erratum: "Fix Damaged PDB" is for Win9x/ME only! - "Create New IAT" feature - "Select Code Section(s)" to precise where is the code in the target - Fixed bug when loading imports file which contains Exact Call with ordinal - Debug stub scheme added (for getting API from an executable which was compiled in debug mode) - Full Dump (can dump EXE & DLL and it should work for antidumping tricks) v1.4 ---- - Tracers - Tracer Level1 - Fixed a small bug on the stack emulator (D'oh! Tamus! :p) - Tracer Level3 - Recoded from scratch (Thanks a lot to G-RoM for his precious help and patience) - Plugin - Asprotect v1.2x Emulated API Plugin (Thanks to ZigD) - Misc - Use PE Header informations from dump or disk (in Options) - Debug privilege is now managed and damaged PDB can be repaired (Thanks to EliCZ) - Renormalized exports (for Win9x/ME only) - Fixed a GPF when using the wheel mouse (or arrows keys) just after selecting a process - "Stick" current imports with new added ones correctly (when you do GetImports with several contigous regions) - "Get API Calls" feature - "Exact Call" for Safecast/Safedisc 2 redirections - Load & Save "Exact Call" Imports - Updated to APIHooks 5.6 v1.3 ---- - Import Editor - An editbox for entering the name of the API (MSDN-like when using Index) - Loader - Layers Auto Finder (with recursion) - Layers editor (add/modify/remove) - Improved relocations - Multiple modules can cohabit in a same thunk - Direct calls/jumps to any imports in all layers, are rebuilt (for portability) - Tracers - Tracer Level1 - A little stack emulator was implemented (very basic though) - Plugin Tracer - TRACERS LEVEL 2 AND 3 ARE STILL NOT COMPLETE AND THERE JUST FOR EXPERIMENTATION. THEY ARE LAME so use them if YOU ARE BORED AND NOT AFRAID TO CRASH your computer, YOU ARE WARNED. - Misc - Improved IAT scanner + Bug fixed on the invalid IAT size (negative) found by it - DLL's names are now based on their filename and not on their header structure - New ApiHooks and as usual it still is impressive how it gains speed each time! (Thanks to EliCZ again) - Check on overlapped IAT by new imports (when not adding a new section) v1.2 *Final* ------------ - Fixed a little bug when there is only one invalid pointer and loader is activated, the dialogbox for entering interval of ripped data/code didn't appear. - Fixed a bug in showing new import size when it is empty (0x100 instead of 0) - Added error managing in the loader if it can't find a dll or an api. (So its size has grown up a little bit) - Fixed a bug on wrong section table location when loading PE files (YODAAAAA!!!!!! ;-)) (and for all my PE related code too...) - ApiHooks updated again!! Thanks to EliCZ, it's really faster than before... Wow! ;-) - Autotrace (do not expect a miracle from its part). Moreover prepare to crash if you manage to use it because it uses the tracer level2... you are warned!! :-) - Improved Ripper analyzer v1.2 RC1 PRE Release -------------------- - Added a loader against faked APIs in thunks. - Fixed a little bug when loading a tree for the last parameter if it has only one character - Get the invalid pointers in the running process when reloading a tree which contains some - Added a flag for loader in tree text files (still is compatible with v1.2b3 version though) - ApiHooks updated - You can rebuild DLL now by clicking on "Pick DLL" button - I decided to retire my Tracer L3 for the moment because it's too buggy v1.2b3 ------ - Useless but funny, changed icon... thanks to Avl!s :-) - Function is correctly selected when double clicking on it for Editing. - Oops! Where was the and file on previous versions???! :-) - Don't use anymore GetCurrentDirectory for looking for - A little note when launching the first time - TimeOut option for Tracer Level2 and 3 - Fix EP to OEP option when fixing a dump - Options are saved in an INI file - Maintaining "Shift" key for Tracer Level1 shows the Module name in the MessageBox title instead of "huhu" :-) and moreover it shows VA correctly now. - Correct ImageSize in PE Header when adding a new section (Windows 98SE and 2k do it automatically but it is better to do it ourselves though) - Added the old good Dennison's uCF logo (i mean the logo, not you Denni! ;-P) in 'About' dialog box - Replace all "between" by "by the way" in all txt files... :-x - Stastistics are shown regularly (thx to Pal) - 'Show Suspect' button (thx to Pal) - Fixed a GPF when closing the running target and continuing to rebuild it (thx to Pal) - Load & Save Tree in text format. (You can still load old binary ".rec" files) (Pal, you can edit them manually now! :-)) - Fixed a bug in my module loader when the module image base is different to its pe header one (ie when it has been moved by windows). (BIG THX TO PAL! ;-)) - Module loading log is more precise now - First prebeta version of tracer l3 (still is VERY BUGGY! You are WARNED!) v1.2b2 ------ - Argh!!!! Export ordinals were fixed now! Sorry, i have forgotten to add the Base for all ordinals!! Marf! That's why my "Import all by ordinal" option didn't work under NT/2000... It's now reactivated under those systems (even if your exe will not be portable to another system) - Fixed a GPF (oops! :-P) when invalidate some particular APIs - Load and Save Tree Models - Enable and Disable controls (buttons and editboxes) when necessary - Tracer level2 is slower (not under Win2000! ;-)) but less buggy than previous version - "Cut thunk" action in right click popup menu. Thanks to my best beta tester Thigo (normal, he's alone ;-P) for reporting me tELock tricks. (Greetz to tE! by the way) ;-) (Read Tips.txt for further details) - Current directory will be the path of your selected process for browsing files - Statistics after clicking on "Get Import" were fixed - Readme.txt was updated. :-) v1.2b1 ------ - Fixed a lame bug on my original IAT finder (a pb on computing its size... thx Chris ;-)) - Multiple Tree Selection - Right Click on Tree (invalidate functions, delete thunk...) - Tracer Level1 (Disasm) was improved (with magic 'Shift" key... look at Tips.txt) - *New* Tracer Level2 (Hook) uses ApiHooks. And big thanks to Yoda for advising me it ;-) - Import module name is auto updated depending on all its functions v1.1 ---- - I have forgotten to considerate the max recursion of the tracer in the options! Now it's fixed. Shame on me, yeah! ;-) - Give up the method to the start address (image base) bounds of the target too (not reliable). Unreal Tournament has shown me that ;-)... BY THE WAY, WHAT A GAME! :-D - Improved tracer again - Improved Original-IAT Auto Finder - GUI : Tree view for import - Default parameter is 'Add new section' DLL v1.0 -------- - DLL was released for GUW32 (by Christoph/UG2000) with its open source code ;-) v1.0 ---- - Give up the method with the limit address of the target (not reliable). Need to reput it in an option - "Auto-IAT Search" button added - "Ultra Arrange" button added - Modify entry point to given OEP into the dump file when fixing it v0.7 ---- - Reorganized code to export it in a dll v0.6a ----- - Show first (or second) invalid element in the 'Imported Function Found' list if it detects a problem in a thunk array - You can change the module of any import functions with the Import Editor - Disable "Import all by ordinal" under NT/2000... It does definitively not work :-( v0.6 ---- - No more leaked memory... I swear! :-) - Support NT/2K by fixing all forwarding export functions (thanks to +The Owl+ AGAIN! ;-)) (Tested on an ASProtected game with total success under win2000 (i mean portable on another system)) - Icedump v6.0.2.2 was released!!! ImportREC will be able to rebuild a 100% portable executable (or very close) with it. (ONLY UNDER WIN9x BY THE WAY) Icedump tries to solve 4 main windows dll which have export functions which point to the same address... => Check it out NOW!!! -> http://icedump.tsx.org v0.5 ---- - Added 2 buttons "Previous ????" and "Next ????" for looking at unresolved pointers quickly - Improved tracer engine... test it and you will see ;-) - Some errors messages are more comprehensible (for Lutin Noir especially ;-D) - GUI has changed a little bit - 'About' diabogbox finally added v0.4 ---- - A memory bug fixed when freeing export infos - "Add new section" in the dump file for the new import datas v0.3a ----- - Bug fixed on hint value which was always set to 0... erm :-) - Import ASCII name address is now aligned on WORD and not DWORD (more smaller size again) - Little filter on all Editboxes - Getting the size of the memory used by the process for memory bounds testing and the tracer v0.3 ---- - First public release - Tested on win2000 and it can not rebuild correctly because of module which contains some API from kernel32.dll of win95/98! :-( (like RltDeleteCriticalSection, ...). If anyone has a solution, please mail me!!!!! - Added a real tracer engine (from Borg disasm of Cronos) but still need to improve its use - Added a function editor (for fixing Asprotect 'GetProcAddress'-like redirected function by yourself for example) ** Double-click on the function in the "Import Functions Found" list and choose the good API. - Bug fixed : you can fix a dump which does not have RVA=RAW addresses and sizes - Import all by ordinal for smaller import datas v0.2 ---- - Not yet tested on NT/2000 - Fixed a lot of bugs - Added a poor tracer for redirected functions Feb/01/2001 ----------- v0.1 - First release
EhLib 5.0 Build 5.0.13 Russian version. Full source included. ------------------------------------------------------------------- The Library contains components and classes for Borland Delphi versions 5, 6, 7, 8 & 9 , Borland C++ Builder versions 5 & 6, Borland Developer Studio 2006, CodeGear Delphi 2007, CodeGear RAD Studio 2009 and Embarcadero RAD Studio 2010. TABLE OF CONTENTS ----------------- Overview Installation Library Installation Help Demonstration Programs Registering and Prices Other information About author Overview -------- The Library contains several components and objects. TDBGridEh component TDBGridEh provides all functionality of TDBGrid and adds several new features as follows: Allows to select records, columns and rectangle areas. Special titles that can correspond to several/all columns. Footer that is able to show sum/count/other field values. Automatic column resizing to set grid width equal client width. Ability to change row and title height. Allows automatic broken of a single line long title and data row to a multiline. Title can act as button and, optionally show a sort marker. Automatically sortmarking. Ability to truncate long text with ellipsis. Lookup list can show several fields. Incremental search in lookup fields. Frozen columns. DateTime picker support for TDateField and TDateTimeField. Allows to show bitmaps from TImageList depending on field value. Allows to hide and track horizontal or vertical scrollbars. Allows to hide columns. Allows to show 3D frame for frozen, footer and data rows. Allows to draw memo fields. Multiline inplace editor. Proportional scrolling independently of sequenced of dataset. Automatically show checkboxes for Boolean fields. Allows to show checkboxes for other type of fields. Has a procedures to save and restore layout (visible columns, columns order, columns width, sortmarkers, row height) in/from registry or

1,451

社区成员

发帖
与我相关
我的任务
社区描述
VB 控件
社区管理员
  • 控件
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧