|
When posting your question please:- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode HTML tags when pasting" checkbox before pasting anything inside the PRE block, and make sure "Ignore HTML tags in this message" check box is unchecked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
I get this error message when I install Coral 2.2.2.
What is the solution?
A module that was compiled using NumPy 1.x cannot be run in
19:27:56:ObjectDetectionCoral: NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
19:27:56:ObjectDetectionCoral: versions of NumPy, modules must be compiled with NumPy 2.0.
19:27:56:ObjectDetectionCoral: Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
19:27:56:ObjectDetectionCoral: If you are a user of the module, the easiest solution will be to
19:27:56:ObjectDetectionCoral: downgrade to 'numpy<2' or try to upgrade the affected module.
19:27:56:ObjectDetectionCoral: We expect that some modules will need time to support NumPy 2.
|
|
|
|
|
Apologies, we are trying to make a fix for this today. In the meantime, here is something that's worked for one user:
CodeProject.AI Server: AI the easy way.[^]
(also in the future, this is the board to use for CodeProject.AI Server issues to get a faster response.
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
|
For example this packages I need to install but it has 154 Packages. How to install all of them ?
|
|
|
|
|
You're going to have to go into more detail. I have never heard of such a situation where an app needs so many packages.
You can only install one package at a time. There is no way to select a vendor and say "install everything" or even select more than one package and install it.
To install 154 packages, you would have to write a Powershell script or batch file, with all the appropriate command lines and execute it to get all those packages installed.
|
|
|
|
|
Ok thanks. I was testing a vendor components and wanted all the components available to me
|
|
|
|
|
I can not open the old form again. I get this error:
Timed out while connecting to named pipe
Picture:
https://learn-attachment.microsoft.com/api/attachments/201941-image-14-05-22-at-723-am.jpg?platform=QnA[^]
I searched and followed some steps but without solution
- Disabled my firewall
- Change warning level to none in the options of "Windows Forms Designer"
- Changed target .Net from net8 to net7
- Deleted .vs, obj , bin
- Creating new form also result in the same problem
Any other solution ? I use VS 2022 community
|
|
|
|
|
|
Try this:
Go to Tools menu and click Options. In the dialog, in the upper-left corner of the window, type "preview". In the list of items that shows up on the left, click On Preview Features. In the right side of the window, UNCHECK the "Use the preview Windows Forms out-of-process designer..." option. Click OK and restart Visual Studio.
|
|
|
|
|
I get now this error:
An error occurred in 'myproject' while attempting to open 'Form1.cs [Design]'
Value does not fall within the expected range.
|
|
|
|
|
I changed target framework to net471 then save, reload then change it back to net8-windows then save, close VS and open the project again and now the form loaded normally !!!
|
|
|
|
|
Restart Visual Studio and Your Computer
- Sometimes, simply restarting Visual Studio or your computer can clear up temporary issues.
Run Visual Studio as Administrator
- Right-click on the Visual Studio shortcut and select "Run as administrator." This can help if there are permission issues.
Check for Updates
- Ensure that you are using the latest version of Visual Studio 2022. Go to **Help > Check for Updates**.
Disable Extensions
- Some Visual Studio extensions can interfere with functionality. Try disabling any non-essential extensions:
- Go to **Extensions > Manage Extensions** and disable them temporarily.
Repair Visual Studio
- If nothing else works, consider repairing your Visual Studio installation:
- Go to **Control Panel > Programs and Features**, find Visual Studio, and select the **Repair** option.
Check Windows Services
- Ensure that the required Windows services are running:
- Press `Win + R`, type `services.msc`, and press Enter.
- Look for "Visual Studio Hosting Process" and make sure it's running. Restart it if necessary.
Clear User Data
- Clear Visual Studio user data:
- Close Visual Studio.
- Open a command prompt and run:
```bash
devenv /resetuserdata
```
- Note that this will reset your settings and preferences.
Check Anti-Virus or Security Software
- Sometimes, security software can block certain processes. Try temporarily disabling your anti-virus software to see if it resolves the issue.
Check for .NET SDK Issues
- Ensure that the correct .NET SDKs are installed. You can verify this in the Visual Studio Installer under the "Individual components" tab.
Try a Different User Profile
- Create a new Windows user profile and see if the issue persists there. Sometimes user profile issues can cause unexpected behavior in applications.
navicosoft.com
navicosoft.com.au
navicosoft.co.uk
|
|
|
|
|
Using Visual Studio 2022 latest build. EDIT: This is not a .NET Framework project, it's a .NET core Windows Forms project, or whatever it's called.
I have a situation where I've added a bunch of controls to a form, but Visual Studio is not updating the Designer.cs file with the new controls. The controls all exist as I placed them on design canvas, but when I compile the project, the controls don't appear in the EXE because the Designer.cs file is not synchronized with the canvas.
Question: How can I force Visual Studio to rewrite the Designer.cs file so that all the controls that I added are accounted for? I'd rather not remove the form from the project and add it back because I'd lose all the work I did to place the controls.
Any assistance is greatly appreciated!
SOLUTION:
I was able to fix it by removing the project from the solution and then adding it back.
The difficult we do right away...
...the impossible takes slightly longer.
modified 8-Jul-23 18:32pm.
|
|
|
|
|
Yip, removing the project (or whatever it's called ) from the solution and then adding it back will do the trick. I just had to throw this in here lol.
|
|
|
|
|
Hello,
I have two windows forms, form1 and form2. I have placed a button on form1. When I click the button on form1 it will open up form2 via
new Form2().Showdialog()
I have added 2 buttons to my form2 and a serialport. My 2 buttons are called Connect and Disconnect on form2. When I click the Connect button my comm port opens using
serialport1.open() . When I click Disconnect the port closes using
serialport1.close(). This all works fine until I click
serialport1.open then close form2 then open form2 via my form1 button again. Keeping in mind that the port is still open or that's my hopes, when I press Disconnect on my form2 my port will not close.
|
|
|
|
|
I can think of 2 possibilities:
1. Put the serial port code in a handler class that implements IDisposable and pass it to form2 in the constructor:
Using serialHandler As New SerialHandler
Dim form2 As Form2 = New Form2(serialHandler)
form2().Showdialog()
End Using
The Dispose method on the SerialHandler will handle the closing of the serial port if not already closed and dispose of any object that may cause memory leaks.
The other benefit is that you have encapsulated serial port handling and simplified Form2's code.
Note: If not modal, then store a reference to SerialHandler in Form1 and manually call the Dispose method of the SerialHandler class when Form2 is closed - this will require listening for Form2 closing event.
2. Implement IDisposable in Form2 so that when the form is closed and disposed of, the same applies as the first case.
If it was me, I would use Option 1.
Graeme
"I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee
modified 23-Mar-23 21:18pm.
|
|
|
|
|
Thank you MUCH! Are you C# uhm what's the word? Fluent maybe? When I think of serial handler I think of a receive event handler for the serial port. So I'm a little lost on VB.
|
|
|
|
|
Your code presented as VB, so I replied in kind. C# works the same with minor variances.
Graeme
"I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee
|
|
|
|
|
hello
I have a viewer that displays image files in wimforms. I run it from another external software and pass it file data for display in parameters to main args[].
Every time when I call the viewer I want to open the same process in order to immediately open the viewer and not close and restart.
I successful to identify the current running process and also enlarge the same Form window,
but I don't know how to perform show new Form again, So that the viewer will update the view with new files.
I mean , i have current class Process . but i need to execute Application.Run(new Form) but for current process
|
|
|
|
|
You don't need to run Application.Run again. What you do need to do is setup some kind of communication channel where the first instance of your app is listening for messages from a second instance. You can launch a second instance of your display app and when it detects that the first instance is already running, send a message over the channel so the first instance can be told what to do, like load a different file and display it.
One method of doing this is to use IpcChannel[^]
You can use a Mutex[^] to determine if your app is already running.
modified 16-Jan-23 22:04pm.
|
|
|
|
|
|
my code
If DataGridView1.Rows.Count - 1 Then
DataGridView1.Rows.Add()
DataGridView1.CurrentCell = DataGridView1.Rows(DataGridView1.Rows.Count - 1).Cells(1)
DataGridView1.BeginEdit(True)
Else
Exit Sub
' DataGridView1.Rows.Add()
End If
i many code try
If (DataGridView1.Rows.Count > 0) Then
For i = 0 To DataGridView1.Rows.Count - 1
If DataGridView1.Rows(i).Cells("d1alisname").Value = "" Then
Exit Sub
Else
DataGridView1.Rows.Add()
End If
Next
End If
but add row
|
|
|
|
|
So what exactly is the problem?
|
|
|
|
|
Sufvan Adil 2023 wrote:
If DataGridView1.Rows.Count - 1 Then Thanks to VB's "evil type coercion", that condition will be False if you have precisely one row in your grid. For any other number of rows, that condition will be True .
Sufvan Adil 2023 wrote:
For i = 0 To DataGridView1.Rows.Count - 1
If DataGridView1.Rows(i).Cells("d1alisname").Value = "" Then
Exit Sub
Else
DataGridView1.Rows.Add()
End If
Next That code walks through all the rows in your grid until it finds one where the d1alisname column is blank. For every row that it encounters where that column is not blank, it adds a new row.
You haven't explained exactly what you're trying to do. At a guess, you want to add a new row if there are either no rows in the grid, or all of the rows have a value in the d1alisname column. In which case, you need to move the "add row" code after your For loop from your second code block:
For i = 0 To DataGridView1.Rows.Count - 1
If DataGridView1.Rows(i).Cells("d1alisname").Value = "" Then
Exit Sub
End If
Next
DataGridView1.Rows.Add()
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|