VB 2010 express Win XP pro I'm tryimg to detrmine the time taken for various routines, and not having much luck.From what I can gather, it seems that short times and very long times are a problem, as is my understanding of what I have read. cpu speed shown is correct.I checked a few routines, very short routines return 0, to be expected, ?resolution.Longish times (about 33 seconds with a stopwatch), report to be 177 seconds.
I have a slew of sub routines that I need to use in my software because each website that I will be accessing don't all use the same methods.....go here...click that...go here...click that...etc etc
So I've divided them into sub routines and call them when I need them but the coding is getting so long that it's becoming confusing to keep up with each sub.
Is it possible to place the sub routines into an independent file like a class and then call them from the file when I need them so I can free up some space to code?
I'm trying to have it so that when the user selects an item from the combo box, it will display the right nodes for that selection in the treeview control. For example: User selects Artist from the combo box and the treeview displays the letter of the artist. The user selects a letter and it will display all artist with last names beginning with that letter. Unfortunately when I select a selectedindex, the treeview doesn't display anyting, it's blank. What am I doing wrong? Here's the code I'm using for artists:
I have some common code that I would like to share between pages and I have been messing around with App_Code classes which is great but I would also like to use code that affects drop down lists example:
Sub Set_FirmType(ByVal Sender As Object, ByVal E As EventArgs) subcategories.Visible = "false" supplycategories.Visible = "false"
Note that I'm aware of other yield in vb.net questions here on SO. I'm playing around with Caliburn lately. Bunch of great stuff there, including co-routines implementation.
Most of the work I'm doing is C# based, but now I'm also creating an architecture guideline for a VB.NET only shop, based on Rob's small MVVM framework.Everything looks very well except using co-routines from VB. Since VB 10 is used, we can try something like Bill McCarthy's suggestion:
[Code]...
It definitely isn't as elegant as C# version, but it looks to be doable. We'll see if there are any problems with this. If anyone has better idea, I'm all ears.
I have LaPack numerical package , I want to compile with Visual Fortran (INTEL) using vs2008.I want to use the routines from a VB.NET program.How can I call the routines from VB ?
This will no doubt sound like a pretty dumb question to some, but, despite having written many useful single-thread apps over the years, I don't understand enough about threading yet.
Consider this scenario:
There are four modules, each on its own thread, that can happily run concurrently most of the time. However, each module occasionally causes a few seconds' intensive disk activity (by design) and it would be more efficient (faster, less fragmentation) if only one module at a time wrote to the same physical drive.
It would be useful to have something like a baton that modules within a given scope can pass around, perhaps dependent on their respective priority levels.
I'm using PInvoke to access some routines from a third party library, however i'm getting SEHExceptions when trying to use callbacks defined for one particular method. The callbacks are used to provide feedback from other unmanaged methods within the third party library, passing a string back to the calling application containing a status message.
I am trying to retrieve all processes running on a machine with the usual information; process id, name and the memory usage. I am trying to export it all under one xml file, however to get all the information I had to use 2 separate methods. To get the process id, name and session id (process owner) I used the following code along with a dictionary and a class, using a .net library called Cassia.
Using server As ITerminalServer = manager.GetRemoteServer("Spartacus") server.Open() For Each process As ITerminalServicesProcess In server.GetProcesses() If Not String.IsNullOrEmpty(process.ProcessId) Then dictprocess.Add(process.ProcessId, New Processes(process.ProcessId, process.ProcessName, process.SessionId)) [Code] .....
As you can see the unique id (process id) is the same in each xml. Is there any way I can write the xml so that the information from both methods can be under one tag?
i have a need for my vb.net app to perform methods at regular intervals. it needs to check sql tables and react to data found, send email and sms messages. i've tried using a loop but this only allows me to perform 1 check ie checking sql tables. the app needs to execute a method every x minutes. i tried using system threading but i got errors.
I have a Windows Forms app, with a TabControl. On the first tab (which is a bunch of textboxes), the CTRL-x/c/v keyboard shortcuts for cut/copy/paste work as expected. On the second tab (which is a DataGridView), the keyboard shortcuts don't do anything. How do I hook up these keypress events to my cut/copy/paste routines? I already have great cut/copy/paste routines for my DataGridView--and they work fine when launched from the tooltip buttons or menus. I just need to hook up those subs to the CTRL-x/c/v keypress events.
I'm writing a really simple file updater which downloads files off from a website and saves them. The download routine is working well, except that it freezes the project while attempting to connect to the host. Easily solved with threading except now when I try to access other form items such as text boxes, labels, form caption, it says I am not doing it in a safe manner and prompts an interrupt in debug. I did some reading on it and I'm still not sure what to do, I'm very new to vbnet and it is still a little confusing to me.
Error: Cross-thread operation not valid: Control 'Form1' accessed from a thread other than the thread it was created on. Imports System.Threading Imports System.Net Imports System.IO
The VB format(object,formatString) command fails when placed in the handler routines of a DataGridView.In the following procedure the newCellValue returns the Format string value instead of a formatted cell value.This pproblem occurs in both the dgv_CellFormatting and the dgv_CellClick routines.The same commands work properly when placed in a procedure on the form.
Private Sub dgv_CellFormatting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles dgv.CellFormatting If e.FormattingApplied = False And Not e.CellStyle.Format = Nothing Then[code]...........
I have googled high and low to find an answer to this but I must be searching wrong.I have an application which has a listview displaying some items that are stored in a SQL Compact database. I am using a second form to add new items to this list directly into the database.When the second form closes I want to call the sub in my first form to refresh the list from the database.
How can I get it to fire the form1 sub routine on the close event of form2
I have an ASP.NET application with a SQL Server back end. I am storing all my dates in UTC format and doing the appropriate conversions to the local time zone of the browser viewing it. One of the pages asks for a start date and end date (no times).
I am taking the start date and setting the time to 00:00:00 hours (midnight) and I'm taking the End time and adding a time of 23:59:59, so that the date range covers the whole day. Now what I'm trying to do is do a SQL query to do a search for records in this date range. The problem is, the data in SQL is in UTC time and the user is typing their dates and times in their local date and times. My quickest solution was to convert the date and time to UTC, then search the records. However, by doing this, I am to believe ASP.NET converts the given time and date to UTC based on the server time zone. How can I convert a date and time to UTC time based on the time zone of the user?
The idea with this form is to add the futures which is calculated when the button is pushed but I need the list to update every time and show the values each time to which the previous value is added to the new calculation, e.g. of what it should look like in listbox:
Year 1: $1,290.93 Year 2: $2,724.32 Year 3: $4,350.76 etc....
I have been working on this a while and I am at a standstill, I was given a function to clear the form everytime it calculates but I don't know how to implement it, I am new to VB. Here is what I have so far:
Public Class frmFutureValue Private Sub btnCalculate_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnCalculate.Click
Basically i'm trying making a task manager program for myself. I want to know how I can display a message box and or play a sound when system time = time displayed in listview. I have used a dropdown box for the user to select which option they would like to select - sound or message box to popup. The data for the task will be stored in a listview box. I want it so that when the date and the time is = to the date and time set for the reminder the action will follow.Here is my code so far:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim notext As String = "" If TextBox1.Text = notext Then[code]....
1st label is "Clock" this pulls the time from the users current time zone/local time
2nd label is "UTCClock" Which would be UTC time
Now I have this for the first label: clock.Text = Format(TimeOfDay, "hh:mm:ss tt")
Which would give the users current time zone/local time. As for the UTC.. how would I add in for the UTC time from where the user is located at? I did some searches.. but couldnt find what I was looking for.. IM pretty sure its not as easy as getting the users current time zone/local time.. So im assuming that Theres a "bit more" code into getting UTC time..
to trace the days of a program installed in user's computer.However, the user can changes the system time of his computer to a advancing date. How can I get a SNTP time from internet to solve this problem?
I need a start date, a Total time passed until now, an average time per step, and a estimated time to finished. How can I do that? Also, I can close the application and when start up again I want to get the time counters as the last time, so How can I store that data is normal txt file (I say txt to take advantage of the ini app file which is a txt).
I used .NET Framework 1.1 in C/S project before. Now I have updated the project to use .NET Framework 3.5 without modifying source code, but I have found that : the Remoted DateTime values can not be converted to the equivalent local time of a remote computer that is in a different time zone. In .NET Framework 1.1, the DateTime values can be converted automatically.
There is a varchar column in the database table in this format of military time 1230 or 1750 or 1320 and that field get populated into a gridview in asp. I need to convert that string to standard time. I have tried the DateFormatString and nothing seems to work.
using VS2008, targetting framework 3.5I have a rather complex UserConrol which does some of its own rendering.I display this UserControl on a form.Opening that form in the Designer creates an instance of the UserControl in the Designer, which tells me a NullReferenceException is occurring in one of my rendering methods.I have attempted to correct this by making alterations to the UserControl's default constructor, but have not found success.