|
Hello,
I tried something like you said, before posting on this forum, but I don't think it's going to work.
Now the problem is when selecting multiple items (by dragging). It can work only with 1 item, but if you have multiple items, and remove one item at a time from the SelectedIndices, it will call the event again and again. Don't know exactly how to explain.
Thanks anyways
|
|
|
|
|
Just a quick thought. The easiest way for this to work would be to "overwrite" the SystemColors . If it's possible to change the unfocused selection color form gray to blue, all my issues would have been solved...
|
|
|
|
|
You could write your own control?
Create a user control and add a panel with with background and add labels one below the other, you can provide a property that allows to set the background of the labels. Add some internal logic to maintain selection, colors, text, indexes, etc...
Should be less then 4 hours to get you going.
V.
|
|
|
|
|
A form with a LinkLabel control and set the form's KeyPreview to true.
when press [Enter], the linkLabel's linkLabel1_LinkClicked event is called, but the form's Form1_KeyDown event is not called.
I debug the program, but I can not find why the form cannot get the [Enter]'s keydown event, can any one help me? Or, there is a good tools to see the form event called one by one?
using System;
using System.Windows.Forms;
namespace WindowsFormsApplication3 {
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) {
int i = 0;
}
private void Form1_KeyDown(object sender, KeyEventArgs e) {
int j = 0;
}
private void Form1_KeyPress(object sender, KeyPressEventArgs e) {
int i = 0;
}
private void linkLabel1_Click(object sender, EventArgs e) {
int i = 0;
}
}
}
|
|
|
|
|
Hi , Don't use "linkLabel1_LinkClicked"
Use this "linkLabel1_MouseClick"
private void linkLabel1_MouseClick(object sender, MouseEventArgs e)
{
}
AND : Optional , not necessary :
Avoid using KeyDown, KeyPress , KeyPreview
Just past this in your form body code
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
switch (keyData)
{
case Keys.Enter:
{
MessageBox.Show("You KeyDowned Enter Key!");
}
break;
}
return base.ProcessCmdKey(ref msg, keyData);
}
I know nothing , I know nothing ...
|
|
|
|
|
hi
i need to get data from .csv file to access
it works excellent but i have one problem.
when i try to get : IS-43"39"36"24
i receive: "IS-43""39""36""24"
some code:
while (SW.Peek() != -1)
{
TEMP = (SW.ReadLine());
TEMP = TEMP.Replace("'", " ");
char[] BI = { ',' };
string[] WI = TEMP.Split(BI);
A = WI[0].Trim().ToString();
B = WI[1].Trim().ToString().Replace (";"," ");
C = WI[2].Trim().ToString();
SQL = "INSERT INTO Items(barcode,des,numh) VALUES('" + A + "','" + B + "','" + C + "')";
Cmd = new OleDbCommand(SQL, Conn);
Cmd.ExecuteNonQuery();
Cmd.Dispose();
}
what can be the problem ?
thank's in advance
|
|
|
|
|
string sqlStatement = "INSERT INTO items (barcode, des, numh) VALUES (@a, @b, @c);";
...
command.Paramaters.Add("@a", SqlDataTypegoesHere).Value = wi[0];
command.Paramaters.Add("@b", SqlDataTypegoesHere).Value = wi[1];
command.Paramaters.Add("@c", SqlDataTypegoesHere).Value = wi[2];
...
command.Execute();
Btw, clean up your code. It's a mess.
|
|
|
|
|
Hi
I`m running a simple application that acts as a portal for users to go to various sites such as Gmail and Facebook. I have a SQL database running in the background where I store all user passwords etc. At the moment, users access this application from 2 computers, meaning there are 2 databases. Thus, if a user updates his/her details on the one computer, it does not get reflected in the other database. Is there a way I can share a single SQL database between these 2 client computers? They are connected over a network.
|
|
|
|
|
Etienne_123 wrote: Is there a way
Yes, it's called SQL Server after all.
However, I don't think storing passwords is a good idea.
|
|
|
|
|
Thanks. Just wanted to know before I started searching all over. I`m encrypting the passwords before storing them in the database though. Plus, its a prototype application run at an old age home, so security isn't my main priority, user-friendliness is.
|
|
|
|
|
If you are in the United States and "old folks home" qualifies as Health Care which means the data you are accessing, storing, and retrieving falls under HIPPA which is security intensive.
|
|
|
|
|
Ahem; HIPAA. But it only applies to health-related data; I don't think it applies to email passwords.
|
|
|
|
|
Ahem: he is writing software for an "old people's home", copying and pasting SQL Server database's and relying on storing email passwords in a database. Does any part of this not set off data security alarms? My post was a polite reminder that there are legal repercussions for such a cavalier attitude towards data security.
|
|
|
|
|
Ennis Ray Lynch, Jr. wrote: set off data security alarms
Absolutely, as I mentioned in my first post, but I don't think HIPAA is involved. I had a class on HIPAA last month. It's more a common sense issue -- don't write down passwords... anywhere. Especially where others can get them.
And don't trust a third party to keep them safe.
|
|
|
|
|
I am now working with an ERP application, but the database is getting bigger and bigger, my application have database with 300MB size after 6 months only!!! and the application is getting slower because huge amount of data, especially when user ask for a report or do some inquiries in screens, I am thinking about partial loading solution to load the data partially when user scroll the data, but I have problems with sorting and hanging when user scroll data, what is the best solution for my application,
The environment is
VB.NET 2008
3 tiers architecture
SQL SERVER 2008
Possibly using VPN connection (makes application give time out)
Any help is highly appreciated
|
|
|
|
|
300mb is not very big. Is the database well designed/properly normalized? Are all of the required indexes and relations in place? Have all of the stored procedures been optimized? There is more but start there and see how you go. There are plenty of Sql helper websites out there: here's one: SQLServerCentral.com[^]
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
You have asked this question in multiple forums, please don't. BTW - there is no C# component to your application there, so I don't know why you'd even think of choosing this forum.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Rethink your design.
Mdallal84 wrote: when user scroll the data
Users shouldn't be scrolling data at all.
Mdallal84 wrote: partial loading
Like paging?
Why do I get the feeling you have one big DataGrid/View ?
|
|
|
|
|
You were right , A big datagridview !
I was about to say the same
I know nothing , I know nothing ...
|
|
|
|
|
Thanks for your replies,
the database is 300 MB with 6 months, iam thinking about the size after 2 or 3 or even 10 years.
PIEBALDconsult wrote: Users shouldn't be scrolling data at all.
about user shouldnt scrolling data, the case is user can use some filters to search the data and the result of this search may be more than 5000 records and will be displayed in the datagrid.
PIEBALDconsult wrote: Mdallal84 wrote:
partial loading
Like paging?
and the partial loading i tried like paging yes but not like paging grid in the web and user should flip pages to view data i wanted to use paging through scrolling the grid( MS source safe 2005) use partial loading on scrolling i think.
after doing some search i found something called virtual mode in the datagrid but its not working with n-tiers
are there any solution to implement the partial loading or any idea to load these huge data (remember the slow connection of VPN)
thanks all
|
|
|
|
|
Hi
How I can create a text box that doesn't write in English. I want write in box in my language (Persian) without using Alt+Shift ?
|
|
|
|
|
You have to switch the default language for the system the application is running on.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
When the TextBox GetFoucs , or
When your Application Start ( recommended )
Run This Code
private void InitCurrentInputLanguage()
{
foreach (InputLanguage ArabicLang in InputLanguage.InstalledInputLanguages)
{
if (ArabicLang.LayoutName.Equals("Arabic (101)"))
{
InputLanguage.CurrentInputLanguage = ArabicLang;
}
}
}
I am sorry I don't know the Palestinian language code ,
How ever you can get it from Control Panel at "Religion and Option settings->Languages"
hope this help
I know nothing , I know nothing ...
|
|
|
|
|
Wow, that's something new:
"Religion and Option settings->Languages"
And when you select "Zen Buddhist" everything will go to /dev/null!
|
|
|
|
|
ok
I know nothing , I know nothing ...
|
|
|
|