Search:
Type: Posts; User: Bulldog
Search:
Search took 0.14 seconds.
-
I have an image which has a number of shapes, all are the same color and on a white background. Is there a quick way of counting how many shapes there are?
I don't want to know what shape they...
-
I found a solution which I shall put here for posterity...
Download FreeImage from freeimage.sourceforge.net/download.html, compile the DLL for .Net and after adding a reference to it, you can...
-
I have a PNG file which is a greyscale image and I want to do calculations on the data within it. I don't need to display it, I just need to get at the pixel data and assemble a 2D array of the 16...
-
If I have a function that accepts an array as a parameter, e.g.
double DoStuff(int arr[])
Are there any ways of specifiying the indices of that array to effect a change in the array element...
-
The move to Python is motivated by platform independence. Since performance is an issue, a Linux platform may be better for some users and Windows for others. Python is not a replacement or even an...
-
I just finished a very large app using WPF and it was, to be honest, something of a nightmare. It was my first time into WPF and also the first time in my career I didn't enjoy programming. I work in...
-
I got to the bottom of this and for posterity the solution is;
Assuming MyCollection has a member "Color", create an additional string member such as MyCollection.KnownColor and set it to...
-
<TextBlock Text="{Binding MyColor}" Width="80" >
<TextBlock.Background>
<SolidColorBrush Color="{Binding MyColor}" />
</TextBlock.Background>
</TextBlock>
This also doesn't...
-
I have a ListView where one element of the Collection is a color and the element is called "ItemColor" (of type Color). I want to set a given ListViewItem to be that color.
No matter what I try, I...
-
A console has no KeyPress handler, so you have to simulate that usig something like;
ConsoleKeyInfo MyKeyInfo;
do
{
MyKeyInfo= Console.ReadKey();
...
-
It works for me, but the text will only show as Selected while the TextBox has focus. So you might be better off highlighting using Bold text for example or perhaps changing the text Color.
...
-
The WebBrowser control has no KeyDown but it does have PreviewKeyDown, so if the WebBrowser has focus and you press a key it will raise that event as below;
Private Sub Form1_Load(sender...
-
To show it as selected, you would need;
TextBox1.Text = "Hello"
TextBox1.SelectAll()
To clear the text, you can use TextBox1.Clear()
-
What 'type' is HumanPlayersCard? Is it an array? or is it a string? (in which case HumanPlayersCard(0) is only the left letter/digit).
-
According to MSDN, the ItemHeight allows adjustment https://msdn.microsoft.com/en-us/library/system.windows.forms.listbox.itemheight(v=vs.110).aspx
-
Is the file in use?, perhaps it's locked.
Try this
Dim B As New Bitmap(My.Resource.<bitmap name>)
B.Save("FileName", System.Drawing.Imaging.ImageFormat.Png)
-
Add;
Chart1.Series.Clear()
Chart1.Legends.Clear()
-
I've used the CompareDataTables in this post and it seems fast, but then again I only have small'ish tables (32x20)....
-
-
You can use a NumericUpDown control and set decimal places to two. You then nudge it up/down with the arrows or just type in the number.
-
Well... my interpretation is below. I tested this on quite a few examples (but I'm not sure it's 100% correct, so code read it and check it for yourself).
I'm sure this could be cut down but...
-
It depends on the engine, the VB.Net Regex engine is different to other implementations. I'll have a think about this, now I can see how it works, I can decompose it and reconstruct it.
-
I know a lot about regex but this one has me stumped. But I think I see how this works and it doesn't do what I thought, it's not looking for words.
It starts an index of zero and looks for...
-
I'm not sure how that regex is working but the equivalent function appears to be this;
Public Class Form1
Dim Words As New List(Of String)
Dim Occurrence As New List(Of Integer)
...
-
Dim str As String = "ABCDEFGHIJKLMNOP"
MessageBox.Show((str.Length - (str.IndexOf("G") + 1)).ToString)
-
Windows has the infrastructure to create a network, so I would be inclined to use that. You can also create a network drive which becomes a mapped drive to each minion. Putting a folder there with...
-
I'm guessing that your PictureBox is 474x367.
If you load a picture (e.g. 320x200) into a PictureBox it will scale to fit into the PictureBox size (depending on the SizeMode property). If you save...
-
Then set x and y to the position it's supposed to start from.
-
Firstly you should be drawing graphics in the Paint method of the form, not the click method of the button. To raise the Paint event, you call the Invalidate method.
You're currently drawing a...
-
Does this work?, maybe you already do this;
Private Sub TrackBar1_KeyDown(sender As System.Object, e As System.Windows.Forms.KeyEventArgs) _
Handles TrackBar1.KeyDown
...
-
That's a weird requirement but perhaps something like this;
Dim NumericUpDown1ExistingValue As Integer
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles...
-
What is the value of instance supposed to be? What value is "count" when this occurs?
In your "New" button you have;
Dim instance As New TheStuff
which will create "instance" but local to...
-
Not that I know of, but you can detect a click in a few lines of code;
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) _
Handles MyBase.Load
For Each ctl As...
-
A Class is like a re-usable component, it represents an 'object' or 'type'. You can create multiple instantiations of Classes i.e. create objects that exist together but are independent of each...
-
ok, so you have files with extension .ham and you have associated your application with that extension, so when you double click a ham file, it starts your program. When your program opens, you want...
-
If you're TLP extends beyond the visible area, that code will not work since it relies on the mouse position. You would need to adjust the position based on the amount of scrollbar movement.
...
-
The file path of what?, the application?, the current directory?, an input file?
-
If you have PictureBox controls in the TLP, why not use events associated with those PictureBoxes to identify which you are over/clicking etc? A PictureBox has a set of events associated with it and...
-
I did a quick google which turned up this very nice CodeBank submission from i00;
...
-
That code is looks like it's adapted from VB6, it's littered with 'old' statements and I can see a lot of coding errors. The worst is that there are Try/Catch statements that have no corresponding...
|
Click Here to Expand Forum to Full Width
|