|
|
I have two questions appeared as below:
1.Thanks to stancrm,that gives me the help,what does "Hook Enabled" mean?
2.The message and title of the MessageBox in Uyghur language now appears normally,but the text of the buttons is still in chinese. How can i change the text of the button in the MessageBox,for example,change the OkButton text "Ok" to "xxx".
thank you,further help will be appreciated,thanks again!
|
|
|
|
|
Please ask the author of the article.
|
|
|
|
|
how to make server which 10 000 clients and more?
|
|
|
|
|
I presume you wanted a server app that can hold 10 000 Connections?
The app is not main issue, you need a fast server with enough memory. App is same as it would hold 2 or more connection
|
|
|
|
|
|
Hi all,
when i run my application on a local PC to connect to SQL which is installed Locally i use the following config file.
<configuration>
<sqlServer>CelData</sqlServer>
<sqlDatabase>mydatabase</sqlDatabase>
<sqlUser>test</sqlUser>
<sqlPassword>test</sqlPassword>
<sqlTrusted>False</sqlTrusted>
</configuration>
However ,now i would like to connect to a database on remote PC (with different IP address).When i Run the application locally i would like to connect to the other server that is hosting the database.
How would i change the above script so that the database is going to be the one on the remote server?
Please advice.
Thank you in advance.
|
|
|
|
|
Take a look at connectionstrings.com[^], it has the correct information for most scenarios.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks very much Henry.Its Much appreciated.I have tried to get around it.However it doesnt have something related to the one i am using the XMl data to get a connection to a database.
Any Help in relation to the one i am using Please?
|
|
|
|
|
The XML that you are using simply breaks the connectionstring into its various parts.
So the <sqlServer>CelData</sqlServer> line in your XML is the same as the Server=myServerName\theInstanceName; part in the examples on that site. The other parts of your XML, similarly match the other parts of the example (Database=, Trusted_Connection= etc.). You just have to use a little logic to work out which bit matches which part of the XML.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Sorry Henry ,I have tried to come up with it still got some error.
Can you please give me a hint of one Connection string similar to the one below.
<sqlServer>ServerName</sqlServer>
<sqlDatabase></sqlDatabase>
<sqlUser>sa</sqlUser>
<sqlPassword>^1^g1xgwZxejDBJqb8FWQXYeQ==</sqlPassword>
<sqlTrusted>False</sqlTrusted>
<fileaccessDomain>c3</fileaccessDomain>
<fileaccessUserName>Daniel</fileaccessUserName>
<fileaccessUserPassword>^1^Rg+/IaL/Xa1KfZLSuaLN0Q==</fileaccessUserPassword>
<ServerRoot>\\test\test\</ServerRoot>
<VirtualRoot>BangRoot\</VirtualRoot>
<FileFTPSite>BangMedia</FileFTPSite>
<Folder>Operator Pictures</Folder>
|
|
|
|
|
You have overcomplicated things. Pretty much all that you should have to do is change the <sqlServer> name, assuming that the databasename is the same, and the sqlPassword and sqlUser, if they are different.
Something like this:
<pre>
<configuration>
<sqlServer>RemoteServerName\SQLInstanceName</sqlServer>
<sqlDatabase>Name of the Database you want on that server</sqlDatabase>
<sqlUser>sa</sqlUser>
<sqlPassword>^1^Rg+/IaL/Xa1KfZLSuaLN0Q==</sqlPassword>
<sqlTrusted>False</sqlTrusted>
</configuration></pre>
where RemoteServerName, is the name of the remote server machine (or, I believe, its' IP Address.
and SQLInstanceName is the name of the SqlServer Instance on that machine. e.g. on my local machine SQLInstanceName would be SQLExpress, because that is what I named it when I installed it.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi, guys,
I am trying to get time by MouseDown and MouseUp events on a custom control with several picture boxes on it. Since e.X and e.Y can be taken when those two events occur, I create a method in that custom control called getTimeAt(int x, int y). The code of this method is as follows:
public DateTime getTimeAt(int x, int y)
{
DateTime selectedTime = new DateTime();
Random rnd=new Random();
int hour = (y - 10) / 20 + 7;
int minute = (x - 25) / 50 * 10+rnd.Next(1,9);
if (minute>59)
{
minute = 59;
}
selectedTime = DateTime.Today;
selectedTime = selectedTime.AddHours(hour);
selectedTime = selectedTime.AddMinutes(minute);
return selectedTime;
}
However, this doesn't work the same way as I expected. When I initiated one object of this custom control in a winform, and made a test app, do it as the following code,
private void selectorControl1_MouseDown(object sender, MouseEventArgs e)
{
maskedTextBox1.Text = selectorControl1.getTimeAt(e.X, e.Y).ToString("hhmm");
}
it didn't get the e.X and e.Y from those picture boxes but only from that custom control. Anyone knows what's wrong here? Or does anybody have a better idea to solve my problem?
Thank you!
|
|
|
|
|
The MouseEventArgs coordinates are relative to the control that raised the event (generally - some cases where relative to form or screen origin).
I think you will have to handle the PictureBox_MouseDown for each of your PictureBoxes.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
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...
|
|
|
|