在WMP中,我在任务栏缩略图上显示了按钮.如何在C#中为我的winforms应用程序制作它们?

我已经在Windows上为我的大多数程序编程而没有偏好问题.我刚启动Ubuntu 12.04并将我的类加载到Eclipse中.在运行时,我在控制台中收到:
Oct 12, 2012 8:14:38 PM java.util.prefs.FileSystemPreferences$6 run
WARNING: Prefs file removed in background /home/steven/.java/.userPrefs/prefs.xml
Run Code Online (Sandbox Code Playgroud)
我知道这与preferencesUbuntu 上的系统有关,但是几次Google搜索都没有解决方案.任何人都可以帮助我如何解决这样的错误?
我正在使用NME创建一个小游戏.我喜欢在Neko和C++目标的标题栏中显示目标.那可能吗?
谢谢.
我得到一个JFrame,我想显示一个带有边框的JLabel,填充可能是50px.当我将JFrame的大小设置为750,750,并将JLabel的大小设置为650,650并将位置设置为50,50时,它显示它很奇怪...这是我的代码:
public class GUI {
/**
* Declarate all
*/
public int height = 750;
public int width = 750;
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
int x = (screen.width / 2) - (width / 2); // Center horizontally.
int y = (screen.height / 2) - (height / 2); // Center vertically.
/**
* Create the GUI
*/
JFrame frame = new JFrame();
Border border = LineBorder.createBlackLineBorder();
JLabel label = new JLabel();
public GUI(){
label.setBorder(border);
label.setSize(700, 700);
label.setLocation(0, 0);
frame.getContentPane().setLayout(null);
frame.add(label);
} …Run Code Online (Sandbox Code Playgroud) 我正在尝试加载并在屏幕上显示纹理,但是我正在接收一个黑色的盒子,它将被显示出来.
两个主要方法是"LoadTexture"和"Draw Image",我假设其中一个错误.
using System;
using System.Diagnostics;
using OpenTK;
using OpenTK.Graphics;
using OpenTK.Graphics.OpenGL;
using System.Drawing;
using System.Drawing.Imaging;
namespace FailRender
{
public class FailRender: GameWindow
{
public FailRender() : base(800, 600, GraphicsMode.Default, "Hoard of Upgrades")
{
GL.ClearColor(0, 0.1f, 0.4f, 1);
texture = LoadTexture("sand.jpg");
}
private int texture;
public int LoadTexture(string file)
{
Bitmap bitmap = new Bitmap(file);
int tex;
GL.Hint(HintTarget.PerspectiveCorrectionHint, HintMode.Nicest);
GL.GenTextures(1, out tex);
GL.BindTexture(TextureTarget.Texture2D, tex);
BitmapData data = bitmap.LockBits(new System.Drawing.Rectangle(0, 0, bitmap.Width, bitmap.Height),
ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppRgb);
GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba, data.Width, data.Height, …Run Code Online (Sandbox Code Playgroud) 我编写的代码转换double为int异常.
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
Cannot cast from Double to int
Run Code Online (Sandbox Code Playgroud)
这是我的代码
Double d = 10.9;
int i = (int)(d);
Run Code Online (Sandbox Code Playgroud) 我只是想将我的代码从C#转换为Haxe NME.我使用枚举作为标志.
[Flags]
enum State
{
StateOne = 1,
StateTwo = 2,
StateThree = 4
}
Run Code Online (Sandbox Code Playgroud)
并使用它
if (someObj.HasState(State.StateOne | State.StateTwo))
{
// Contains both the states. Do something now.
}
Run Code Online (Sandbox Code Playgroud)
我不知道如何在Haxe NME中这样做.
谢谢.
完全披露:家庭作业.
说明:我无法理解我的老师.
问题:
编写一个调用的方法
printSquare,它接受两个整数参数amin和amax,并以方形模式打印从包含min到max包含的数字 .方形图案通过示例比通过解释更容易理解,因此请查看下表中的示例方法调用及其生成的控制台输出.广场的每一行由一个在min和 之间增加整数的循环序列组成max.每行打印该序列的不同排列.第一行以min开头,第二行以with开头min + 1,依此类推.当任何一行中的序列到达时max,它会回绕到min.您可以假设该方法的调用者将传递amin和amax参数min小于或等于max

我不能为我的生活弄清楚如何使数字停在'max'值并从线的中间重新开始.
这是我到目前为止,道歉,但我遇到for循环的问题.
for(int i = 0; i < row; i++)
{
for(int d = 0; d < row; d++)
{
System.out.print(d+1);
}
System.out.println(i);
}
Run Code Online (Sandbox Code Playgroud)
我知道我使用了两次行,但它是我可以让编译器用循环形成方形的唯一方法.有人甚至远程了解我想要做什么吗?:/
是否需要在删除之前取消绑定缓冲区对象?如果我将它绑定在VAO中并将其删除而不解除绑定(绑定到0),会发生什么?参考文献是否仍然存在?
public void dispose()
{
glBindVertexArray(0);
glDeleteVertexArrays(vaoID);
glBindBuffer(GL_ARRAY_BUFFER, 0);
glDeleteBuffers(vboVertID);
glDeleteBuffers(vboColID);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
glDeleteBuffers(eboID);
}
Run Code Online (Sandbox Code Playgroud)
删除前取消绑定是好的还是坏的做法?
我试图找到两个整数的最大公约数.但我不明白我的代码有什么问题:
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int a = s.nextInt();
int b = s.nextInt();
while (a != 0 | b != 0) {
if (a >= b) {
a = a % b;
} else {
b = b % a;
}
}
if (a == 0) {
System.out.println(b);
} else {
System.out.println(a);
}
}
}
Run Code Online (Sandbox Code Playgroud)