[Solved] How to use multiple fonts for each combobox item in WPF?

You can implement this easily by using data binding with item template inside comboBox as following: First of all you need to create item template for your ComboBox, which can be done in many ways, Iam going to use the simplest way as following: <ComboBox Width=”200″ Height=”35″ VerticalContentAlignment=”Center” ItemsSource=”{Binding Items}”> <ComboBox.ItemTemplate> <DataTemplate DataType=”{x:Type local:ItemViewModel}”> <StackPanel … Read more

[Solved] Undo comboboxes – in groupbox

Problem solved. When combobox is databinded you have to clear databind, fill dataset again and repeat databind. This solved my problem, but It also all other databinded controls gets undo this way. solved Undo comboboxes – in groupbox

[Solved] Using Two “IsNot Nothing” in single If statement

For convenience, I removed the first loop with OrElse condition, defined the length variable for individual line so that I can add up later to find total length. Remove: If ((Area.DrainRightFound IsNot Nothing) OrElse (Area.DrainRightFound IsNot Nothing)) Then Follow the following. Dim FoundationLength As Double, FoundationArea As Double, **IndividualLength As Double** For Each Area As … Read more

[Solved] Replace a word in files and folders name

To settle the matter of the path I was only served in the string that the path of all this: “/wordthatwasreplacedinthenames/” with “/wordthat usedtoreplacethe old/” in this way has changed all the folders with the old word with the new one more as I put the two slash does not change the last folder that … Read more

[Solved] How would I approach sorting something like this

Here is how you would do that without using a Treeview (why wouldn’t you I don’t know): void Main() { string values = @”1 14 141 141010 141020 141030 141040 141050 141060 142 142010 142020 144 1440 144010 144020 144030 144040 145020 145030 145010 “; int myValue; // Splitting and converting to a collection of … Read more

[Solved] How would I be able to send an email through my vb.net application?

10s of googling gives you 10k answers.. The easiest way to send a mail with .net is by using the System.Net.Mail Namespace and a smtp server where you have an e-mail account like mostlikely Gmail. Imports System.Net.Mail Module Module1 Sub Main() Try Dim SmtpServer As New SmtpClient() Dim mail As New MailMessage() SmtpServer.UseDefaultCredentials = False … Read more

[Solved] How to display random ques from text file in vb?

I would make a class “question” like this: public Class Question public questionas String public answer1 as String public answer2 as String public answer3 as String public answer4 as String public correctAnswer as integer public sub new(que as string, a1 as string, a2 as string, a3 as string, a4 as string, answer as integer) question= … Read more