Search:
Type: Posts; User: Aaron Young
Search:
Search took 0.77 seconds.
-
You should be able to adjust your formatting under Tools > Options > Text Editor > C# > Code Style > Formatting.
-
I think jmcilhinney's point is that you're not really providing anything for us to analyze; without seeing the code, all we can do is guess.
Without more information, I would speculate that:
1....
-
Have you considered simply validating the resulting input when the user tries to leave the control and force them to enter something that is valid, for example:
Private Sub...
-
Your Arguments property doesn't include a space before the -v parameter, so when it's joined to the targetName variable it results in an invalid filename.
-
You could use the ConfigurationManager to save settings to a per-user app.config file, ex:
// Open and editable configuration file for use by the current user
...
-
I believe your call to Hide within the Form's Deactivate event is disrupting the Event chain which results in the Main Form remaining inactive.
You could start a secondary thread and make your...
-
I ran a test of your code, though not against an Oracble DB (I used a quick and dirty SQLite database) and my test completed in less than 3 seconds for all 65,000 customers.
Now, the problem could...
-
Another quick and dirty method would be to utilize the DataTable's Read/Write XML methods:
private void WriteSettings()
{
DataTable settings = new DataTable("Settings");
...
-
Option Explicit
Private Sub Command1_Click()
AssociateMyApp "SDF File Type", "C:\MyApp.exe %1", "sdf", , "C:\SDF.ico"
End Sub
-
In my example, did you include the line: ' Create a list of all the Checkboxes (could use a container control instead)
Dim checkBoxes As New List(Of CheckBox)(New CheckBox() _
...
-
You could try something like this: ' Create a list of all the Checkboxes (could use a container control instead)
Dim checkBoxes As New List(Of CheckBox)(New CheckBox() _
...
-
Try something like this: Private Sub ListBox1_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListBox1.MouseDown
If e.Button =...
-
You can read a file in blocks using the StreamReader class, i.e. Public Sub ReadBinFile(ByVal filename As String)
Dim colors As New ArrayList()
Dim food As New ArrayList()
'...
-
Using a Generic List of strings will make it easier to add to the list of files as you're recursing the folders, which can be done easily with the IO namespace: Public Function GetAllFiles(ByVal...
-
Here's a library of Registry functions I put together, including a function to write long (DWORD) values;
In a standard module:Option Explicit
' Win32 API Declarations
Private Const...
-
Here's one way:Public Function GetOldestFileFromDir( _
ByVal filePathAndPattern As String, _
Optional ByVal attributes As VbFileAttribute = vbNormal) As String
Dim strFile As String
Dim...
-
You should be able to apply the techniques I've shown you in your other post to this problem.
Regards,
- Aaron.
-
You can use the Micrsoft XML DOM to manipulate XML documents very easily,
here's an example...
note: I have used latebinding here for the sake of making the example simple to run,
you would...
-
You could set a system-wide JournalRecord hook using the SetWindowsHookEx Win32 API
and use it to monitor user input, in turn using that to determine when the system is idle, i.e.
In a Standard...
-
Here's an example using the CopyMemory API which should improve performance,
especially on larger arrays as it can copy entire rows at once.Option Explicit
' Win32 API Declaration
Private...
-
Microsoft Data Access Components, it's the underlying technology for ADO and other Data Access methodologies.
http://msdn.microsoft.com/data/mdac/default.aspx
Regards,
- Aaron.
-
Here's an example of generating the combinations:Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private m_flgStop As Boolean
Private Sub...
-
Try inserting a call to ResolveName after setting your Recipient properties:Option Explicit
Private Sub Command1_Click()
MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID...
-
Are you sure it points to statements exactly like that?
Typically I've run into this error when trying to "update" data, normally (for me),
it was caused by trying to assign a value to a string...
-
There are a number of ways to do this, the simplest is probably to use the supplied
GetSetting and SaveSetting functions to store the background color
in the registry:Option Explicit
Private Sub...
-
If MessageBox.Show("Are you sure you want to delete?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) = DialogResult.Yes Then
' Do Delete Here.
End...
-
I don't think so, no. Even when the Grid has no data, it still has a CurrentCell value of (0, 0).
What exaclty are you trying to do, perhaps there's another approach that will acheive what you're...
-
Add a Drive, DirListBox and FileListBox control to your form:Option Explicit
Private Sub Drive1_Change()
' When the drive selection changes
' update the folder list
Dir1.Path =...
-
You can create shares using the Windows Management Instrumentation (WMI) API, i.e.
In a Class <WindowsManagementMethods>:
' Import the Windows Management API - You'll need the
'...
-
You could just write the code out to a text file and launch the file with Notepad,
otherwise you can use the Shell and SendKeys statements, i.e.Option Explicit
Private Sub Command1_Click()
...
-
Just add additional calls to the GetRegKeyValue() function, i.e. ...
' Get the username
strUser = strUsers(lngKeyIndex)
' Now query the registry for this user's "Id" value
...
-
Are you checking for EOF and BOF before querying the value of the Recordset field?
It could be your Find operation didn't yield any results.
Regards,
- Aaron.
-
From what I understand the SQL Server Notification Services are built on
the .NET 2.0 Framework and supported through the SqlClient API in .NET
So, technically, you probably could access the...
-
Primarily you need to utilize the RegEnumKeyEx and RegQueryValueEx Win32 API's, i.e.
In a Standard Module:Option Explicit
' Win32 API Declarations
Private Const SYNCHRONIZE = &H100000
Private...
-
Try: Dim Rows As Object
Dim Row As Object
Dim Col As Object
Dim winMgmts As Object
Set winMgmts = GetObject("winmgmts:\\127.0.0.1\root\CIMV2")
Set Rows = winMgmts. _
...
-
Quick and dirty:Option Explicit
Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal...
-
One way to have your application load when Windows starts is to place an entry in:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
You're unlikely to find a "fool-proof" way, the...
-
There are a number of ways to approach this problem.
As you have so many files to check, it may make sense to just
enumerate the files in the directory once and then sort out what to do with
them...
-
Instead of using the LostFocus event, use the Validate event
and you won't need to use any kind of loop.Private Sub Text1_Validate(Cancel As Boolean)
If Len(Text1.Text) < 7 And Len(Text1.Text) >...
-
You're probably right, the code didn't elaborate though,
so I just gave the basic syntax correction.
- Aaron.
|
Click Here to Expand Forum to Full Width
|