Windows Forms
67 TopicsVersioning my Maui Android App
Previously the way to define version code for Android in Maui .csproj file was like this: <!-- Versions --> <ApplicationVersion>3.1.2</ApplicationVersion> <AndroidVersionCode>3</AndroidVersionCode> With the new release of Visual Studio Preview, this has changed to: <ApplicationVersion>3</ApplicationVersion> It works, from Visual Studio, I can bundle a new .aab package (see image below). We see the version code is defined to 3. Unfortunately the version is defined to 1.0.0 and I don't know how to change this. ...when imported on the Google Play Console, it look like this: Unfortunately, when imported I only see the versionCode 3 (which is defined in the .csproj file as ApplicationVersion). What about the versionName (in parentheses) ? Nothing is planned in the .csproj file ? When imported on the Google Play Console, I don't want to have 3 (1.0.0) but I want 3 (3.1.2)... https://developer.android.com/studio/publish/versioning versionCode — A positive integer used as an internal version number. versionName — A string used as the version number shown to users.27KViews0likes8CommentsWhat platform/technology/framework to use. I am lost. :-(
Hi everyone, I want to develop a new application that will run on Windows (desktop app) and android. I have about 30y of experience in development and the last 15 in C#/VS/.NET. At work we work with Winforms/WPF and .NET 4.8. For my personal new product I would like to start with all the latest and greatest but it's hard to find what to use. First of all I upgraded to VS 2022. I've been reading about .NET5/6, Xamarin, Xamarin Forms, .NET MAUI, Win UI, Winforms, WPF, UWP, Blazor, .NET Core, .NET Standard,.... but it's a mess to get an overview of what would fit best. The project would have 1 or 2 core assembly's with the logic and then a UI for Windows and one for Android. So before I start I would like to get an idea of what you would use. Thanks!Solved11KViews1like7CommentsCan’t find .h files
I installed VS2022 in order to create some windows C++ applications. I selected the workloads relating to C++ and desktop applications but when I try and create an application and compile it it comes up with lots of the standard C++ files missing: >In guiddef.h: string.h >In winnt.h: ctype.h, string.h >In framework.h: malloc.h, memory.h, tchar.h Cannot open include file: 'ctype.h': No such file or directory I have been trying adding all manner of extras from the list but nothing I do works. I have even deleted the entire package and tried reinstalling it several times but with the same result. It tries to compile it but I get the same 8 or 9 missing files. The error file: Build started... ------ Build started: Project: WindowsProject1, Configuration: Debug Win32 ------ WindowsProject1.cpp C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\um\winnt.h(34,10): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory Done building project "WindowsProject1.vcxproj" -- FAILED. ------ Build started: Project: WindowsProject1, Configuration: Release Win32 ------ WindowsProject1.cpp C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\um\winnt.h(34,10): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory Done building project "WindowsProject1.vcxproj" -- FAILED. ------ Build started: Project: WindowsProject1, Configuration: Debug x64 ------ WindowsProject1.cpp C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\um\winnt.h(34,10): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory Done building project "WindowsProject1.vcxproj" -- FAILED. ------ Build started: Project: WindowsProject1, Configuration: Release x64 ------ WindowsProject1.cpp C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\um\winnt.h(34,10): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory Done building project "WindowsProject1.vcxproj" -- FAILED. ========== Build: 0 succeeded, 4 failed, 0 up-to-date, 0 skipped ========== I have also installed the VS2022 package on an old laptop expecting the same result but it just worked first time! Both machines are running W10 with VS2022 community version. Any ideas! I’ve wasted two days trying to get this to work.4.4KViews0likes1CommentFull size Windows Forms app have issues on Windows 11
I have developed a full screen application for Windows using .NET 6.0. It works fine on Windows 10 but there are two problems when running on Windows 11. The first one is that the first time there is a come back to a previous form using BackForm.Show() Hide() The application hides itself. After that, it does not happen again, until the application is closed and started again. The other problem on Windows 11 is that there is a form that does not grows well to cover the full screen. It is the only form, and it is characterized for having a DateTimePicker, a ComboBox, and a ListView. All forms inherit from FullSizeForm, which includes the following code: public partial class FullSizeForm : Form { private Rectangle LastFormSize; protected FullSizeForm() { AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; ClientSize = new System.Drawing.Size(800, 450); LastFormSize = new Rectangle(Location.X, Location.Y, Width, Height); } protected void FullSizeForm_Load(object sender, EventArgs e) { MaximizeBox = false; MinimizeBox = false; ControlBox = false; VerticalScroll.Visible = false; VerticalScroll.Enabled = false; FormBorderStyle = FormBorderStyle.None; WindowState = FormWindowState.Maximized; } protected void FullSizeForm_Resize(object sender, EventArgs e) { float xRatio = (float)Width / LastFormSize.Width; float yRatio = (float)Height / LastFormSize.Height; float ratio = xRatio < yRatio ? xRatio : yRatio; foreach (Control c in Controls) { ResizeControl(c, ratio); } float newWidth = LastFormSize.Width * ratio; float newHeight = LastFormSize.Height * ratio; LastFormSize = new Rectangle(Location.X, Location.Y, (int)newWidth, (int)newHeight); } protected void ResizeControl(Control control, float ratio) { int newX = (int)(control.Location.X * ratio); int newY = (int)(control.Location.Y * ratio); int newWidth = (int)(control.Width * ratio); int newHeight = (int)(control.Height * ratio); control.Location = new Point(newX, newY); control.Size = new Size(newWidth, newHeight); float newFSize = (control.Font.Size * ratio); control.Font = new Font(control.Font.Name, newFSize, control.Font.Style); if (control is ListView listView) { foreach (ColumnHeader header in listView.Columns) { int width = header.Width; width = (int)(width * ratio); header.Width = width; } } foreach (Control c in control.Controls) ResizeControl(c, ratio); } } As I said before, the code works fine on Windows 10, but fails on Windows 11 (some buttons lose their texts, as I guess it gets too large) on that particular form. Any help would be greatly appreciated.2.7KViews0likes2CommentsSkiaSharp as maui library part in .net+
Hi, how are you? I´m fine, and like a question and is: Would do you think adapt SkiaSharp in new .net versions? I´m Linux user and Programmer Analyst. My Boss needed a Desktop Application on Linux and the .net 6 doesn´t windows forms on Linux. I was looking on this link: https://github.com/dotnet/Microsoft.Maui.Graphics#supported-platforms, all the plataforms use SkiaSharp, and I thought that it was a good idea the SkiaSharp use as global solution to agilizate to .net 6 and 7 development and the .net has all your resources on all the operating systems. This is only an idea. I wait your answer. Greetings. Juan Diego Ocampo Fx2 Developer2.3KViews0likes1CommentRunning multiple applications(Microsoft Teams(Teams.exe), custom Windows App (.exe)) side by side
I am trying to Integrate the teams in our windows application that appears side by side on the window screen. As of now we have split the window with browser to control Microsoft web teams where the user has to login every time whenever the application opens. so user does not want Web Teams as it have the drawback . So can you please let us know the way of integrating the Microsoft teams executable file into windows form (c# ,VB,etc.) Below is the reference view that should appear on the window screen2.3KViews1like5CommentsHow to create ActiveX Control with Visual Studio
Hi everyone, I need to create an ActiveX Control for my Projects. As I can see MFC Control is a good template to create that kind of library. My question is " Are there any understandable tutorials for that?". I have tried to do it by myself but I cannot add class or method (and then call them) with my ActiveX Control? Thank you1.8KViews0likes1Comment.NET 6 migration
Hi all, During migration of our existing project targeting .NET framework 4.8 we encountered starnge error: MC1000 Unknown build error, 'Could not find type 'System.Web.PreApplicationStartMethodAttribute' in assembly 'C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.5\ref\net6.0\System.Web.dll'.' Basically we have one big class library targeting net6.0-windows that has been used across multiple different smaller projects. This class library is compileable as a stanalone porject with no errors, but as soon as we reference it in our WPF project, also targeting same net6.0-windows, we got this error. Does anyone experiencing sme problem? Any help appreciated...1.7KViews0likes2Comments