meragon / unity-winforms Goto Github PK
View Code? Open in Web Editor NEWA Windows Forms port for Unity3d
License: MIT License
A Windows Forms port for Unity3d
License: MIT License
Hi,
I'm sorry to bother you, I'm a student and I have to code an application using Unity and Windows Form but I don't know how to code with that.
Is there an easy way to put what you did in a unity project ? Or should I write it all other again to make it work ?
Thank you very much for your answer.
Hello im very interested in porting AccordNet to unity and use it in mobile devices, but it depends heavily on system.drawing, is Your version cross platform?
First of all, great Asset, love the look!
Altough ive got two small questions. First, the color of my TextBox is black when I focus it and regardless what i
m doing i cant change it.. just want it to be the normal white color. Second I couldn
t manage to change the FontStyle to Bold.
Would appreciate every help, thank you
I can't figure out how to disable resizing of a form.
I have tried to change the ControlResizeTypes type by calling SetResize(ControlResizeTypes.None).
The only solution I have figured out now is to set the min/max size to the same values, but this still allows the user to hover an edge to get the resize cursor.
Must consider the size of the header, scrollbars & border size.
Sorry it was unclear from the images provided. are the form windows restricted within the game rendering area or can they go to multiple monitors outside the primary game window and such?
Used in MonthCalendar control.
Need mono update.
Workaround: create your own culture info and feed it to Application.currentCulture.
uwfAppOwner is null
Hi,
where are those screenshot taken from?
Hi, I can't seem to get any multiselect functionality with any of the form elements. You can't use the multiselect parameter with the open file dialogs, and with a ListBox there seems to be no way to set it so you can select multiple items. I'm kind of at a loss. I need a way to select multiple things, whether it's more than one file in an OpenFileDialog or just being able to pick more than one thing in a ListBox, either would be great.
Maybe I'm missing something? Are checkboxes the only way to have more than one selection in the same group of things?
I can't seem to get MessageBoxButtons
to work. For example to have the MessageBox.Show
with Yes, No and Cancel. Is this a functionality that simply hasn't been implemented?
Hi, is the Code Editor you present as an example on the description page available in a github project? If yes, could you provide the link, I was not able to find it. The same for the material design example, is that also available somewhere? Thanks.
https://camo.githubusercontent.com/c4c061bdf76cee66895ddd5f8daf586f52435417/68747470733a2f2f692e696d6775722e636f6d2f594a33593542442e706e67
Thanx for this Great Effort ,But problem is i dont know where to start ?
means there is no Example scene , no guide.
Neat project. Only issue I've encountered so far.
Hi
I regularly visit this repo because WinForm is exactly what I miss the most right now in Unity.
Big kudos for your wrapper !
The only thing that prevents me from using it now is that it seems a bit greedy in performance.
Do you have any suggestions or planning to improve on that?
I wonder if the new features of Unity 2018 could be an « easy way » to address this point.
Anyway, thanks for all !
It feels like wrong way. But I need to make sure it will be possible in future to separate editor rendering (like VS editor) and in-game rendering.
Some features is also hard to use, because u need to get Application reference from somewhere, right now it's stored in control.uwfOwner.
Recompiling in editor sometimes cause this error. Can't find out why.
i creat c# code in unity3d and implement Control,copy your codes,but when i run,only show a mouse icon 。why?thanks!
I tried to use webbrowser in a c# dll, it works fine when used in winform. but cannot work in unity.
when invoke webbrowser.navigate, error as below:
NullReferenceException: Object reference not set to an instance of an object
System.Windows.Forms.WebBrowser.Navigate (System.Uri url)
but webbrowser is actually not null!
I am using the PanelMenuStrip from your Example, but I would like to have some more Events for the ToolStripMenuItems (like MouseEnter/ MouseLeave). Can you give me some tips on implementing this?
Too complex.
Why is there no handle attribute
First I m soo impressed by the initiative of porting WInform to .NET! crazy work!
So my question: is AxHost also going to be ported?
i would love to do it but that seem way above my abilities
Issue from 2009.
I'm trying to interact with game objects from the WinForms but can't seem to make it work. How would you go about turning on and off a game object from the WinForms class? What I hope to achieve is to make a WinForm button turn on and off a settings panel, which is a Unity game object. I'm running the script below to generate the tool strip. Since it doesn't derrive from MonoBehaviour
I'm not able to directly attach and interact with game objects and was hoping it would be possible to just instanciate a class with the game object already connected.
using UnityEngine;
using System.Drawing;
using System.Windows.Forms;
public class WinFormToolStrip : Form
{
public WinFormToolStrip()
{
// Instances of Unity classes
PanelOpener panelOpener = new PanelOpener();
panelOpener.TogglePanel();
...
}
Hi there,
This project looks incredibly useful for use in larger projects - unfortunately the GPL means it's basically impossible to use in a commercial context. Could you consider a re-license to Apache2/MIT/BSD or LGPL?
Thanks!
I'm having quite a time trying to make it so that the text color and focus background color for a text box are different. When you click on a text box to enter some text, the background changes to the same color as the text, very dark gray. There appears to be no way to change just the focus color.
When you change the ForeColor for your Textbox and then click on the text box, the focus color is different, but the text is now also that color, so there is no way to see what you are typing. The same thing actually happens with NumericUpDowns too. It happens in the Examples as well. I'll attach an image showing it with the NumericUpDown in the examples. Can anything be done about this?
Your wrapper and your help enabled me to finish my application. I just wanted to say thank you a lot for that. Here's the repository for my application Cube 3D. You're free to add it to your "Other projects who use my wraper" if you wish of course. Thanks a lot!
MessageBox.Show("zsq","zsq");
Button button1 = new Button();
button1.Location = new Point(108, 101);
button1.Name = "button1";
button1.Size = new Size(75, 23);
button1.TabIndex = 0;
button1.Text = "button1";
button1.Click += (sender, args) =>
{
Debug.Log("test2");
};
Form form = new Form();
form.Text = "zsq";
form.MinimumSize = new Size(600, 400);
form.Controls.Add(button1);
form.Show();
As far as i see this problem occurs on comboboxes (like when rendering OpenFileDialog), thus making the forms unusable (half of stuff just disappears).
Stacktrace:
NullReferenceException: Object reference not set to an instance of an object System.Drawing.Graphics.uwfDrawImage (System.Drawing.Image image, System.Drawing.Color color, System.Single x, System.Single y, System.Single width, System.Single height) (at Assets/Scripts/Outsourced/Unity-WinForms-master/System/Drawing/Graphics.cs:195) System.Windows.Forms.ComboBox.OnPaint (System.Windows.Forms.PaintEventArgs e) (at Assets/Scripts/Outsourced/Unity-WinForms-master/System/Windows/Forms/ComboBox.cs:378) System.Windows.Forms.Control.RaiseOnPaint (System.Windows.Forms.PaintEventArgs e) (at Assets/Scripts/Outsourced/Unity-WinForms-master/System/Windows/Forms/Control.cs:604) System.Windows.Forms.Control.RaiseOnPaint (System.Windows.Forms.PaintEventArgs e) (at Assets/Scripts/Outsourced/Unity-WinForms-master/System/Windows/Forms/Control.cs:623) System.Windows.Forms.Application.Redraw () (at Assets/Scripts/Outsourced/Unity-WinForms-master/System/Windows/Forms/Application.cs:248) Unity.API.UnityWinForms.OnGUI () (at Assets/Scripts/Outsourced/Unity-WinForms-master/Unity/UnityWinForms.cs:330)
Tested on TreeView control with 1 million nodes.
Hello!
I am pretty new to Unity and C#, so thank you for this very useful project!
I would like to ask if there is an easy way to save a table created with TableView script.
Thank you in advance!
Would it be possible to make a more detailed description of how you would actually use this in a project? It seems like a really good implementation of WinForms in Unity, but it's a bit hard to get started using it.
Can you tell me what repo is using it as a code editor that you show pic for?
and also shift + tab
Too complex.
First one, I can only adjust the spacing of the cells by CellPadding, but I can't just adjust the spacing between rows and keep the column spacing the same. I didn't find relevant attribute values in the TableView class.
Second one, I want to use my own picture as the close icon in the upper right corner of the form. My picture looks like this:
But, after I replaced the close.png in the Resources folder with my own picture, the close icon looks like this in the unity:
I wonder why the background color of my picture will be changed.
thanks!
Cant do drag and drop development like winform in visual studio
using github's release feature or modify readme, support .unitypackage will be easy to use for users.
I added the .ttf font file format to the Asset folder. The name of .ttf font file is "times new roman.ttf". And then, I added font to the script UnityWinForms.
I used the font that I imported in a new script.
Form form = new Form();
form.Font = new System.Drawing.Font("times new roman", 11);
But there was a error about "Font not found".
I wondered if there was something wrong with the format of my imported font file, or something else.
thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.