|
I have a panel on my form and what I want is when the user double clicks the panel, it will load the date and time properties window (Microsoft WIndows Date and time screen) So the user can change the time and date. BUT I would like (if possible) The application to load as a fixed dialog screen so you would have to use it or you could not do anything else. ANy suggestions how I could do this?
In the end we're all just the same
|
|
|
|
|
Something like:
<br />
Process oProc = new Process();<br />
oProc.StartInfo.FileName = "control.exe";<br />
oProc.StartInfo.Arguments = "date/time";<br />
oProc.Start();<br />
oProc.WaitForExit();<br />
You can launch date/time property window using:
"control.exe timedate.cpl"
or
"control.exe date/time"
or
"rundll32.exe shell32.dll,Control_RunDLL timedate.cpl"
|
|
|
|
|
Hi all,
I have two rich text boxes that I need to join together for example
........RichTextbox1 + Richtextbox2 = Richtextbox1(after join)
Line1........a................b..................ab
Line2........c................D..................CD
Line3........e................f..................ef
I can spin through it line by line but there are over 3000 and this is causing the application to crash
I have tried using Append, insert, += within the loop through the lines but it is still unstable !
Any help would be most appreciated !!!!
Thanks in advance
John
-- modified at 4:10 Tuesday 4th April, 2006
|
|
|
|
|
You could try looping through them line by line (like you are already doing) and putting the text into a StringBuilder. This should be by far faster and the controls are not stressed. After everything is finished set the complete text to your richtextbox: myRichTextBox.Text = myStringBuilder.ToString():
|
|
|
|
|
How about define a variable to store the text in two RichTextBox?
Then using += to join them.
after join all lines. then put result text to RichTextBox1.
--
hoping it help you.
|
|
|
|
|
Hi all
Thanks for the response ! but i am still getting the issue
I am currently using :
------------------------------------
System.Text.StringBuilder sb = new System.Text.StringBuilder();
for (int i = 0; i < RichText.Lines.Length; i++)
{
sb.Append(RichText.Lines[i] + tempData);
}
RichText.AppendText(Convert.ToString(sb));
---------------------------------------
This will run for a random number of rows before crashing
i am going through 6000 + lines (do you think this is an issue).
I have tried a few variations on this theme as stated in previous posts. i have also tried textbox instead of a richtextbox. I AM ALL OUT OF IDEAS !!!!
any help would be fab
Thanks
|
|
|
|
|
Have you tried something like
rtb = RichTextBox
//if you need the styles to copy also
rtb3.RTF = rtb1.RTF + rtb2.RTF
//if you don't care about the styles
rbt3.Text = rtb1.Text + rtb2.Text
-Richard
|
|
|
|
|
Thanks for the reply !
Will that not just put rtb2 at the bottom of rtb1 ?
What i need is to append the first line of rtb2 to the first line of rtb1 and the sencond line of rtb2 on the second line of rtb1 and so on.....
|
|
|
|
|
Sorry I didn't read you org post carefully enough.
In that case your best bet is the solution provided above by Robert Rohde I think.
-Richard
|
|
|
|
|
Can some one point me in the right direction on how to implement a smal C++ console app in Csharp.
|
|
|
|
|
For clarification:
1. Do you want to use or implement the C++ console app in C#? (Whereas the second doesn't make any sense to me, cause how should i implement a C++ app with C#)
2. What exactly do you mean by use (if that's what you want)?
www.troschuetz.de
|
|
|
|
|
I'm implementing two diferrent code parts.
I'ts a chessplay. I have the functionality in C++. Now a want to add a GUI to the game. So a want to use functions in C++ from C#
|
|
|
|
|
I think you'll have to pinvoke the functions. But I'm not sure if it's possible when there inside a console app. Didn't use it much besides calling some win32 apis.
www.troschuetz.de
|
|
|
|
|
You can attach your own streams to a System.Diagnostics.Process class object to send/recieve console style input.
|
|
|
|
|
|
Maybe you want to make your own DLL with the console functions, and methods.
|
|
|
|
|
hi
i want to download Directx .0 SDK For Framework 1.0 from this link :
http://www.microsoft.com/downloads/details.aspx?FamilyID=edb98ffa-a59c-4c23-9b92-ba304f188314&DisplayLang=en
but when i follow steps for download,microsoft say to me :
Validation Incomplete: Windows Must Be Activated
how to download it without this problem ?
or please give me another links to download dx90 sdk and documention and ...
thanks
|
|
|
|
|
hdv212 wrote: how to download it without this problem ?
Buy Windows XP
|
|
|
|
|
|
I cant figure out when to use base classes and when to use common
methods that just take in different parameters and do the same task,
instead of having 1 method for each of my objects.
ok so in my data layer (3-tier enterprise web solution), I have
4 classes: mygets, myinserts, mydeletes, myupdates.
Each of these hit the database and do the appropriate work for
7 of my tables: tb1, tb2, tb3 ... tb7
mygets has these methods gettb1(tb1key), getAlltb1, gettb2(tb2key), getAlltb2 ... tb7
each returns a dataset
myinserts takes all fields for tables (as sql parameters) and adds them:
addtb1(field1, field2 ... ), addtb2(field1, field2, ... ) etc.
same for myupdates and mydeletes.
whats the best way to structure having to code the least, and have it
consistent: base classes which have the common functions for each of these 4?
or static methods that basically take in different parameters and get the same
stuff done?
which is more efficient?
related question: are base classes just a better "location" to put common
methods that can be used by a lot of classes? classes that derive from them?
thanks
M
-- modified at 2:09 Tuesday 4th April, 2006
|
|
|
|
|
Hello,
Why not use static overloaded methods from a class say "DatabaseHelperClass"?
GetRows(string key,string value, string tableName)<br />
GetRows(Hashtable filter,string tableName)<br />
GetRows(string tableName)
and same for other tasks??? As far as additions/updates are concerned, you can put the values in a hashtable such that the Key represents the column name and value represents the value of the column you want to add or update in the table. with respect to the key..
For Additions
AddRow(string tableName,Hashtable values)
For Updates
UpdateRows(string key, string value, string tableName, Hashtable values)<br />
GetRows(Hashtable filter,string tableName, Hashtable values)<br />
UpdateRows(string tableName, Hashtable values)
you can do similar for deletions as well. Don't you think it will be a clean approach?
Maqsood Ahmed - MCAD.net
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
yeah thats what Im doing: I have overloaded functions that do Gets, Insert, Deletes and Updates
for ALL tables.
My question was: where should I put these overloaded functions? in a base class or as common static methods in another class called Utils?
I realized base classes are only useful for object classes, meaning non-static instances.
And also, in my business layer, I do have one class for each table which becomes an object. These table objects then use my data layer to get, insert, delete and update.
pretty clean huh!
M
|
|
|
|
|
Hi
You might like to try using OOP[^]
Create a class for each table. Include properties for each field, and the methods that operate on those properties.
Just a thought
----------------------------
Be excellent to each other
EasiReports[^] My free reporting component for WinForms.
|
|
|
|
|
Hello,
In my opinion, making a class for each table is not an optimal solution because a database might contain alot of tables, and it can expand also, which will increase the implementation cost and It may also result in code replication.
If generic methods for Addition, Update, Deletion and retrieval are deviced then it won't affect much as far as implementation is concerned. Developers will only need to add functionality to use newly added tables where ever it is required without implementing new classes for each table.
What you think?
Maqsood Ahmed - MCAD.net
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
---how can I recieve a custom message sent from COM server to C# client?
if I send a message in the range 0 to WM_USER-1, it works.
but fail when I send a message above WM_USER?
can someone solve this problem for me?
thank you very much!
Vincent
|
|
|
|