|
Do I understand that correctly:
- there is only one computer.
- that computer runs Windows 7
- there are two monitors attached to this computer.
- there are two users, each of them uses one of the monitors
The limitation of Windows 7 is that only one user can have an interactive session at a time. Hence, from the point of view of Windows, there is only one user in your scenario (i.e. both of your users work in the same session, with the same Windows account).
All user interface elements run in the UI thread of the program instance - a real multitasking is not possible with the user interface. You could circumvent that by starting two instances of your program. Each instance would communicate with a "server" (a Windows Service) which provides the back-end for your UI applications and which may run on the same computer.
|
|
|
|
|
Hi
Leslie Sanford created a midi toolkit:
http://www.codeproject.com/Articles/6228/C-MIDI-Toolkit
I have a question:
How we can store (For example in a text file) the converted midi to frequecy list and duration.
thanks
|
|
|
|
|
If you have a question about an article, use the forum at the bottom of the article:
C# MIDI Toolkit : Comments & Discussions[^]
The author of the article will be the person most likely to be able to answer your question.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks
I asked but no reply is received yet!
|
|
|
|
|
Sorted I was being stupid, cant believe I had trouble with that.
modified 23-Jan-14 8:47am.
|
|
|
|
|
Why do you think I am going to go a a random site and download random code, the size and nature of which I do not know? Why do you think I want to search your code to find the code you write about? Do you think that is a good use of my time?
Edit your question, remove the links, and paste the relevant code fragments - just the bits with the problem and a few lines around for context - to make it easier for us to identify your problem.
Help us to help you!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
|
I can: I tend to read what I meant to write...
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
I am looking for a plugin (dll or wotever) that will enable me to view an Analogue voltage on a grid type view. I also want to be able to follow this Analogue voltage and therefore the current value will be displayed in the middle of the grid.
It would also be nice to have scroll bars so I can stop the sampling and look back on previous values.
I could write one from scratch but it will obviously take time.
A free plugin that has these features would be ideal if anyone has any suggestions.
Thanks.
|
|
|
|
|
The Chart control that ships with Visual Studio is more than capable of doing this.
|
|
|
|
|
Tools: Visual Studio 2010 Ultimate, Language C#, Database MySql
Hi,
I am searching this a while, but to date didn't find any suitable solution.
I've a form with bound DataGridView with 5 columns, ProductID, ProductName, Qty, Price and Amount. After normal data entry user can click button to save data to Mysql database, no problem there.
At present user is manually enter ProductID after which an Sql command is executed to fetch ProductName and sets it to DataGridView ProductName Column. I need a way to show a ListView below ProductID column when it got focus, so that user can select product (ProductID and ProductName) from ListView and set it to DataGridView's Row which user is currently using.
Is it possible to show listview below ProductID cell when user click or when got focus?
Thanks
Ahmed
|
|
|
|
|
You use a data or edit template.
Consider popping a dialog as your data entry tool, you will have infinitely more control over your UI and it is dramatically simpler to manage a dialog that faffing about with a DGV.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks for the reply.
Using Dialog for data entry is good idea...but can you guide me about how can I show that dialog box when user click or enter in DataGridView row? better if it shows below the current row
|
|
|
|
|
Create the dialog for data entry
Add -
pop the dialog with a new instance of the object
save the new object to the database
add the saved object to the DGV collection
Edit
Trap the DGV double click event
Check for a selected row in the DGV
Pass the select rows data to the dialog
save the edited object to the database
update the selected rows object with the modifications.
Not sure if the last bit is required, it has been too many years since I did winforms
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Aaa...now I see where the misunderstanding starts...
Actually the requirement is not to do the Data entry via dialog but to get data from Dialog/list to DataGridView. That is why I need the listview at first place. The main form contain DataGridView, from which user can make data entry for each product. Which is working just fine for saving/editing/deleting data to database.
What I need to provide facility to the data entry process, and give the user a list to select product instead of typing ProductID, user can select product from list and it will copy to Datagridview's active Row alongwith its ProductDesc, the list should only show when user enter ProductID in DataGridView.
|
|
|
|
|
hello, looking for an algorithms/library in .NET that Algorithms which Max(x) Min(y)
I think "Mean Variance Optimization" is the word for it - however MVO is used for portfolio selection/optimization: Max(Mean) Min(Variance)
Some generic be nice and also how to find the edge cases? How optimized...?
Thanks
|
|
|
|
|
hi
I have a button named Button1 in my form, and a text box named TexBox1.
I've written code that when I click the Button1, a Radio button gets created with it's own name:
c#:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
namespace WebApplication7
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ViewState["Counter"] = 0;
}
}
protected void Button1_Click(object sender, EventArgs e)
{
HtmlGenericControl div = new HtmlGenericControl("div");
for (int i = 0; i < Convert.ToInt32(ViewState["Counter"]); i++)
{
RadioButton rb = new RadioButton();
rb.GroupName = "GN1";
rb.ID = i.ToString();
rb.Text = "Button" + i.ToString();
rb.Checked = false;
rb.CheckedChanged += radioButton_CheckedChanged;
div.Controls.Add(rb);
Panel1.Controls.Add(div);
}
ViewState["Counter"] = Convert.ToInt32(ViewState["Counter"]) + 1;
}
private void radioButton_CheckedChanged(object sender, EventArgs e)
{
RadioButton btn = sender as RadioButton;
TextBox1.Text = btn.Text;
}
}
}
.NET
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication7.WebForm1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Panel ID="Panel1" runat="server">
</asp:Panel>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
<br />
<br />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br />
<br />
<br />
</div>
</form>
</body>
</html>
the problem is after several radio buttons being created, i want the program works as if each of them is checked, the TextBox1.Text gets the radio button's text string
but the function radioButton_CheckedChanged doesnt execute
|
|
|
|
|
As you radio buttons are dynamic there will not be exist on the next post-back. You have to recreate them every time you got a post-back, so you have to maintain some state that tells you if there was radio buttons.
As now the only time you create the radio button is on Button.OnClick...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
thanks for the reply... i dont understand i tried to save the amount of buttons in ViewState["Counter"] , is that what i must do?
|
|
|
|
|
That not enough, you also have to recreate them outside the click event - which does not happening on other post-back events, like click on one of the radio buttons...
For instance you can add a loop of creation to page's OnLoad when it's post-back and the source isn't the button...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
When you check or uncheck the radio button, there is no code which does postback in your case. You have attached the event handler to the radio button but did not call the method.
|
|
|
|
|
Thanks for the reply.
may i know how to fix it? i am new to this programming language please guide me
|
|
|
|
|
I am trying to root out why this particular linq query is so expensive from a time standpoint, assuming it is the linq query that is causing it.
public static List<DocumentType> GetDocs()
{
List<DocumentType> output;
using (context = contextLogic())
{
output = (from d in context.DocumentTypes
select d).AsEnumerable().Select (x => new DocumentType
{
Id = x.iD,
Name = x.Name,
FlagA = x.FlagA,
IsActive = x.IsActive,
UpdateDate = x.UpdateDate,
CategoryName = x.DocumentCategory.Name,
Associations = string.Join(",", x.DocumentAssociations.Select(g => g.ADocID.ToString()))
}).ToList();
}
return output;
}
I tried flipping things around quite a bit. This was initially an observablecollection but it is a list right now as I try to tune it in different ways. Right now it is taking about 12 seconds to retrieve data from a table of 350 records. If I take out the CategoryName and the associations it times down to about six seconds, but that is still ridiculously slow.
|
|
|
|
|
Is the context local or is this on a server?
Try ruling out the new DocumentType by changing the .Select(...).ToList() to just be .Count() (change the assignment variable appropriately, it is just for testing...).
The .AsEnumerable() is totally unnecessary.
This is equivalent to what you have:
public static List<DocumentType> GetDocs()
{
using (var context = contextLogic())
{
return (from x in context.DocumentTypes
select new DocumentType {
Id = x.Id,
Name = x.Name,
FlagA = x.FlagA,
IsActive = x.IsActive,
UpdateDate = x.UpdateDate,
CategoryName = x.DocumentCategory.Name,
Associations = string.Join(",", x.DocumentAssociations.Select(g => g.ADocID.ToString()))
}).ToList();
}
}
|
|
|
|
|
Unfortunately, the AsEnumerable is necessary as L2E does not recognize string.Join. So you have to present it as an IEnumerable in order to join the Doc strings.
Regardless, I retooled the process to use a stored procedure but it is still a nightmare. The data access is fast, the stored procedure fills a list in less than a second, but assigning those items to the DocumentType model takes four or five seconds more.
It looks like it is the model itself. I am wondering if the implementation of INPC on the model is not causing a lot of slow down. Each time a new document type is added to the list it fires the OnPropertyChanged event for every single property. Not sure that is the problem, but it is a lot of events.
|
|
|
|