|
Thanx for your reply
Isn't there another efficient way ? It must be exists.Please help me if anybody can do that ?
King Regards
[ _ Always there is another way _ ]
|
|
|
|
|
i can't find any Tab Control in ASP.NET ,i want code for adding Tabstrip control in my project,Is there any way 2 add that control in my proj?i hav seen that IE doesn't support for Tabstrip control in asp.net1.1 ..
ranjith reddy.
|
|
|
|
|
hi there,
I'm pretty sure there are some articles about this on CP site. below is just one of them. Hope this is what u need
http://www.codeproject.com/aspnet/WebTabStripUserControl.asp
<< >>
|
|
|
|
|
i need help..
in the code below, i'm saving the changes done to the data. if any exceptions, then i'm trapping them and getting them all in an arraylist, so errArray has all the data.Then i check if the <i>error</i> flag is true, and show the error message i.e. <i>errData.ErrorStr</i> for that particular data.
CodeData[] errArray;
errList = new ArrayList();
errArray = dataRemoteObj.UpdateCode(chkArray);
for( int i = 0; i < errArray.Length; i++ )
errList.Add(errArray[i]);
for(int i = 0; i < errList.Count; i++)
{
//Shows error message.
CodeData errData = new CodeData();
errData = (CodeData)errList[i];
if(errData.Error)
{ MessageBox.Show(Convert.ToString(errData.ErrorStr));
}
}
////////
What i want is, to show just one message box with all the error messages ...
cld any one just tell me how to do...it has to be string concat..but cant figure out how to do..
|
|
|
|
|
CodeData errData;
string msg = "";
for(int i = 0; i < errList.Count; i++)
{
errData = (CodeData) errList[i];
if (errData.Error)
msg = msg + Convert.ToString(errData.ErrorStr) + "\n";
}
if (msg != "")
MessageBox.Show(msg);
www.troschuetz.de
|
|
|
|
|
Thank u
|
|
|
|
|
hi there,
in C#, u can use operator "+" to concat all strings, for example:
string str = "string1" + "string2"
So u just loop all error list and append all the error messages into one msg
Hope this anwsers
<< >>
|
|
|
|
|
Thank u
|
|
|
|
|
Hi all !
My computer have 3 Processor ( 3 CPU). My Application use only 1 processor for the work. Now I want to use all 3 Processor. Pls, show me How to program in order to using all 3 Processor. Thank you alots !
|
|
|
|
|
How is it possible your that computer has an odd number of CPUs? Am I missing something?
However, you have to use multiple threads in order to use *more* than 1 CPU. In this case there are so many problems so the program should be re-designed. For example: is the main job (task) subdivisible in two or more separate execution lines? If the job, for example, computes a result from an array of values, it can be easily broken in some parts. Each part will be executed by a Thread.
Other problems are: re-assembly the results of the various threads, manage their synchronization, manage the stop of the threads, that (if not manually stopped), will continue their execution until the end or the system shutdown (even if you close the app!).
Moreover, you cannot know if the threads are REALLY executed, because the OS decides which thread(s) are to be executed.
So multithreading is very hard to achieve without (unexpected) performance drops, strange behaviors, and so on.
In C# the base namespace is System.Threading, try to search on CodeProject: you'll find many good articles.
Hope this helps.
[ITA] Tozzi ha ragione: Gaia si sta liberando di noi.
[ENG] Tozzi is right: Gaia is getting rid of us.
|
|
|
|
|
hi
I am using GDI+ and i want to use tooltip in my graph but i m not getting any solution.
So Please help me for implementing tooltip in graph
|
|
|
|
|
hi there,
this article below might give u an idea on this.
http://www.codeproject.com/cs/miscctrl/hotspot.asp
<< >>
|
|
|
|
|
I had a problem with accessing members of the main/root form created in a windows form application a while ago and still havent been able to solve the issue.
What i want to do is to open another form (form B) from the main form (form A).
Form B then performs actions which should update information in form A, hence i need a way to access functions in form A from form B.
form A is declared as public as you see here:
public class MainForm : System.Windows.Forms.Form
It also contains a public function like this:
public void updateTextFields()
This is how form A is initiated:
Application.Run(new MainForm());
Form B is initiated and run like this within a function in form A:
GetForm getForm = new GetForm();
getForm.ShowDialog();
Now i can access form A´s general settings such as visibility, position etc but no public functions are shown.
Any help would be greatly appreciated.
|
|
|
|
|
I can't see any way in which form B can access form A without you providing form B with a reference to form A's instance.
If you want form B to access form A just pass it as a refernce in form B's constructor.
However, a better desgin would be as follows:
1. Let form B get all the information it should.
2. Once the user clicks on the OK button, close the form.
3. Form A will access the information defined in form B using form B's getters.
4. Problem solved.
In most cases, it is not wise to create coupling between forms. And it is also not recommended that a dialog will update its caller, since dialogs usually allow the users to cancel, it is not wise to change things while the dialog is still open since the user can cancel and you will need to rollback the changes.
Hope that answers your question
|
|
|
|
|
Your first idea to pass a reference to form a when creating form b is what i tried first of all but its not possible to send it as an reference because of this problem:
"Cannot pass '<this>' as a ref or out argument because it is read-only"
Is there anyway to get around this?
Anohter way to just pass the items that form b needs from form a would be a very ugly and bad solution since whats updated involves ~100 components and id rather not try to group them all together into one object and pass if possible.
"In most cases, it is not wise to create coupling between forms. And it is also not recommended that a dialog will update its caller, since dialogs usually allow the users to cancel"
In most cases, yes, i agree, but this is special.
Let me explain this a bit further.
Form A contains a "sheet" loaded from a database and the information is shown in textboxes. Form B is a search function which searches through the whole database after the users search parameter/criteria and displays a list of all found matches. When you click an item in the list the main view should load this automatically and form B should leave itself open so that the user can browse the next result without having to open form b again and do the same search over and over.
|
|
|
|
|
If you specify the parameter as ref, you pass a reference to the reference. Just pass the reference without ref.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks alot!
That did the trick.
|
|
|
|
|
Hi All!
I have installed an assembly (say A1.dll) in the GAC. A1.dll has a dependancy A2.dll. A2.dll has also been installed in the GAC. A2.dll in turn has a dependancy A3.dll. A3.dll has also been installed in the GAC. Now, I need to use A1.dll in a windows application. I add a reference to A1.dll (Copy Local = false). The application builds without errors. Now, when I run the application, the runtime locates A1.dll and A2.dll from the GAC successfully, but fails to locate A3.dll and a FileNotFound Exception is thrown. I wonder why the assembly is not being located by the runtime when it has been installed in the GAC. I havent touched any configuration file which could have overriden the version reference. Can anyone help me find a clue to this problem?
Regards!!!
|
|
|
|
|
I'm using THE api(SendMessage or PostMessage) to send a custom message between 2 C# exe's. The called exe is subclassed to listen to the custom message. In the calling exe, I'm trying to pass a string in the 4th parameter. At this stage the 2nd exe is already running. The api call keeps crashing the 2nd exe. Can it be done across exe's or only within the same exe, thanks.
help me ,please thanks
contract me :enet2008@hotmail.com
you are welcome to visit my blog
|
|
|
|
|
Using SendMessage API to control external app:
have an external application that I need to be able to control. I've tried using SendKeys but due to the obvious limitations of this function the behavior is erratic. I know you can do this using the SendMessage API ( find the handle of the external application's window ,first ) ,but I'm not sure how to do it.
can you provide the sameple code to me ,please?
you are welcome to visit my blog
|
|
|
|
|
You'd be much better off using Remoting.
You can't send a String in a message like this, only a pointer to where in memory it is. The problem is the memory from one application is not accessible to another without jumping through flaming hoops.
But, here[^] is a thread that seems to have had some success at it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I can do it now
I can use FindWindow,GetWindow and SendMessage to send message to a notepad app,just like this:
hWnd1 = FindWindow(null, "Untitled - Notepad");
hWnd2 = GetWindow(hWnd1, GW_CHILD);
sText =this.textBox1.Text;
SendMessage (hWnd2, WM_SETTEXT,sText.Length, sText);
but I don't know how to excute a word app's dictate by another app,help me please ,thank you!
you are welcome to visit my blog
|
|
|
|
|
I was wondering if there is a way to write to the extended file properties in Wdindows. I know how to read them from a file.
For instance if I wanted to get the Artist's Name in a mp3 file I would use the GetDetailsOf method from the Shell32 object. I would do GetDetailsOf(folderItem,9) to get the value of the artist name.
However there is no "SetDetailsOf(.....)". I want to write a program to set those extended file properties to whatever I please. Is there any way to do this??? There must be a way. Any help would be greatly appreciated.
Thanks,
Matt
|
|
|
|
|
I have an app im developing that accesses a web site (Thanx to Adn Brummer for helping with that part), i new want to access a different area of that web site (that has its own URL), essentially i have a page that lists numerous documents, i want to send a POST to be able to get the properties of a specific document. i have sent the POST (got the commands to send from Fiddler) and i keep getting a "Session Timed Out" message (amongst the HTML code), but this does not happen when i access the site online (via IE).
the following is the command i am sending to access wat i want.
offset=0&resultRowBlockSize=12&matrixColSpan=4&show=thumbnail&targetDocId=31242&displayedDocIds=31242&selectFlags=false&displayedDocIds=31240&selectFlags=false&displayedDocIds=31238&selectFlags=false&displayedDocIds=31236&selectFlags=false&displayedDocIds=31234&selectFlags=false&displayedDocIds=31232&selectFlags=false&displayedDocIds=31230&selectFlags=false&displayedDocIds=31228&selectFlags=false&displayedDocIds=31226&selectFlags=false&displayedDocIds=31224&selectFlags=false&displayedDocIds=31222&selectFlags=false&displayedDocIds=31220&selectFlags=false&orderBy_property=ReceivedDate&orderBy_descendingRequested=true&dummy=
can anyone help me with this (if u need more info, or code snippets, let me know)
|
|
|
|
|
This is probably happening because you are not returning a session cookie that you received from a previous GET. Once you receive a session cookie you must return it with every HTTP GET or POST to that web site. Take a look at the Cookies property in the HTTPRequest class that I'm sure you are using.
|
|
|
|