|
David, thank you for you quick reply. I've tried that also by declaring such a method in that custom control class, and then referring it to the MouseDown event of each PictureBox, but my problem here is how do I code so that I can get the time and then show it in MaskedTextBox. I would appreciate you so much if you can help me out of this. Thank you and Best Wishes!!
There is a will, there is a way!!@
|
|
|
|
|
how do i disable the close button in a windows form
This code was posted by me...
|
|
|
|
|
Set Form.ControlBox = false
(this also removes the Maximise, Minimise and system menu from the form).
You can disable the close box (grey it out, but leave the other info) by overriding the CreateParams method in your form:
protected override CreateParams CreateParams
{
get
{
CreateParams parms = base.CreateParams;
parms.ClassStyle |= 0x200;
return parms;
}
}
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Hi every one.
there is a application that receives data from BTS stations and shows them as log in a grid...
In order to analyze the log,I need to access to the grid.I don't know how to access and read that?
in other words how can I read data shown in a third party application?
|
|
|
|
|
Hi,
you can interact with GUI parts in any app using Win32 calls such as EnumWindows, FindWindow, SendMessage and GetWindowText; it takes some knowledge of how Windows works and a lot of P/Invoke. If you haven't done this yet, you'll need to learn several new things. Use Google and look for some examples here on CodeProject.
My TrayIconBuster article does something related, although the goals are different.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Thanks for your reply
I searched user32.dll API Reference for C#,the best I found is "list of some user32.dll functions.With findWindow(...) the window could be found but how access to it's objects(ex. grid,textbox).which function could help me?
thanks in advance
|
|
|
|
|
All Controls are Windows themselves. And you will have to study, you can't solve your problem by asking 100 questions here.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
ok....hmmm ... Could you please [give|refer] me some references for study?
Thank you.
|
|
|
|
|
I think perhaps this question is beyond the scope of the forum you have posted into. In order to access the information in the third party application you need to know how that application stores the data, including the structure of the windows used to display it. By enumerating all the windows belonging to the application you may be able to get to the simple text displays, but that will not guarantee you can understand the data as it is presented.
My suspicion is that you need to spend a lot of time learning the fudamentals of MS Windows before you can attempt to solve this problem. I would suggest reading anything (and everything) written by people like Mark Russinovich and Charles Petzold for a start.
good luck.
|
|
|
|
|
Hi,
Any straight forward way to produce a video from a series of images in C#?? You know, setting the frame and compression rates, I suppose DirectX can do that but couldn't find an answer..
Thank you guys.
|
|
|
|
|
Hi folks!
I have a strange behaviour I cannot explain, perhaps someone who's deep into 64bit development can enlighten me?
I have 2 applications written in C#: A main app (A) and an additional program for updates (U). When A is started and there's something to update, A starts U (using System.Diagnostics.Process) and quits. U in turn updates A's files and restarts A afterwards. So far, so simple. Worked for years (on 32bit Windows) without problems.
Now recently while doing some testing on Win7RC 64bit I discovered that the automatic update fails. When there's something to update, Windows tells me after a while that U doesn't work anymore and kills it (leaving an exception in Kernelbase.dll in the event log).
After some debugging I found that U hangs as soon as I try to show a non modal dialog containing at least one control (using new Form().Show(); showed the empty dialog OK and didn't hang). When I modified U's status dialog to add all controls inside its Load event and not already inside InitializeComponent() , the Updater hangs when I add the first control to the Form's Controls collection.
A was compiled with x86 as target (because I need to use 32bit third-party COM objects) and U with AnyCPU (because it didn't have any specific external dependencies I thought it doesn't matter which processor architecture it's compiled for), thus running as 64bit application on a 64bit OS.
After switching U to x86 as well it worked, but I still don't know why!
With A being x86 and U being AnyCPU I can't even get a MessageBox to show (although the call to MessageBox.Show() doesn't hang the application).
Unfortunately I don't have the faintest idea what's going on here. Does anyone have a clue?
Thanks in advance,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Hi mav,
mav.northwind wrote: I have a strange behaviour
You do? that is too bad.
I don't think I can help you.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Ok, saying that my applications are behaving strangely would be more appropriate
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
hi all,
i have a datagridview, that one of columns is delete link.
when i click on a delete link and close form, the record from db is not deleted.
but, when i click on two delete link and close form, first clicked record is deleted and second clicked is not deleted.
my code is:
--------OnClick Event--------
MYDBClass db = new MYDBClass();
db.deleteDAT("Unit");
---------MY DB CLASS---------
private SqlDataAdapter Sda;
-----------------------------
public void deleteDAT(string tblName)
{
SqlCommandBuilder cb = new SqlCommandBuilder(Sda);
Sda.DeleteCommand = cb.GetDeleteCommand();
try
{
Sda.Update(Ds, tblName);
}
catch (SqlException e)
{
MessageBox.Show(e.ToString());
}
}
|
|
|
|
|
I was trying to built a "Paint" program that can paint that user wants to paint. but the thing is when my form is minimized or another form is selected over my form the painted portion is removed.
In java , i know that if i use "repaint()" function the it as ok, but what to do with C#.
sorry for my english.
plz help me urgent.
Thanks
Mahbub-E-Rababni [Tafin]
|
|
|
|
|
You can use Refresh()
or use Event OnPaint()
|
|
|
|
|
thanks
OnPaint() can only paint the base form, i can not paint on a panel or a picturbox....what to do???
thanks.
Mahbub-E-Rabbani [TAFIN]
Bangladesh
|
|
|
|
|
TAFIN wrote: OnPaint() can only paint the base form, i can not paint on a panel or a picturbox
Since when?
Every control has it's own Paint event.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
i took a form and then a picturebox. i wanted to piant on the picture box that will stay if the form is minimized of sent to back of other forms.
the Event OnPaint()is used for the base Form Form1 but not for picturebox...and does the Event paint() of picturebox does that waht i want!!!
thanks.
mahbub-E-Rabbani [TAFIN]
Bangladesh
|
|
|
|
|
Then use the PictureBox.Paint event - if you must use a picture box at all, rather than painting on the form directly. If you Google for "PictureBox.Paint" the first link is the MSDN example of how to paint on a picturebox[^]
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
ok
thanks
|
|
|
|
|
C# repaint equivalent is Invalidate.
Life is a stage and we are all actors!
|
|
|
|
|
hi.i try delete all data in my database but database size not change.why?
please help me to resize my database.
|
|
|
|
|
Hi,
databases don't simply grow and shrink as you add or remove data; they will grow in rather large steps, and typically they only shrink when you give a command to compress the database; this reorganizes the entire data storage and may take a while.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hi,
When I do request from web browser my cookies look like this:
Cookies/Login:
CLIENT_WIDTH_DIR=1276
CLIENT_WIDTH_DIR=250
CLIENT_WIDTH=250
MAIN_WIDTH_DIR=1066
MAIN_WIDTH_DIR=60
MAIN_WIDTH=60
PHPSESSID=cb49a7c6928e0cdd1892f2bdc0322173
But when I use the following code:
myHttpWebRequest.Headers.Add(HttpRequestHeader.Cookie, "CLIENT_WIDTH_DIR=1276");
myHttpWebRequest.Headers.Add(HttpRequestHeader.Cookie, "CLIENT_WIDTH_DIR=250");
myHttpWebRequest.Headers.Add(HttpRequestHeader.Cookie, "CLIENT_WIDTH=250");
myHttpWebRequest.Headers.Add(HttpRequestHeader.Cookie, "MAIN_WIDTH_DIR=1066");
myHttpWebRequest.Headers.Add(HttpRequestHeader.Cookie, "MAIN_WIDTH_DIR=60");
myHttpWebRequest.Headers.Add(HttpRequestHeader.Cookie, "MAIN_WIDTH=60");
myHttpWebRequest.Headers.Add(HttpRequestHeader.Cookie, "PHPSESSID=cb49a7c6928e0cdd1892f2bdc0322173");
the cookies look like:
CLIENT_WIDTH_DIR
1276,CLIENT_WIDTH_DIR=250,CLIENT_WIDTH=250,MAIN_WIDTH_DIR=1066,MAIN_WIDTH_DIR=60,MAIN_WIDTH=60,PHPSESSID=cb49a7c6928e0cdd1892f2bdc0322173
2 lines, broken, instead of 7 and, of course, session id is wrong and nothing works.
How I can set the cookies right?
Thanks.
|
|
|
|