Delphi 2007 代码补全、语句提示的快捷键是什么
CTRL+SPACE 代码补全,很好用的(先改了输入法热键)CTRL+SHIFT+C 编写申明或者补上函数CTRL+SHIFT+↑(↓) 在过程、函数、事件内部, 可跳跃到相应的过程、函数、事件的定义(在INTERFACE和IMPLEMENTATION之间来回切换)CTRL+SHIFT+G 插入GUIDCTRL+J (弹出DELPHI语句提示窗口,选择所需语句将自动完成一条语句)代码模板CTRL+K+E(F) 标识符变小(大)写CTRL+K+O(N) 选中的变小(大)写CTRL+O+U 切换选择块的大小写SHIFT+鼠标左键 先选中任一控件,按键后可选中窗体CTRL+SHIFT+I(U) 代码整块移动右移(左移)2个空格ALT+鼠标左键 可以块选代码,用来删除对齐的重复代码非常有用CTRL+E 快速选择(呵呵,试试吧,很好玩的)在属性窗口按TAB键将光标移动到属性名区,键入属性名的开头字母可快速定位到该属性F4 运行到光标处F5 设置断点F7 步进式调试同时追踪进入子过程F8 步进式调试不进入子过程F9 运行CTRL+F9 编译CTRL+B BUFFER LIST窗口CTRL+F2 停止正在调试的程序CTRL+F3 弹出CALL STACK窗口CTRL+F5 添加览视变量CTRL+F7 计算窗口SHIFT+F8 调试时弹出CPU窗口CTRL+BACKSPACE 后退删除一个词,直到遇到一个分割符CTRL+T 删除光标右边的一个单词CTRL+Y 删除光标所在行CTRL+SHIFT+Y 删除光标之后至本行末尾之间的文本ALT+[(]) 查找上(下)一个对应的标识符CTRL+ENTER 定位到单元文件CTRL+HOME 将光标移至文件头CTRL+END 将光标移至文件尾CTRL+PAGEDOWN 将光标移至本屏的最后一行,屏幕不滚动CTRL+PAGEUP 将光标移至本屏的第一行,屏幕不滚动CTRL+↑(↓) 向上(下)滚动屏幕,光标跟随滚动不出本屏ALT+G 跳到某行CTRL+鼠标转轮 加速滚屏CTRL+S 保存SHIFT+CTRL+S 保存所有CTRL+F4 等于FILE菜单中的CLOSE项CTRL+I 插入TABCTRL+L 继续查找CTRL+N 同ENTER键,但光标位置保持不变CTRL+SHIFT+E 显示EXPLORERCTRL+SHIFT+F11 打开工程设置窗口F11 显示属性窗口SHIFT+ALT+F11 显示对象列表窗口F12 切换EDITOR/FORMCTRL+F12 打开某个单元文件SHIFT+F12 打开某个窗体CTRL+TAB 在INSPECTOR中切换PROPERTIES页和EVENTS页CTRL+SHIFT+N 定义(取消)书签NCTRL+N 跳到书签NCTRL+SHIFT+T 在光标行加入TO-DO注释CTRL+箭头 以1像素单位更改所选控件位置SHIFT+箭头 以1像素单位更改所选控件大小ALT+F11 Use某个单元SHIFT+F10 等于鼠标右键(WINDOWS快捷键)。SHITF+箭头 选择文本
QQ空间的免费背景代码如何使用
QQ空间代码使用方法:1、进入自己空间,将你要的代码复制---“javascript:window.top.space_addItem(1,9475,0,0,1,1,94);”引号里就是一个完整的代码2、将复制的代码粘贴到地址栏(就是输入网址的那个地方)覆盖地址栏里的地址,然后按回车就会出现效果3、点一下“自定义”,点保存(在点保存之前随便把某一模块稍微移动一下,不然保存的时候系统会提示你没有空间没有改变不能保存)就可以了免费皮肤:夜光 javascript:window.top.space_addItem(1,7510,0,80,0,0,94);最美的花 javascript:window.top.space_addItem(1,7513,0,80,0,0,94);那年的歌 javascript:window.top.space_addItem(1,7619,0,80,0,0,94);如此的爱 javascript:window.top.space_addItem(1,4693,0,80,0,0,94);幸福的故事 javascript:window.top.space_addItem(1,4703,0,80,0,0,94);QQ之声官方皮肤 javascript:window.top.space_addItem(1,15306,0,0,1,1,94);QQ三国官方皮肤 javascript:window.top.space_addItem(1,15166,0,80,0,0,94); QCC-QQ空间Flash皮肤----免费全屏皮肤----免费静悄悄 javascript:window.top.space_addItem(1,8669,100,80,100,100,94);快乐十分 javascript:window.top.space_addItem(1,8674,0,80,100,100,94);迷失世界 javascript:window.top.space_addItem(1,9475,0,0,1,1,94);蓝色 javascript:window.top.space_addItem(1,11762,0,0,96,96,94); 全红 javascript:window.top.space_addItem(1,11273,0,80,0,0,93); javascript:window.top.space_addItem(1,15166,0,80,0,0,93);蓝色带满天星效果javascript:window.top.space_addItem(1,7510,0,80,0,0,93); 纯紫 带少量花javascript:window.top.space_addItem(1,4703,0,80,0,0,94); 比较 接近 全白javascript:window.top.space_addItem(1,7513,0,80,0,0,93); 纯米黄 带星光javascript:window.top.space_addItem(1,7619,0,80,0,0,93); 纯浅绿 带星光javascript:window.top.space_addItem(1,4693,0,0,0,0,93); 全粉(带少许花瓣)
求java小游戏源代码
表1. CheckerDrag.java // CheckerDrag.javaimport java.awt.*;import java.awt.event.*;public class CheckerDrag extends java.applet.Applet{ // Dimension of checkerboard square. // 棋盘上每个小方格的尺寸 final static int SQUAREDIM = 40; // Dimension of checkerboard -- includes black outline. // 棋盘的尺寸 – 包括黑色的轮廓线 final static int BOARDDIM = 8 * SQUAREDIM + 2; // Dimension of checker -- 3/4 the dimension of a square. // 棋子的尺寸 – 方格尺寸的3/4 final static int CHECKERDIM = 3 * SQUAREDIM / 4; // Square colors are dark green or white. // 方格的颜色为深绿色或者白色 final static Color darkGreen = new Color (0, 128, 0); // Dragging flag -- set to true when user presses mouse button over checker // and cleared to false when user releases mouse button. // 拖动标记 --当用户在棋子上按下鼠标按键时设为true, // 释放鼠标按键时设为false boolean inDrag = false; // Left coordinate of checkerboard’s upper-left corner. // 棋盘左上角的左方向坐标 int boardx; // Top coordinate of checkerboard’s upper-left corner. //棋盘左上角的上方向坐标 int boardy; // Left coordinate of checker rectangle origin (upper-left corner). // 棋子矩形原点(左上角)的左方向坐标 int ox; // Top coordinate of checker rectangle origin (upper-left corner). // 棋子矩形原点(左上角)的上方向坐标 int oy; // Left displacement between mouse coordinates at time of press and checker // rectangle origin. // 在按键时的鼠标坐标与棋子矩形原点之间的左方向位移 int relx; // Top displacement between mouse coordinates at time of press and checker // rectangle origin. // 在按键时的鼠标坐标与棋子矩形原点之间的上方向位移 int rely; // Width of applet drawing area. // applet绘图区域的宽度 int width; // Height of applet drawing area. // applet绘图区域的高度 int height; // Image buffer. // 图像缓冲 Image imBuffer; // Graphics context associated with image buffer. // 图像缓冲相关联的图形背景 Graphics imG; public void init () { // Obtain the size of the applet’s drawing area. // 获取applet绘图区域的尺寸 width = getSize ().width; height = getSize ().height; // Create image buffer. // 创建图像缓冲 imBuffer = createImage (width, height); // Retrieve graphics context associated with image buffer. // 取出图像缓冲相关联的图形背景 imG = imBuffer.getGraphics (); // Initialize checkerboard’s origin, so that board is centered. // 初始化棋盘的原点,使棋盘在屏幕上居中 boardx = (width - BOARDDIM) / 2 + 1; boardy = (height - BOARDDIM) / 2 + 1; // Initialize checker’s rectangle’s starting origin so that checker is // centered in the square located in the top row and second column from // the left. // 初始化棋子矩形的起始原点,使得棋子在第一行左数第二列的方格里居中 ox = boardx + SQUAREDIM + (SQUAREDIM - CHECKERDIM) / 2 + 1; oy = boardy + (SQUAREDIM - CHECKERDIM) / 2 + 1; // Attach a mouse listener to the applet. That listener listens for // mouse-button press and mouse-button release events. // 向applet添加一个用来监听鼠标按键的按下和释放事件的鼠标监听器 addMouseListener (new MouseAdapter () { public void mousePressed (MouseEvent e) { // Obtain mouse coordinates at time of press. // 获取按键时的鼠标坐标 int x = e.getX (); int y = e.getY (); // If mouse is over draggable checker at time // of press (i.e., contains (x, y) returns // true), save distance between current mouse // coordinates and draggable checker origin // (which will always be positive) and set drag // flag to true (to indicate drag in progress). // 在按键时如果鼠标位于可拖动的棋子上方 // (也就是contains (x, y)返回true),则保存当前 // 鼠标坐标与棋子的原点之间的距离(始终为正值)并且 // 将拖动标志设为true(用来表明正处在拖动过程中) if (contains (x, y)) { relx = x - ox; rely = y - oy; inDrag = true; } } boolean contains (int x, int y) { // Calculate center of draggable checker. // 计算棋子的中心位置 int cox = ox + CHECKERDIM / 2; int coy = oy + CHECKERDIM / 2; // Return true if (x, y) locates with bounds // of draggable checker. CHECKERDIM / 2 is the // radius. // 如果(x, y)仍处于棋子范围内则返回true // CHECKERDIM / 2为半径 return (cox - x) * (cox - x) + (coy - y) * (coy - y) 《 CHECKERDIM / 2 * CHECKERDIM / 2; } public void mouseReleased (MouseEvent e) { // When mouse is released, clear inDrag (to // indicate no drag in progress) if inDrag is // already set. // 当鼠标按键被释放时,如果inDrag已经为true, // 则将其置为false(用来表明不在拖动过程中) if (inDrag) inDrag = false; } }); // Attach a mouse motion listener to the applet. That listener listens // for mouse drag events. //向applet添加一个用来监听鼠标拖动事件的鼠标运动监听器 addMouseMotionListener (new MouseMotionAdapter () { public void mouseDragged (MouseEvent e) { if (inDrag) { // Calculate draggable checker’s new // origin (the upper-left corner of // the checker rectangle). // 计算棋子新的原点(棋子矩形的左上角) int tmpox = e.getX () - relx; int tmpoy = e.getY () - rely; // If the checker is not being moved // (at least partly) off board, // assign the previously calculated // origin (tmpox, tmpoy) as the // permanent origin (ox, oy), and // redraw the display area (with the // draggable checker at the new // coordinates). // 如果棋子(至少是棋子的一部分)没有被 // 移出棋盘,则将之前计算的原点 // (tmpox, tmpoy)赋值给永久性的原点(ox, oy), // 并且刷新显示区域(此时的棋子已经位于新坐标上) if (tmpox 》 boardx && tmpoy 》 boardy && tmpox + CHECKERDIM 《 boardx + BOARDDIM && tmpoy + CHECKERDIM 《 boardy + BOARDDIM) { ox = tmpox; oy = tmpoy; repaint (); } } } }); } public void paint (Graphics g) { // Paint the checkerboard over which the checker will be dragged. // 在棋子将要被拖动的位置上绘制棋盘 paintCheckerBoard (imG, boardx, boardy); // Paint the checker that will be dragged. // 绘制即将被拖动的棋子 paintChecker (imG, ox, oy); // Draw contents of image buffer. // 绘制图像缓冲的内容 g.drawImage (imBuffer, 0, 0, this); } void paintChecker (Graphics g, int x, int y) { // Set checker shadow color. // 设置棋子阴影的颜色 g.setColor (Color.black); // Paint checker shadow. // 绘制棋子的阴影 g.fillOval (x, y, CHECKERDIM, CHECKERDIM); // Set checker color. // 设置棋子颜色 g.setColor (Color.red); // Paint checker. // 绘制棋子 g.fillOval (x, y, CHECKERDIM - CHECKERDIM / 13, CHECKERDIM - CHECKERDIM / 13); } void paintCheckerBoard (Graphics g, int x, int y) { // Paint checkerboard outline. // 绘制棋盘轮廓线 g.setColor (Color.black); g.drawRect (x, y, 8 * SQUAREDIM + 1, 8 * SQUAREDIM + 1); // Paint checkerboard. // 绘制棋盘 for (int row = 0; row 《 8; row++) { g.setColor (((row & 1) != 0) ? darkGreen : Color.white); for (int col = 0; col 《 8; col++) { g.fillRect (x + 1 + col * SQUAREDIM, y + 1 + row * SQUAREDIM, SQUAREDIM, SQUAREDIM); g.setColor ((g.getColor () == darkGreen) ? Color.white : darkGreen); } } } // The AWT invokes the update() method in response to the repaint() method // calls that are made as a checker is dragged. The default implementation // of this method, which is inherited from the Container class, clears the // applet’s drawing area to the background color prior to calling paint(). // This clearing followed by drawing causes flicker. CheckerDrag overrides // update() to prevent the background from being cleared, which eliminates // the flicker. // AWT调用了update()方法来响应拖动棋子时所调用的repaint()方法。该方法从 // Container类继承的默认实现会在调用paint()之前,将applet的绘图区域清除 // 为背景色,这种绘制之后的清除就导致了闪烁。CheckerDrag重写了update()来 // 防止背景被清除,从而消除了闪烁。 public void update (Graphics g) { paint (g); }}