Modifying a Visual Studio Basic Program from Another Solution - vb.net

Title. Basically, I'd like to be able to make a simple VB solution, and then have a DIFFERENT solution be able to modify some aspect of that solution, from font family (say, font A without this mod, and font B with it), to actually extending code to allow for something the original does not. Help?

Related

Make VB.NET app DPI Aware (Visual Studio 2012)

I'm trying to make an image file from a control using CopyFromScreen, and it fails unless I set the scale to 100%. With a larger scale the image is progressively offset left and up, the further right and down the window is on the screen. (Unfortunately my eyes struggle at 100%)
I initially tried using DrawToBitmap but that fails as there's a rich text box in the control and it's documented that that won't paint.
I've read articles on this forum and followed the suggestion of including the dpiAware setting in the manifest, but that has no effect. I'm no expert and I'm wondering if it's because I only have VS 2012 and my manifest declaration starts with asmv1 rather than asmv3 so I had to amend the example code?
Any suggestions most welcome.

Change style of PivotItemHeader

I currently try to change the visual style of my pivot control in UWP.
I would like to change the plain default style of "just text" to something like this:
This is just an example I quickly found on the web. But it is a good representation of what I want to achieve.
I would like to make the pivot items to look like they are tabs.
They should be visibly seperated from another and when one of the items is selected I want to make it visually stand out from the others.
I'm really new to styling controls. I actually just started to read about it yesterday. But it really helps to make an app visually interesting instead of just the plain default styles.
I would really appreciate some help or guidance here :)
Greetings :)
We can modify the PivotHeaderItem default style to implement the effect. Here is also a similar thread that describes how to achieve it : Pivot Header style
Please note that: the PivotHeaderItem default style is based on the Windows Software Development Kit (SDK) for Windows 10, Version 1511 (Windows SDK version 10.0.10586.0). If your app target on other version, the styles and resources may be have different values. But the approach to implement the effect is similar. You can find the corresponding source in the path of your Windows SDK installation such as:
C:\Program Files (x86)\Windows Kits\10\DesignTime\CommonConfiguration\Neutral\UAP\10.0.16299.0\Generic.

Colordialog in PowerPoint

I am making some add-in to PowerPoint.
I would like to let user choose color using colordialog (or some other this kind control). But it would be the best if it would look exactly like built-in color dialog/color picker in PowerPoint, and with the same colors in sections Theme Colors, Custom Colors and Standard Colors. Is it achievable? If yes, how can I achieve it?
It really depends on what you need to use the color for. Office has many pre-defined controls that can be easily incorporated into an addin, some of which use the standard Office color picker (which includes the theme colors, custom colors, etc. that you are looking for). You can download a list of all Office controls from the Microsoft website (you will only need to use the PowerPointControls.xlsx file). Any of the controls listed in the file can be added to your addin by specifying the idMso in the ribbon XML (assuming you are creating a ribbon). You will need to look through all of the controls to se if there is one that matches the functionality you are looking for.
Note that most of the controls have some sort of additional functionality attached to them in addition to selecting a color. I have not yet found one that selects and returns a color. Hopefully what ever functionality you are in need of is included in one of the controls. You may be able to get a better answer if you provide more information on your specific application.

Why aren't the initial properties of my forms and controls preserved on another computer?

I've made a little Towers of Hanoi game, but nothing what was set on my PC looks the same on a different computer, not even the fonts. Everything is so messed up, I couldn't do it better even if I wanted this to happen. To say it short the backgrounds used for controls and forms are out of place, the initial values used for size and position of both forms and controls are bloody changed, and my project just looks like a huge mess. It's true I've worked in absolute values, because usually a programming language respects the programmer's point of view, and doesn't scales and moves everything the way it wants. If I wanted my project to rescale according to screen resolution I would had used relative coordinates, and made all my forms and controls dimensions be a certain amount of the screen's width and height.
Is there a way to preserve the project just as it was initially designed, so it would look the same on any computer?
I'm using Visual Studio 2010, and Windows 7 as OS.
You don't tell us specifically which properties you've modified from the defaults, or show us a screenshot of the before and after views from which we might be able to infer which modifications you've made. But you did mention something about changing the font, so we'll go with that.
In fact, it does try to preserve your specified properties to the extent possible. But sometimes it is just not possible. For example, if you specify a font for your controls that isn't available on the other computer, then it has no choice but to fall back to a font that is available. If you have any experience with web page design, it is a very similar problem. You have to use a small subset of web-safe fonts to ensure that they will be available on all of your users' computers. That's also why web designers are so keen now on embedding fonts into pages.
Anyway, it goes without saying that if the font has to change, the layout is going to be messed up. Different fonts are different sizes, so different amounts of text are going to fit, causing some to get cut off. That is why, in general, you should avoid changing properties like Font. If you use the defaults, things are a lot more compatible. But neither web pages nor desktop applications are WYSIWYG. You need images or PDF files for that.
Then there are system settings like DPI that can really mess things up, too. Keeping the default font isn't going to help you there. You have to design your application in a smart way. You mention something about relative layouts—these are the ticket. Unfortunately, WinForms doesn't make it easy to do this. It all but forces you into specifying absolute sizes and positions based on the pixel grid, which is mostly a waste of time, as you've seen. I describe in detail how to accomplish this in WinForms in this answer. The AutoSize property will be very useful to you. Of course, you'll also need the dynamically-growing TableLayoutPanel and/or FlowLayoutPanel controls, otherwise you'll end up with automatically sized controls that overlap one another.
Pre-emptive snarky comment: you should totally drop WinForms and use WPF instead. It is new, and cool, and sexy, and all but forces you the other way into pixel-independent layouts. Of course, it also makes it really easy to create butt-ugly, downright unusable applications that look like some of the stuff Microsoft has been churning out over the past couple of years.
#Cody Gray thanks for your insights.
com/qMBJS.png
The first image is how the main menu looks. It's kinda self-explanatory how it should had looked, without the big white margins while the text should had been inside the labels backgrounds
The second one is some in-game footage. And this is just one of the levels. It's so messed up I'm almost sorry I've lost a night doing some heavy work on the image editing side of the matter. I'm not at my own PC right now, so I've tried to rearrange all the stuff directly in Visual Studio's design window, to show how the level should had closely looked. Just imagine it without the white and black margins surrounding some controls.
Also I've tried to set the controls and forms parameters through code, when the form loads, trying to force it to look as it should but the result wasn't any better.

Is there a text editor or ide that will do this things?

Is there a text editor that will let me shade certain code blocks with specific colors so I can easily find them later? Bookmarks are great, but I also wanted to shade with the same color all code blocks which are somehow related to each other.
and
When my current text editors autocreate curly braces or parentheses for me and I type what I want in between them, are there any that let me either jump to the end of the line to put a semicolon there, or "return" to type the next line, or do I always have to use the arrow key to get out of the curly braces? Perhaps there is a shortcut I'm missing?
I think about every code editor, including Notepad++, has bookmarks. If you're looking for a more complete IDE, it probably depends on the language you're using. For .NET languages that is Visual Studio, but you probably would have known that. For PHP, Javascript and HTML/CSS, you can use Netbeans for PHP. Netbeans is also available for Java. It is a rich editor, and I think one of the best free general purpose IDE's available.
Marking pieces of code in colors is unknown to me. I've never seen an editor that supports this. You would also need a project in which to store the start and end points of these blocks, unless you would save them as comments or so in the file itself.
Visual Studio knows regions which you can define by a start tag and an end tag. You can collapse and unfold an entire region at once, making it quite easy to navigate through larger files.
But these regions are actually part of the code file, so you cannot use this for any file, because those region markers will probably make the file invalid.
I'm still wondering why any other shortcut key would be easier or more convenient than 'arrow down'..