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

Comments by (Top 61 by date) 1-Aug-22 7:50am View
There is an article about this: 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. 19-Jun-22 10:02am View
That works fine - thank you. 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; 14-Jun-22 9:03am View
To: '',
is different to the other code
To: "", 14-Jun-22 7:21am View
Try to change Dock = DockStyle.Fill
Dock = DockStyle.Right

But - as RickZeeland wrote - a usercontrol would be better. 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. 16-May-22 14:08pm View
You could write the id within brackets

how-to-center-a-div [18]
how-to-center-a-div [id=18] 25-Apr-22 9:16am View
ty changing this line
"Glasses" 19-Feb-22 14:38pm View
Here is a nice blog 19-Feb-22 11:56am View
This should help you 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}"> 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? 12-Feb-22 9:15am View


not updated or

<textblock text="{Binding RowsImport, Mode=TwoWay}"> 27-Jan-22 8:38am View
Thank you very much.
That was the case, now it works fine. 23-Jan-22 16:34pm View
That works fine, thank you. 22-Jan-22 14:50pm View
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("") 11-Jan-22 7:50am View
Just found out that NuGet package MVVMLight solves my issue. 28-Dec-21 10:21am View
I stopped this approach, and created my own simpler method which saves QuickAccess Toolbar state in my.settings. 27-Dec-21 12:53pm View
I'm no software developer and have only experience with winforms and

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 ... 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. 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. 27-Dec-21 10:01am View
Sorry but I need a working Vb.Net code (C# was the source). 26-Dec-21 11:20am View
Thank you. Open / Save File is already running. 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: 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())) 11-Nov-21 10:00am View
Take an example from the web like

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

stops / closes all 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 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. 20-May-21 8:34am View
Why reading line after line to the RTB?

Try .LoadFile 21-Apr-21 9:56am View
Thank you. 18-Apr-21 8:45am View
Does really no one know a workaround for this issue? 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. 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


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. 30-Mar-21 13:42pm View
This article seems to be something where you could start from: 29-Mar-21 15:35pm View
Not multiple textboxes, only one multiline textbox to see what comes from the clipboard. 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
Strg + Alt + T
Ctrl + Alt + T 8-Mar-21 16:04pm View
you could try .find method 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. 19-Feb-21 15:54pm View
Cannot post a picture here.

But this links gives some possible reasons for your issue: 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. 9-Feb-21 18:27pm View
using & nbsp ; seems to be helpful for my issue and better then using code tags. 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. 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. 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. 15-Dec-20 13:08pm View
shutdown-reboot-event-ids: 9-Dec-20 17:32pm View
strSQL = "INSERT" & "INTO" & "tblNewDates" & "VALUES" & "(TestDate)"
string has no blanks!

Result is:
strSQL = "INSERTINTOtblNewDatesVALUES(TestDate)" 3-Dec-20 19:37pm View
Is the method in a form private or friend?
How do you call it? 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 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. 17-Nov-20 16:01pm View
Thank you will check this tomorrow. 17-Nov-20 16:01pm View
Thank you will try that. 17-Nov-20 13:48pm View
Do you want a blank new row ?

And I cannot see a productBindingSource4.EndEdit 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.Size = Me.childView.Size
SubForm.Location = New Point(MainForm.Location + Me.childView.Location) 10-Nov-20 6:44am View
Ok, when the filter is ALL it appears.
when the filter is .NET it does not appear. 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:

That's why I try to do the details with my own subForm. 28-Oct-20 16:54pm View
This link may help: 26-Oct-20 15:58pm View
Great - that works fine.

Thank you.