|
Hi Edboe.
Your idea produce high sucurity risk, but yo can use the property AutoCompleteSource.
Tip: Use the auto complete only for the username.
SINCERELY.
ANTHONY ACUÑA
PREFERED PHRASE:
SOMEBODY TELL ME WHY IS MORE REAL WHEN I DREAM THAT I AM WAKE?
|
|
|
|
|
That's also a security risk. If you use autocomplete, you can see EVERY valid ID in your company, which gives a hacker more information that they could ever imagine. Simply don't do it.
|
|
|
|
|
If I want to design an XML editor that has following limited functionalities:
1. Edit XML using tree view and by writing XML code.
2. Validate XML to given XSD or DTD schema.
3. Check Well-formdness of XML Document.
4. View XML similiar to IE browser.
What should i use? A plugin like MSXML parser that has extended abilities to parse XML or it is easy to write code using System.xml ??
please guide me.
Thank you.
|
|
|
|
|
It seems fairly simple, and would be a great exercise to learn XML programming.
|
|
|
|
|
Is there something you've found lacking in the capabilities of System.Xml? There's an MvpXml library you can check out that has a bit more functionality. I've never seen a need for it though, System.Xml has always had enough power to do what I want.
Logifusion[^] "This isn't a business. I've always thought of it as a source of cheap labor. Like a family."
|
|
|
|
|
|
|
Thank you for link. It is exteremly useful.
|
|
|
|
|
Hi,
I have created an application where I can write to a particular cell in an excel spreadsheet.
How can I loop through each row of the excelsheet so that I can place the database row data into each row of the sheet?
something like:
foreach excelsheetRow (i)
//i represents the row number
cell(Ai).value = DataRow(i).column(i);
cell(Bi).value = DataRow(i).column(i+1);
cell(Ci).value = DataRow(i).column(i+2);
...
Thanks
|
|
|
|
|
I think I worked it out.
// loop through 10 rows of the spreadsheet and place each row in the list view
for (int i = 4; i <= 10; i++)
{
Excel.Range range = excelWs.get_Range("A" + i.ToString(), "J" + i.ToString());
range.Cells.Value2 = "value" + i;
}
|
|
|
|
|
I'm trying to find a code idea on how to drag a file into an application and will produce an output of a different data in a different file name.
I have established the coding for data interpretation algorithm and output file generation. I would like to know how to write a code that I could drag a file with raw data into an application (which rests on the desktop), processes the data, and produce output file with interpreted data into the same directory as the original raw file. I don't want to open the application then use FileOpenDialog to select the files.
I've seen most of the info I found online are the ones that you would have to open the application and you can drag and drop onto the form. This is what I do not want.
Can anyone help?
~ Ron Boucher
|
|
|
|
|
You can simply use drag and drop to get the filename, then do any processing you need based on file type.
|
|
|
|
|
If you've got a shortcut or the actual executable on the desktop and you drop a file on it, the filename will automatically be passed by the shell to the executable (you can get it through the Main function).
e.g.
private static void Main(string[] args)
{
Console.WriteLine("Dropped File: {0}", args[0]);
}
|
|
|
|
|
That's the answer! Thanks!
I had to modify this Main Function:
from:
static void Main(string[] args)
{
Application.Run(new Form1());
}
to:
static void Main(string[] args)
{
foreach (string s in args)
{
MessageBox.Show(s);
}
}
works nicely! and applied this to my intepreter executable... works perfectly as I was hoping for!
|
|
|
|
|
How to create drag and drop controls in win app. ? I want to create tool like Visual Studio( no need auto generate functionality, just drag and drop functionality is enough) please give some basic idea about that drag'n'drop controls.
C# feaver
|
|
|
|
|
Funny, this was posted shortly before mine... I'm not sure if we're on the same boat!
|
|
|
|
|
i want a source code windows explorer program if u do not mind >>>
pleaze
pop
|
|
|
|
|
ask from microsoft to provide it to you.
sAqIb
"Our scientific power has outrun our spiritual power. We have guided missiles and misguided men."
Dr. Martin Luther King Jr.
|
|
|
|
|
Why not just ask for the code for Vista while you're speaking to Balmer.
|
|
|
|
|
Hi
Take a look at sourceforge.net there are a lot of open source project over there and maybe you can find one that suits your needs .
Good Luck
|
|
|
|
|
hi...
In my application , i'm using a thread to check for Queue contents. If i have any data then i have to transmit/receive that data. But my application is taking maximum CPU time if i'm using infinite for loop in this thread & because of this my CPU is using maximum time for my application(around 95%). & if i'm not using this for loop i am not able to transmit/receive whatever data is there in queue.
private void ComportThread()
{
for (; ; )
{
//Check for queue contains, if data is there then trnasmit/receive
}
}
What is the problem...?
Thanking you,
Vinay
|
|
|
|
|
Within your for loop, place a Thread.Sleep
|
|
|
|
|
See in a method which is working with thread if we have a loop we must use some code to stop the loop. for example i wrote the following code which passes to ThreadStart:
for(;;) {<br />
bytesRcvd = client.Receive(rcvBuffer, 0, rcvBuffer.Length,<br />
SocketFlags.None);<br />
msg1 = Encoding.UTF8.GetString(rcvBuffer);<br />
msg3 = "\0";<br />
msg1 = msg1.Trim(msg3.ToCharArray());<br />
<br />
Array.Clear(rcvBuffer, 0, rcvBuffer.Length);<br />
}
the thread is await until the data received if we wrote a code in loop that has no stopping, CPU will be busy by 100%.
Bahman
|
|
|
|
|
You can use a synchronizer, like semaphore to avoid the CPU usage of the ComportThread().
The ComportThread will wait on a semaphore. The producer will signal the semaphore when an object is queued.
This way the ComportThread will wake up only when it is needed.
Ami
|
|
|
|
|
How do you do the checking of the queue to find if data is available? I'd suggest that you use some synchoronization mechanism like Monitor[^]. This would result in the thread not getting scheduled until there is data available in the queue.
|
|
|
|