|
Thanks Thomas,
I am just trying new things. Any ideas?
regards,
George
|
|
|
|
|
Hi,
I have a project done in c# VS2003. And i need to change the layout, but i have a problem, i don't know how to solve it!
I have a form (the parent) with the FormBorderStyle property set to FormBorderStyle.None. When i try to open the MDI Child forms with the same property set to FormBorderStyle.None the behavior is different. The border and the title bar appear briefly (like a flash)and then the form is correctly displayed.
How i can solve this problem?
Thanks!
|
|
|
|
|
I'm using form with IsMdiContainer set to True. I then create and show form, but I did not set the form.MdiParent to the Mdi container form. How can I retrieve all forms which I previously created?
|
|
|
|
|
Hi...
When i click on IE's Title bar and move it. Then which event will be fired.
And how to handle this event in c#.
Kiran Banker
|
|
|
|
|
1) How to store "connection string" in global.asax file and web.config file using c#?
2) How to get that "connection string" from web.config file and global.asax file to My web application?
3)Where i have to call that connection string on My web application and how i call to that connection from My web application..?
CheeN
|
|
|
|
|
Hi
Iam using Masked Textbox for Time format 24 Hours and Minuts 60 Seconds 60 I need a Time Format Valdation.please some examples.
somasundaram
|
|
|
|
|
Hi,
I have a Socket Class which connects, accepts the multiple clients and receive data from each client. I'm using a thread to accept the connection. I have to pass the IpAddresses and status to the GUI for display. How do I pass the value from thread to GUI? How do I user SendMessage/PostMessage method? Can I use the Invoke method. Please explain.
Thanks in advance
|
|
|
|
|
Cross thread GUI updation is not allowed. You need to use the invoke method.
|
|
|
|
|
Can you show me a sample code how to use Invoke method ?
|
|
|
|
|
string newText = ...;
form.Invoke(new MethodInvoker(delegate {
textBox.Text = newText;
}));
|
|
|
|
|
The code should be put in the thread or in the form?
|
|
|
|
|
Susanmat wrote: The code should be put in the thread or in the form?
It should be in the method which updates GUI. See the following sample
void WorkerMethod() {
if(this.InvokeRequired)
this.Invoke(new MethodInvoker(UpdateGUI));
}
void UpdateGUI() {
}
|
|
|
|
|
You might want to take a look at BackgroundWorker object. An example might look like the following, depending on your needs.
_bw = new BackgroundWorker();
_bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(Worker_RunWorkerCompleted);
_bw.ProgressChanged += new ProgressChangedEventHandler(Worker_ProgressChanged);
_bw.DoWork += new DoWorkEventHandler(Worker_DoWork);
_bw.WorkerReportsProgress = true;
_bw.WorkerSupportsCancellation = true;
Look at
_bw.ReportProgress(..) method
|
|
|
|
|
The problem is My thread which updates the value is in a different class and I need to update the value in another from. The thread will accept clients and I need to update the status ( ture or false ) in the main form.So where should I call the delegate. I'm not able to get that. Please help
|
|
|
|
|
Hi,
My new project is to go through a list of tasks against each sql server 2005 machines. Each task has a different sql query which gets executed and the data is returned for each task.
I am thinking of having each task with the relevant sql inside an xml file.
i.e.
<tasks>
<task>
<name>get the version of sql server</name>
<sql>sql code here</sql>
</task>
<task>
<name>get domain name</name>
<sql>sql code here</sql>
</task>
<task>
...
</task>
</tasks>
Then a winform application goes through this list in the xml file and for each task it's sql gets executed against the master database.
1)
Is what I am doing correct?
2)
Can the .net front end pickup the sql as a string and execute it against the sql server 2005?
Thanks
|
|
|
|
|
arkiboys wrote: 1)
Is what I am doing correct?
Its one way of doing it.
arkiboys wrote: 2)
Can the .net front end pickup the sql as a string and execute it against the sql server 2005?
Yes, use the SQLCOMMAND object
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hello Friends,
I am developing an windows application in which i need to connect to MySQL Server through my application mean user enter the User Name and Password after that in a list box all the database of MySQL comes in Listbox.
So my problem is how to connect to MySQL database through my application
Please help me i am new in database..
Thanks
|
|
|
|
|
|
You can use ADO.NET[^] to create a connection to the database and then query all databases using a SqlCommand. To connect to the database you need a valid connection string[^].
I'd recomment to use the MySQL .NET connector[^] to use for this task.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Sir as you give me the link of connection string that is used to connect to MySQL server that's great but as i want to connect to like this user will enter Server Name, UserID and Password in the available textboxes and after that it will click on connect button that it should connect with all the available databases and shows them in Listbox
Thanks
|
|
|
|
|
I'm not sure if you can connect to the server without specifying a valid database. Maybe you should once connect to a database and then issue the SHOW DATABASES SQL command to get a list of the databases available to use for the next DB login from the listbox.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
$user="UsernameForYourMySqlDB";
$pass="PasswordForYourMySqlDB";
$db="YourDB_Name";
$link=mysql_connect("localhost",$user,$pass);
if(!$link)
die("Couldnt connect to MySQL");
mysql_select_db($db,$link) or die ("couldnt open $db: ".mysql_error());
print "connected to $db";
CheeN
|
|
|
|
|
How can I rename a file? what i am doing is copying a file from it's source to a certain directory. Now I want to rename the file name in the destination folder. How can I do that?
Thanking in advance.
|
|
|
|
|
|
I've done some looking around and I'm a bit confused
Here is an example of the data that's in the binding source
[IMG]http://i38.tinypic.com/xfoimp.png[/IMG]
what i want to do is sort on the 3rd row ( 4 or 3) and then sort by the date ( to see if the record is before a certian time
my idea to do this was to
filter the BS
BS.count
then unfiltered the BS
The problem i keep running into is that i cant say that i want Just 4 or Just 3
What I've come up with so far is
private int deadlineCount(DateTime Time, int LeagueID)
{
int total = 0;
string league;
if (LeagueID == 99)
{
league = "";
}
else
{
league = LeagueID.ToString();
}
BS.Filter = string.Format("LeagueID >= '{0}' and LeagueID <= '{0}'and [End] <#12/30/1899 {1}#", league, Time.ToString("h:mm tt"));
total = BS.Count;
BS.Filter = "";
return total;
}
But i keep running into problems that i cant use any operator ( like ,> ,= ,>=,) becuase it can not preform X onn system.int32 and system.string.
I've been looking around but all the example seem to be for strings or dates.
|
|
|
|