|
|
May I ask why the items must be checked/unchecked AND selected/deselected? What you are witnessing is the default behavior of the ListView. When you check multiple items and select each one, and then you uncheck one, it unchecks all items. Just like if you CTRL+Click to select multiple items and then check ONE of them, they all get checked. I am not certain but perhaps you would need to extend the ListView control yourself?
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.
|
|
|
|
|
Matt U. wrote: May I ask why the items must be checked/unchecked AND selected/deselected?
modified 18-Nov-11 8:19am.
|
|
|
|
|
I believe you would need some sort of custom control for that, although I am not certain even that would give you exactly what you need. As the last answer stated, why not just use the ListView's selection without checkboxes?
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.
|
|
|
|
|
Why do you want checkboxes for selection? There is already a perfectly sensible and standard way of multiply-selecting items in a list view.
|
|
|
|
|
hi
Let me know, How may I use following command using C#?
net.exe use Y: \\127.0.0.1\\DATABASE
Thanks
(Riaz)
|
|
|
|
|
The System.Diagnostics.Process.Start(...) method seems to be what you need.
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.
|
|
|
|
|
|
It is polite to upvote the answer when accepted (helps yours and the responders reputation).
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Hi all,
Currently, i want to develop a tool which can fill avaiable gmail/yahoo.mail account automatically
Note: available gmail/yahoo.mail account is account that can be used for register.
Thanks, ndkit
|
|
|
|
|
What? I'm sorry, but I've read your question several times and I still have no idea what you're trying to say here. What do you mean by filling available gmail/yahoo accounts automatically? Are you talking about a utility to automatically create email accounts?
|
|
|
|
|
Sorry for my unclear meaning post content.
I explain again as below:
As you know, currently gmail or yahoo.mail service has many accounts.
When someone want to create new account, the login name that he/she provides may be already used by others, so he/she must find another avaliable login name.
So now, I want to develop a tool that support user to get available login name for solving this inconvenience.
I googled and found the GmailAPI but seem that it doesn't solve for my case.
|
|
|
|
|
I do not believe that Gmail or any other email provider will give you a list of existing accounts - every spammer would love that!
|
|
|
|
|
ndkit wrote: fill avaiable gmail/yahoo.mail account automatically
What exactly do you mean by this?
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
To automate login, if that is what you are asking for, you could:
- look at the page source (CTRL/U in most browsers);
- see how a FORM is used with some INPUT fields and a SUBMIT button;
- where pressing the button results in an HTML "POST".
So you could create a Windows app (or a browser plug-in) that sends an HTML POST with the appropriate values.
For the details, study the web pages they use, and use the HTML reference material.
Warning: as Google/Yahoo/others maintain their web sites, they can change the details of the login process any way they see fit, so you will be aiming at a moving target...
|
|
|
|
|
Anybody having c# and java implementation of Whirlpool hash algorithm?
|
|
|
|
|
|
C# code is incomplete. If somebody has correct working code, then plz do provide.
|
|
|
|
|
I've developed the other way to create the displaying of text by using GDI+ method in custom control. The problem is that I'm trying to determine if I am doing the right approach, escpecially be able to read the text clearly. I'm not sure about this individual byte to be drawn and assign their drawing location on the control.
The requirement I've got are:
1) multi-colored text
2) capability of changing background (no problem with this one)
3) needs to be monospaced (each characters have evenly spaced and all lined up
4) will consist of 16x16 grid (set up in an array of custom control in main form)
5) be able to bold the partial text (will work on that part later)
Here's the code I've done so far:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace CrumTypeInterface
{
public partial class GraphicalTextBox : UserControl
{
byte[] byteToDisplay;
SolidBrush[] solidbrushColorsToDisplay;
Font fontNameToDisplay;
public GraphicalTextBox()
{
InitializeComponent();
this.Size = new Size(56, 25);
this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
}
private void GraphicalTextBox_Paint(object sender, PaintEventArgs e)
{
System.Drawing.Graphics formGraphics = this.CreateGraphics();
System.Drawing.Font drawFont = new System.Drawing.Font("Verdana", 7);
if (byteToDisplay != null)
{
formGraphics.DrawString(byteToDisplay[0].ToString("X2"), drawFont, solidbrushColorsToDisplay[0], 0, 4);
formGraphics.DrawString(byteToDisplay[1].ToString("X2"), drawFont, solidbrushColorsToDisplay[1], 12, 4);
formGraphics.DrawString(byteToDisplay[2].ToString("X2"), drawFont, solidbrushColorsToDisplay[2], 24, 4);
formGraphics.DrawString(byteToDisplay[3].ToString("X2"), drawFont, solidbrushColorsToDisplay[3], 36, 4);
}
drawFont.Dispose();
formGraphics.Dispose();
}
public void SetTextValue(byte[] byteValues, SolidBrush[] solidbrushColor, Font fontName)
{
byteToDisplay = byteValues;
solidbrushColorsToDisplay = solidbrushColor;
fontNameToDisplay = fontName;
Refresh();
}
public void SetTextValue(byte[] byteValues, SolidBrush[] solidbrushColor)
{
byteToDisplay = byteValues;
solidbrushColorsToDisplay = solidbrushColor;
Refresh();
}
}
}
|
|
|
|
|
That seems OK. I do have a few comments:
1.
CreateGraphics is an expensive and unnecessary operation, as there already is a PaintEventArgs,Graphics for free (which you can borrow but not Dispose of).
2.
I tend to create my fonts only once, and keep them alive through a class member; that works faster than creating and disposing a font on every Paint action.
3.
FYI: the bold style of a font tends to widen the font; if you want each and every character to have a constant width irrespective of style, then you'll have to position and paint individual characters; or be very selective on your fonts (although I haven't met one yet that doesn't widen when bold).
|
|
|
|
|
Luc, as you suggested,
Item #1: Can you suggest me something about borrowing Graphics thing you are mentioning?
Item #2: Done as I put in as a global in the class.
Item #3: I'll have to look into this.
|
|
|
|
|
I think I got it...
from my code in GraphicalTextBox_Paint(object sender, PaintEventArgs e) method,
I changed
formGraphics.DrawString to e.Graphics.DrawString
then I removed formGraphics variable & its dispose method calling.
|
|
|
|
|
I would wrap the font in a weak reference - that way, if resources are needed, it can be freed and reacquired when necessary.
|
|
|
|
|
You could, however I don't. Assuming a typical WinForms app, I'm not inclined to do that for objects I need inside event handlers, as I want maximum speed for such handlers.
I also keep their numbers low, mainly by storing frequently used fonts, pens, brushes, ... in a base class from which my Forms derive; this has added benefits, e.g. changing font families for the entire app is pretty simple.
If keeping those objects alive would be straining the system, I'd say something is quite wrong overall.
|
|
|
|