如何为Windows制作一个简单的程序? [英] How to make a simple program for windows?

查看:262
本文介绍了如何为Windows制作一个简单的程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为Windows制作一个简单的程序可执行程序,我希望程序显示一张图片,我想要显示一些透明的GIF(或任何支持透明度的文件类型),当你点击那个透明的时候例如,我喜欢用另一个gif改变那个gif ......在那个背景图像上会有很多版本的......但它们必须在非常精确的位置,像素。



制作此类程序的最简单方法是什么?我在编程方面的背景包括一些非常旧版本的pascal,我知道一些HTML



我应该使用哪种语言或应用程序(最好免费)?帮助这里的家伙



提前致谢



我尝试了什么:



我还没有尝试过任何东西。

我还没有尝试过任何东西。

解决方案

如果你的背景是非常旧的Pascal和HTML,那么我说实话不会从C ++开始 - 我会从C#开始。它是一种更简单的语言,它与.NET框架紧密结合,这意味着你想要做的事情变得非常简单。



创建一个WinForms应用程序,删除一个将PictureBox放到它上面。

在Form.Load事件中(类似于你在HTML中用来将Javascript代码添加到网页的OnClick等)加载第一张图片并将其设置为Image属性of Picturebox。

处理PictureBox.Click事件并加载另一张图片。



全部完成。



但是......我强烈建议你先从一门课程或一本书(Wrox和Addison Wesley都做一些非常好的)开始学习C#和.NET,然后再进入这里 - 那里如果你不这样做,很容易错过很多会让你的生活变得更简单!


最简单的方法是从C#开始。请查看此示例项目。为了检测位图,你可以使用鼠标点击事件。



提示:花点时间学习基本没有失败。


< blockquote>我同意C#是Windows编程的不错选择,但是如你所知,Pascal你也可能对像 Lazarus 这样的Pascal语言感兴趣。

这里有一些选择: https://www.slant.co/topics/5070/~pascal-based -languages-targeting-x86 [ ^ ]

Lazarus是免费开源的,与Delphi相比已经非常昂贵。


I want to make a simple program executable for windows, i want the program to display a picture and over that picture i want to display some transparent gifs (or whatever file type that supports transparency), and when you klick on that transparent gifs for example, i want to change that gif with another in its place... there will be many of them in many plases over that background image... but they must be in very precise places, to pixel.

What is the simplest way to make such a program? my background in programing includes some very old versions of pascal and i know some html

What language or application (preferably free) should i use? help here guys

Thanks in advance

What I have tried:

I haven't tried anything yet.

I haven't tried anything yet.

解决方案

If your background is very old Pascal and HTML, then I wouldn't start with C++ to be honest - I'd start with C# instead. It's a simpler language, which is tightly bound to the .NET framework, which means that what you want to do becomes pretty simple.

Create a WinForms app, drop a PictureBox onto it.
In the Form.Load event (similar to the OnClick and so forth that you use in HTML to add Javascript code to a webpage) load the first picture and set it as the Image property of the Picturebox.
Handle the PictureBox.Click event and load another picture.

All done.

But ... I'd strongly recommend that you start with a course or a book (Wrox and Addison Wesley both do some very good ones) to learn C# and .NET before wading into this - there is a lot you could easily miss that would have made your life a lot simpler if you don't!


The easiest way is to start with C#. Take a look at this example proejct. For detecting bitmap you can use the mouse click events.

tip: take the time to learn the basic for not fizzling around.


I agree that C# is a good choice for Windows programming, however as you know Pascal you might also be interested in a Pascal language like Lazarus.
Here are some options: https://www.slant.co/topics/5070/~pascal-based-languages-targeting-x86[^]
Lazarus is free and open source, in contrast to Delphi which has become very expensive.


这篇关于如何为Windows制作一个简单的程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆