Click here to Skip to main content
15,393,377 members

Comments by Jo_vb.net (Top 61 by date)

Jo_vb.net 1-Aug-22 7:50am View
   
There is an article about this:
https://www.codeproject.com/Tips/631196/ComboBox-with-Suggest-Ability-based-on-Substring-S
Jo_vb.net 26-Jun-22 11:16am View
   
That's true.

Changed this and found two other if / else statements where debug.print line was missing.

Thank you.
Jo_vb.net 19-Jun-22 10:02am View
   
That works fine - thank you.
Jo_vb.net 19-Jun-22 9:38am View
   
It is not a button but a PlayingCard class object, which has no enabled property.
And I tried the double click handler only to see if it would help but it does not.

private void card_Click(object sender, EventArgs e)
{
PlayingCard pc = (PlayingCard)sender;
Jo_vb.net 14-Jun-22 9:03am View
   
this
To: 'yyyyyyyyy@gmail.com',
is different to the other code
try
To: "yyyyyyyyy@gmail.com",
Jo_vb.net 14-Jun-22 7:21am View
   
Try to change Dock = DockStyle.Fill
to
Dock = DockStyle.Right

But - as RickZeeland wrote - a usercontrol would be better.
Jo_vb.net 13-Jun-22 8:53am View
   
I saw this from time to time - the only thing that helps is to close the form (which is open in design mode) and re-open it.
Jo_vb.net 16-May-22 14:08pm View
   
You could write the id within brackets

how-to-center-a-div [18]
or
how-to-center-a-div [id=18]
Jo_vb.net 25-Apr-22 9:16am View
   
Deleted
ty changing this line
"Glasses"
to
"Glasses"
Jo_vb.net 19-Feb-22 14:38pm View
   
Here is a nice blog https://www.simform.com/blog/best-frontend-frameworks/
Jo_vb.net 19-Feb-22 11:56am View
   
This should help you
https://www.codeproject.com/articles/1074506/task-mvvm-progressbar
Jo_vb.net 13-Feb-22 15:38pm View
   
I do not understand what you are doing.

I would:

1) Try to pass an instance of your Viewmodel as parameter / argument to your timer method to allow access to the Property.

2) add UpdateSourceTrigger=PropertyChanged

<textblock text="{Binding RowsImport, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
Jo_vb.net 13-Feb-22 14:45pm View
   
Why did you start a new topic and did not answer to the suggestions / questions you got at your topic from saturday?
Jo_vb.net 12-Feb-22 9:15am View
   
Is

Console.WriteLine(RowsImport)

not updated or

<textblock text="{Binding RowsImport, Mode=TwoWay}">
Jo_vb.net 27-Jan-22 8:38am View
   
Thank you very much.
That was the case, now it works fine.
Jo_vb.net 23-Jan-22 16:34pm View
   
That works fine, thank you.
Jo_vb.net 22-Jan-22 14:50pm View
   
Deleted
Would be ok to start a Messagebox within the viewmodel using relaycommand like this:

Dim MsgCmd As RelayCommand(Of String) = New RelayCommand(Of [String])(Function(m) MessageBox.Show("Unexpected error:" & vbNewLine & vbNewLine & ex.ToString))
MsgCmd.Execute("")
Jo_vb.net 11-Jan-22 7:50am View
   
Just found out that NuGet package MVVMLight solves my issue.
Jo_vb.net 28-Dec-21 10:21am View
   
I stopped this approach, and created my own simpler method which saves QuickAccess Toolbar state in my.settings.
Jo_vb.net 27-Dec-21 12:53pm View
   
I'm no software developer and have only experience with winforms and vb.net.

So in the first place my demo "Winform hosting WPF Ribbon" is for my own pleasure, but it would be possible to share it with others.

If it is good enough for an article - ok perhaps I'll write one, but no one seems to like that :(

I made a ribbon, ribbon tabs with ribbon buttons, an application menu and a quick access toolbar - all by myself.

The third party code - if it would work (!!!) - is only for saving the current state of the quick access toolbar and restore that when loading the app.
Of course I would give credits to the 3rd party code.

The third party code would probably be less than 20%.

But there is no need for me to push out an article ...
Jo_vb.net 27-Dec-21 11:13am View
   
This code fixes the vb editor code error.

Unfortunately the QAT settings are saved but for an unknown reason loading it still does not work.
Jo_vb.net 27-Dec-21 10:41am View
   
Did that - as described above:

I found a C# sample here:
ribbon - Save/ load QuickAccessToolBar - Stack Overflow[^]
and converted it with a tool.

After fixing some of the remaining issues it saves the settings but loading does not work because of one line in
Private Sub SearchInApplicationMenu(qatItems As QatItemCollection)
Copy Code
Dim remainingItemsCount As Integer = qatItems.Count(Function(qat) qat.Owner = Nothing)

Anyway - thanks for your replies.
Jo_vb.net 27-Dec-21 10:01am View
   
Sorry but I need a working Vb.Net code (C# was the source).
Jo_vb.net 26-Dec-21 11:20am View
   
Thank you. Open / Save File is already running.
Jo_vb.net 25-Nov-21 13:10pm View
   
Because I do not need filesystem info but files and folders from the VS solution explorer.

This is the article with C# code:
https://www.codeproject.com/Articles/1169776/Visual-Studio-Extensibility-Day-1-Creating-Your-Fi
Jo_vb.net 15-Nov-21 10:28am View
   
Instead of empty Catch you can write errors to log file:

Catch ex As Exception
IO.File.AppendAllText(sAppPath & "\Log.txt", String.Format("{0}{1}", Environment.NewLine, Now.ToString & "; " & ex.ToString()))
Jo_vb.net 11-Nov-21 10:00am View
   
Take an example from the web like
https://www.freevbcode.com/ShowCode.asp?ID=5745

and add
Application.Exit()
Jo_vb.net 11-Nov-21 9:28am View
   
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
Application.Exit()
End Sub
Jo_vb.net 11-Nov-21 9:23am View
   
Application.Exit()

stops / closes all
Jo_vb.net 10-Nov-21 18:12pm View
   
Why using regex here?

You could use "AB-" to split the input string into lines

AB-0001234/00005-Testing My Regex here
AB-0004567/00007-Second Testing of my regex

then remove the 16 characters left (using strings.right or something like that)
and you would get

-Testing My Regex here
-Second Testing of my regex
Jo_vb.net 8-Nov-21 5:24am View
   
Which VS version 16.??.?? do you have?

If I have a "control." a list pops up where I can select a property or not.
I does not lock the keyboard or cursor.

It locks the keyboard or cursor only when using keys "strg + ." together.
With a mouse click it goes away.
Jo_vb.net 20-May-21 8:34am View
   
Why reading line after line to the RTB?

Try .LoadFile

https://kixforms.net/docs/chm/index.htm?page=source%2Frichtextboxloadfilemethod.htm
Jo_vb.net 21-Apr-21 9:56am View
   
Great!
Thank you.
Jo_vb.net 18-Apr-21 8:45am View
   
Does really no one know a workaround for this issue?
Jo_vb.net 17-Apr-21 5:37am View
   
CellValueChanged or CellValueNeeded are not triggerd when you refresh the datagridview.

Try manipulation on the data in the datagridview.
Jo_vb.net 12-Apr-21 13:15pm View
   
What I really need is the correct line in the textbox.

Private Function LineSelectionLogReviewRTF_Click(ByVal sender As Object, ByVal e As MouseEventArgs) _
Handles txtOutRichTextBox.MouseClick

Try

Dim index As Integer = txtOutRichTextBox.GetCharIndexFromPosition(e.Location)
Dim line As Integer = txtOutRichTextBox.GetLineFromCharIndex(index)

Inside the textbox is the content of a log.

If for example line 99 is last visible line above the horiz. scrollbar, the line value is 99 on mouseclick.

But if line 99 is not complete visible (a small part is already hidden by the scrollbar), then on mouseclick the line value is 100, because the textbox scrolls a little.

I used the Y value only for testing a workaround but that did not work as it should.
Jo_vb.net 30-Mar-21 13:42pm View
   
This article seems to be something where you could start from:
https://docs.microsoft.com/en-us/powershell/scripting/samples/working-with-software-installations?view=powershell-7.1
Jo_vb.net 29-Mar-21 15:35pm View
   
Not multiple textboxes, only one multiline textbox to see what comes from the clipboard.
Jo_vb.net 11-Mar-21 14:01pm View
   
On form designer select the form.

On VS 2019 Community You can see the structure on menu item
Ansicht > Weitere Fenster > Dokumentgliederung
or
Strg + Alt + T
or
Ctrl + Alt + T
Jo_vb.net 8-Mar-21 16:04pm View
   
you could try .find method
Jo_vb.net 20-Feb-21 12:40pm View
   
My VS is in german, so I'm not sure if "Erstellen" really means "Create" or "Build":

Check in VS Menu "Create" (or "Build") > "Configuration Manager" if "Create" (or "Build") is checked.
Jo_vb.net 19-Feb-21 15:54pm View
   
Cannot post a picture here.

But this links gives some possible reasons for your issue:
https://stackoverflow.com/questions/2058441/could-not-find-any-resources-appropriate-for-the-specified-culture-or-the-neutra
Jo_vb.net 19-Feb-21 13:09pm View
   
My VS is in german therefor I do not know how the related context menu item is named in english.

In project explorer right click the resource file, then look for a menu item like "run (or execute) user defined tool".
Click on that item.

Then debug/compile again.
Jo_vb.net 9-Feb-21 18:27pm View
   
using & nbsp ; seems to be helpful for my issue and better then using code tags.

Jo_vb.net 9-Feb-21 12:36pm View
   
Sooner or later the malware removal forums will no longer support BBCode.

Therefore I will need to have the solution with Html.
Jo_vb.net 9-Feb-21 12:15pm View
   
Using code tags would be the last ressort, if nothing else helps.

I would like to have a better way.
Jo_vb.net 9-Feb-21 10:34am View
   
It is for malware removal.

The user who thinks his pc is infected takes a tool called FRST to create logs which include info about files, installed software, Autoruns and more.
These logs the user posts in a topic of a malware removal forum.
My tool can analyze those logs and create a script (which needs to be checked and improved by a trained helper).
Only trained helpers are allowed to create a script (manually or with my tool or both) and help the user to remove unwanted software or malware.

The helper posts this script in the topic of the user who thinks his pc is infected.
Most forum software accepts BBCode and/or formatted Html.

The user who wants to run the script on the FRST tool then copies the Html formatted script from the forum to the clipboard.

The – when the FRST tool starts – it pastes the script from the clipboard and executes it.

Jo_vb.net 15-Dec-20 13:08pm View
   
shutdown-reboot-event-ids:
https://www.shellhacks.com/windows-shutdown-reboot-event-ids-get-logs/
Jo_vb.net 9-Dec-20 17:32pm View
   
strSQL = "INSERT" & "INTO" & "tblNewDates" & "VALUES" & "(TestDate)"
string has no blanks!

Result is:
strSQL = "INSERTINTOtblNewDatesVALUES(TestDate)"
Jo_vb.net 3-Dec-20 19:37pm View
   
Is the method in a form private or friend?
How do you call it?
Jo_vb.net 3-Dec-20 19:34pm View
   
Your Private Sub cmbChanged has no Handles cmb.SelectedIndexChanged

Private Sub cmbChanged(sender As Object, e As EventArgs) Handles cmb.SelectedIndexChanged

Then you should be able to use the cmb.SelectedIndex
Jo_vb.net 18-Nov-20 13:19pm View
   
Perhaps it would be easier for us if we had the complete code of your both Private Void's

With productBindingSource4.AddNew();
Does only a blank row appear and no data or do you get an error or what else?

I think with BindingSource.AddNew() only import from bound textboxes may work.
Jo_vb.net 17-Nov-20 16:01pm View
   
Thank you will check this tomorrow.
Jo_vb.net 17-Nov-20 16:01pm View
   
Thank you will try that.
Jo_vb.net 17-Nov-20 13:48pm View
   
Do you want a blank new row ?

And I cannot see a productBindingSource4.EndEdit
Jo_vb.net 10-Nov-20 9:11am View
   
The order of the code lines does not change the resulting offset between the Me.childView position and the SubForm position.

When I add MainForm.Location + Me.childView.Location then the offset is smaller and the size is ok, but the subForm covers only parts of the Me.childView control.

This is what I have now:

SubForm.Show()
SubForm.BringToFront()
SubForm.Size = Me.childView.Size
SubForm.Location = New Point(MainForm.Location + Me.childView.Location)
Jo_vb.net 10-Nov-20 6:44am View
   
Ok, when the filter is ALL it appears.
when the filter is .NET it does not appear.
Jo_vb.net 10-Nov-20 6:26am View
   
I'm happy to get answers but I wonder why my question does not appear on the main page of CP?

Me.childView is a UserControl but does not work as I would like to have it.

Parts of my demo project are taken from CP articles about Master/Detail GridViews.

But most of them have the issue with the keys not working on the childView - that prevents moving through the child grid with arrow keys.
Same happens with keys page up/down and pos1/end.

Instead of navigating through the childView those keys let you navigate through the Main/Parent Form.

There is only one without that issue - but in C# and I do not understand how the issue is fixed there:
https://www.codeproject.com/Tips/1215736/Master-Detail-Datagridview-in-Csharp

That's why I try to do the details with my own subForm.
Jo_vb.net 28-Oct-20 16:54pm View
   
This link may help:
https://docs.microsoft.com/en-us/dotnet/api/system.globalization.numberformatinfo.numberdecimalseparator?redirectedfrom=MSDN&view=netcore-3.1#System_Globalization_NumberFormatInfo_NumberDecimalSeparator
Jo_vb.net 26-Oct-20 15:58pm View
   
Great - that works fine.

Thank you.