|
Most probably, as you said your code works fine in your frnds computer. Might be your computer is getting hanged. And as you are keeping a sleep command immediately after the message box. What might be happening that when you fire a sleep command , the thread on which your whole application is working is paused. and hence the message box might not be able to get invisible , as the application is in sleep mode..
Or one more thing, Do one thing , keep any integer variable and show it in the message box displaying no of times message box is opened. This might give you an idea that after pressing YES , might be the new message box have appeared but because of very short time span , you might not be able to visualise the changes. .
|
|
|
|
|
try to refresh the main form that will ensure all the UI changes to be commited before moving on, check out either of the two methods, might work!!!
<br />
this.Invalidate();<br />
<br />
<br />
this.Refresh();<br />
<br />
|
|
|
|
|
Hi,
use a BackgroundWorker and show a dialog with progress bar and cancel button. It is the decent way to offer information and control to a user while doing a long operation. Don't bombard the user with lots of MessageBoxes, they are just annoying people.
There are some excellent articles about the subject here on CodeProject.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Hi guys, can anybody give me some information on how to change the color of the file(I don't care if it is blue, red etc.., but not black).
erson
|
|
|
|
|
egpuyos wrote: Hi guys, can anybody give me some information on how to change the color of the file(I don't care if it is blue, red etc.., but not black).
What does it mean? which file color do you want to change?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
I mean, I have a program that will change the color of a certain filename . See for example, I have test.doc in my drive C:\ "C:\test.doc", then I want to change it's properties "I mean the color of the filename (it's default name is BLACK.as what I've observe)."
![Cry | :((](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_cry.gif)
|
|
|
|
|
Do you mean in windows explorer ? If this is possible at all, it would involve some sort of shell extension, probably best written in C++
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Yeah, I though it, but it is possible to write it in C# language? Do you have any such idea (I mean, some code that give me some idea to how to?).
Thank in advance.
erson
|
|
|
|
|
It's possible, but only by burying yourself in writing a ton of COM Interop code. This is not something you going to get any information on in a forum post since the topic could write an entire book.
Save yourself the overhead and write it in C++.
|
|
|
|
|
Hi
I am copying Files and folders from one drive to another using loop.
My problem is that when i copy it also copies system files and folders.
Is there any method or condition to skip them?
Thanks in advance
|
|
|
|
|
You can use the FileInfo class to first work out which are system files.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I m not getting any option to know about system folder or file.
|
|
|
|
|
here[^]
and here[^]
I know it's hard, but do try o help yourself. CG had given you enough to at least look up and give it a go!
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
hi i want to change the the text of a textbox if it is in password mode how we can do it
pls help me
thank you
|
|
|
|
|
myPassword.Text = "this is my new password";
um... why did you not try that ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
In the properties of the text box, there is a property named Password character : you just keep any symbol or anything on that..
TextBox txt = new TextBox();
txt.PasswordChar = new Char() {'*'};
txt.Text = "Hello";
This might work fine. .
|
|
|
|
|
pls try it
I think you didn,t understand my problem
my problem is related to webpage
in web the textbox don't have any property like this
|
|
|
|
|
Hi there
Im a coding newbie and i'd like to find out how to edit cells in a datagridview control and write this back to a database.
To populate the datagridview, i'm using the sqldatareader object.
Any examples would be very much appreciated!!
Thanks
Di
|
|
|
|
|
Try a search, there are literally 1000s of article/samples available. There is an excellent one on CP that should be easy to find.
You should do some research on using a datareader, I believe it locks the connection while it is active, therefore you will not be able to use the connection while the grid is active. Use a datatable instead.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
to set value in a cell, you must know its column index as well as row index.
dataGridView1[ColumnIndex, RowIndex].Value = "Myvalue";
divinyl wrote: To populate the datagridview, i'm using the sqldatareader object.
thats good
this article[^] may help
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Dude. ..
Its better not to use a SqlDataReader object. as it locks the connection, and it requires you to keep it open.
You can use SqlDataAdapter and fill the table in datatable. And bind datagridview datasource to that table.
e.g:
SqlConnection cn = new SqlConnection("Bla Bla");
SqlDataAdapter adp = new SqlDataAdapter("Select * from Products",cn);
DataTable dt = new DataTable();
adp.Fill(dt);
datagridview1.DataSource = dt;
The changes you make on gridview cell will automatically be reflected on to the table..
So no worry on that .. .
|
|
|
|
|
Hi,
I have recently invested in a security system for my house using low lux colour/infrared CCTV camera's and an internal 8 channel DVR card (T-S808R) for my pc.
The DVR card uses the Philips SAA7130 chipset to encode the video, and has 8 registered devices in the Device Manager. They are registered as "DVR Video recoding device", device type "Sound, video and game controllers" and manufacturer "SAA7130".
Since the Philips chipset should be standard, I recon I should be able to read directly from the hardware driver, however I am unsure of how to do this.
Another way would be to intercept the MPEG4 video file that is created on motion (there is less than 1 second delay) and to interpret this video file, however I am unable to read the file (using a framework like the Tao Framework) to extract individual frames.
Can anybody please give me some advice, preferrably to read from the video driver, that could guide me to getting at the actual frames of the images for possible image recognition functions.
Thanks in advance
Stephan Johnson
South Africa
|
|
|
|
|
I am trying to write a shell extension in C#, which shows an item in right-click context menu in explorer. But all examples which I try contain a lot of code and doesn't show anything (i assume I do something wrong, or don't do some important step )
Many examples have static methods:
[System.Runtime.InteropServices.ComRegisterFunctionAttribute()]
static void RegisterServer(String str1)
[System.Runtime.InteropServices.ComUnregisterFunctionAttribute()]
static void UnregisterServer(String str1)
Should i call them, or they will be called automatically?
Does anyone have any ideas, or maybe knows any libraries/classes for that, where I can just call something like *.RegisterContextMenu(myMenu).. and ready ?
|
|
|
|
|
I am trying to read an Excel sheet to my program using OleDbDataAdapter into datatable , this is working fine except that if the excel column is text and taken into string field in the datatable its read as blank . anyone came across such a case .
I am using ,NET 2.o framework with visual studio 2005 - C# .
thankx
|
|
|
|
|
Actually , if the first data cell in the column is numeric , the full column is read as numeric and any text in the same column is read as blank .
and if the first data cell is text then the full column is read as text and any numeric cell in the same column is read as blank .
I have columns with mixed data , some numeric only and some are string .
any hints ?
|
|
|
|