Search:
Type: Posts; User: coffent
Search:
Search took 0.02 seconds.
-
Thanks paul and jmcilhinney for your helpful responses. I'll have to rethink how I want to do this (as a very amateur programmer).
-
Thanks. Yes that works. However I now have another problem. I believe the following statement works under .NET Framework 4.8:
My.Computer.Keyboard.SendKeys("x{ENTER}", True)
The Microsoft...
-
With a Console Application with target framework .NET Framework 4.8 a statement of the form
My.Computer.FileSystem.WriteAllText(...)
works fine. But with one with target framework .NET 7.0 I...
-
Of course! I was creating the project as a Console App, not a Console App (.NET Framework). When I switched to the latter, everything worked fine. Dumb mistake! Thanks all for your help.
-
Thanks for the suggestion. I tried
Dim text as String = My.computer.clipboard.gettext() and still get an error message,
'computer' is not a member of 'Test.My' (where "Test" is the name of the...
-
As a very occasional and self-taught programmer, I've written apps under .NET Framework 4.7.2. To use the statement
Dim text as String = Clipboard.GetText()
under that framework it's...
-
Thanks for the suggestion. The discussion you referred me to mentions that SerialPort.GetPortNames points to HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM. Checking that, I found that indeed it...
-
I have a soft modem that I access through a vb program. The following code snippet
Dim sp1 as String
For Each sp1 In My.Computer.Ports.SerialPortNames
Debug.Print(sp1)
Nextfinds 1 port,...
-
-
Thanks to you both.
Visual Studio 17.4.2; Framework 4.8.04084
As a newbie to this, I'm hoping one of you could post a code snippet showing how I should proceed. Thanks!!
-
Imports System.Security.Cryptography
Module Module1
Sub Main()
Dim rng As RandomNumberGenerator = RandomNumberGenerator.Create()
Dim n As Integer = rng.GetInt32(10)
End...
-
Thanks for your responses. I've found the problem, something I should have checked before. The .wav file I was trying to play is very short - ~50 ms. This plays fine on my desktop, but apparently...
-
I've written a program in Visual Basic that, among other things, plays a .wav sound file. It works as expected on my desktop computer. When I put the executable on my laptop where Visual Studio is...
-
Thanks. I'm part-way there. When I add the statement you suggested (using () rather than []) the point color changes from gold to blue, not red. I've added the following test code:
...
-
I've created a chart and defined a series as:
Dim series1 As New DataVisualization.Charting.Series
series1.ChartType = DataVisualization.Charting.SeriesChartType.Point
This works but I'd...
-
Thanks, Amerigoware. I've added your suggestion to my collection of code snippets in case I run into a similar problem. I discovered later in the case I asked about that the problem had nothing to...
-
-
I have a vb program that reacts to an event (a signal from a modem) by displaying a form. I have the following (simplified) code:
Public Class MainForm
Dim eventOccurred As Boolean =...
-
Thanks for the information. I wasn't sure what the difference was in the two calls (not only for Split but for other functions as well). I'll follow your advice.
-
Yes! Removing "Imports System.String" fixed the problem. I'm actually not sure why I had it there in the first place. Thanks!
-
Thanks for the reply, but I'm afraid I don't understand. The first version does have two parameters: "ab-c-d" and "-". The second, as I said, was copied directly from an example shown on a...
-
I have a test line in a VB program:
Dim testArray() As String = Split("ab\c\d", "\")
which I copied more or less straight from a Visual Basic reference.
It works fine in one program, but in...
-
Done. (BTW, I wanted to rate your replies (high) but I have first to "spread some Reputation around".)
-
Thanks - that cleared everything up.
Also, I found code tags, for next time.:)
-
Here is a toy program that illustrates my question:
Public Class Form1
Sub Form1_Load() Handles Me.Load
Dim form2In As String = ""
Form2.Show()
'How do I wait for...
-
OK, thanks - I finally understand! Thanks everyone for your patience!
-
Sorry, but I still can't find it.
182404
The only option I see at the top left is the icon "VB". It shows in 3 columns the project name, the form name, and in a dropdown menu, "contextMenu1". But...
-
Thanks, passel, for your reply.
I suspected that what was meant was just the Visual Studio editor, but I'm still missing something that's probably very obvious.
The Help says "As soon as you...
-
Very basic question: A Microsoft help page* says,
As soon as you declare a variable using WithEvents, the variable name appears in the left drop-down list of the class's Code Editor.
When you...
-
Right-clicking worked. As you pointed out, jmcilhinney, I should have tried that, but somehow it slipped my senescing mind. Apologies for impelling you to reply.
-
When I loaded an old project, I got the message "The VB project {name} is targeting ".NETFramework, Version=4.0, which is not installed on this machine. To proceed, select an option below." I chose...
-
Thanks for the info. I'll use that instead.
-
Thanks - that fixed it! The only problem was the space between "-" and "jar". The Shell statement now works, though I'm wondering if there is some advantage in using the Process.Start command...
-
I am trying to run a jar file with a target using: Shell("java - jar {path1}File.jar {path2}TargetFile")
From a command prompt, when I run {path1}File.jar...
-
Thanks for the information and the work-around, which solved my problem. As you guessed, the program targets .NET Framework 4.7.2.
Also, I've set the default to Option Strict On. :-)
-
Microsoft Docs for "String.Contains Method" says an overload is "Contains(String, StringComparison)". Yet when I try
Dim comp As StringComparison = StringComparison.OrdinalIgnoreCase
Dim str...
-
It appears I must have, even though I didn't think so. I remapped the drives being sure I was *not* an Administrator, and now VB runs under User mode. Thanks.
-
Thanks for your reply. As I said, I think I've solved the problem by simply running VB as an Administrator. Why that should be necessary I don't know (but there are many things about Windows I...
-
I finally solved the problem by running Visual Studio as Administrator. I don't know why this is necessary, and if anyone has an explanation I'd be glad to see it!
-
Thanks - one problem solved. Now for the other one :)
|
Click Here to Expand Forum to Full Width
|