User Profile
Collapse
-
228,505 members in this network of experts, and nobody can answer this question, or even point me in the right direction?... -
Making a VB.net Application DPI-Aware
Hi all,
I have an application written in VB.net 2003, and I would like to make it 'dpi-aware', but I haven't the faintest idea how to even begin. I am an experienced coder, but this is throwing me completely.
Any help / insights anyone can give would be greatly appreciated. -
Figured it out.
You just make the children object fire events and have the parent object handle those events, in turn firing an event for its parent to handle, continuing up the chain, etc.
Came to me when I was pouring over delegates ...Leave a comment:
-
I'm not sure if I'm following this correctly, but...
On your second code example, line 8, you're trying to use frmBuyDate, but I can't see any code where this class has been instantiated:
Code:Dim myBuyDate As New frmBuyDate myBuyDate.ShowDialog() ' test dialog result here If myBuyDate.DialogResult = DialogResult.OK Then ' use myBuyDate.dateEnd / etc here End If
Leave a comment:
-
Child Objects Raising Events in Parent Objects
Hi All,
Long story short, I have created a ListView type control, using UserControls for the parent control and the ListViewItems. Most the of the control is written and works fine, right up to the point where I tried to replicate the 'Control.Select edItems(0).Inde x' property and the 'SelectedIndexC hanged' event.
Each child object knows its index value, and could pass this value via the SelectedIndexCh anged event (assuming... -
Hi Plater,
Thanks for your quick reply. Things are a tad strange at this end.
My build list is good -- everything is where it should be. I deleted all the .exes, .pdbs, Release and Debug folders, letting VB recreate them - the error still happens.
Then, I tried your breakpoints idea, and regardless of what I did or where the breakpoints were set, they were never triggered. Then, I thought maybe another...Leave a comment:
-
Okay ... I'm at a dead-end here.
Tried using a delegate and invoking to the main UI thread, which failed, as in everything went smoothly, but the dialog is still modal and in the upper-left corner.
To see if this is a threading issue, I removed all the threading code and called the routine directly. The UI hung as I expected it to, the routine completed, showing results in the listview control, but ... still the dialog...Leave a comment:
-
Wrote quite a few workarounds, even tried a 'cheat' by creating a dialog in thread, and they all failed.
I'm fairly positive this is a threading issue now. It is strange that my first non-modal dialog works perfectly.
I have a collection of routines that are run in a separate thread, which access the aforementioned listview control - directly access it, no invoking to the main UI thread, or anything like that (there are...Leave a comment:
-
Yep, for some reason when I add a new form to the solution, try to show it as non-modal, it appears in a non-modal state...
Okay, hold the phone ... as part of the validation routine that precedes the dialog.Show(), a ListView control is tested for an item count > 0 -- this listview is part of a threaded routine. The second I comment all the listview code, the dialog shows in a non-modal state (and the dialog is centred on the main...Leave a comment:
-
Form.Show() Error
Hi All,
If I type this code (VB.net 2003):
Code:Dim myDialog As frmTestDialog myDialog = New frmTestDialog myDialog.Show()
-
For some reason (probably one of those 'problem between keyboard and chair' errors), using FileInfo.LastWr iteTime is yielding the correct results, displaying exactly what Explorer does as its 'Date Modified' field.
Problem solved. I think I was the problem ...Leave a comment:
-
Hi,
I found this works:
Code:System.Diagnostics.Process.Start("cmd", "/k cd\test")
EDIT:
You can also use:
Code:System.Diagnostics.Process.Start("cmd", "/k h: && cd\test")
Leave a comment:
-
Retrieving File Modified Date
Hi All,
I'm using VB.net 2003 Standard Edition, and I'm trying to retrieve the file modified date. Sounds painfully simple. Yup. But ... I cannot, for the life of me, figure it out. After numerous Google searches with no joy, I decided either the answer was so simple nobody ever asked the question, or ... you needed to be on NASA's payroll to comprehend the answer :)
I've created a System.IO.FileI nfo object, and...
No activity results to display
Show More
Leave a comment: