|
Hi,
A Multiline textbox contains these strings
"Line1
Line2
Line3"
Is there any builtin function to extract text on the basis of line terminator or i need to write my own function to parse it.
Best Regards,
Mushq
Mushtaque Ahmed Nizamani
Software Engineer
Ultimus Pakistan
|
|
|
|
|
Have a look at Textbox.Lines property.
|
|
|
|
|
you can use textbox1.Text.Split function to split the string based on a particular character.
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
Thanks
Best Regards,
Mushq
Mushtaque Ahmed Nizamani
Software Engineer
Ultimus Pakistan
|
|
|
|
|
Hi all,
How does one debug COM dlls? I'm reasonably new to the software application game and as such have not have had much experience with using dlls (COM or otherwise); previously I've been able to debug non-COM dlls by simply enabling 'Debug unmanaged code' in the VS2005 project setttings with no problems. Obviously, I need to make sure that I also have the dll's pdb file in the same folder as the dll. At this stage it's probably wise to point out that my (rather limited) idea of a non-COM dll is one that does not need a separate interop dll; the interface is written into the .NET project.
My limited understanding of interop and dlls has carried me this far; but today I've encountered the need to debug a COM dll (one that does not reside in the same directory as my executable; instead there is an interop dll which presumably handles the communication between the .NET app with the dll). All my previous experience with debugging dlls (above) has not helped a jot, I'm thinking that there's a separate process to have to get through because of the interop dll.
Can anyone help?
cheers!
|
|
|
|
|
Hi can you give me more details regarding the com object .
1.is it registered under thr com+ or with regsvr32 command ??
2.do you have the com dll sources ??
thanks
|
|
|
|
|
Hi,
1. It is registered using regsvr32
2. Yep, I have access to the source code. I'm assuming that helps?
Thanks
|
|
|
|
|
ok
your com dll will be hosted by any process using it, in this case your application.
try the following steps:
1.open the com object source code
2.set break points
3.attach the debuger to your application using (managed and native option in the attach to box).
4.call the com object from your application.
thanks
|
|
|
|
|
I'm sorry, I didn't mention that the COM object is developed using VC 6.0. That (probably) means that it has no concept of managed or native code. I did try this before but it did not work - VC 6.0 did not allow me to set break points when I attach the debugger to a running application.
Any more ideas?
|
|
|
|
|
are you trying to debug the com under vc6.0 ????
|
|
|
|
|
Here's the deal: my main app is developed on VC2005 while the COM dll is developed on VC6.0. I don't care which IDE I use to debug the COM but obviously if I were to want to open up the COM's source code and do a attach to process debug session, it's going to have to be through VC6.0. Correct?
|
|
|
|
|
ok
1.open the com project under vc6.o IDE
2.under the com project settings in the debug tab enter your application executable
3.start the debugger (this will start your application)
when your application will call the com object it will stop at the break point.
this is the way i used to debug com under vc6.0
|
|
|
|
|
That worked for me! Thanks for that
Out of interest, what recourse would I have if I didn't have access to the source code (but do have access to the pdb, debug dlls etc)?
|
|
|
|
|
Hi all,
well let's say I've made a windows application based on a database in SQL Server 2000. As you all may know when we makea connection string we specify the name of the SQL server in that. Now my question is that lets say we want to port that same application to run on another computer with a different server name. In that case, the application can't connect to the database bcz it can't find the server with the previous name.
Is this possible for us to make out application connect with the database that it doesnt 'depend' on the SQL Server name to be connected to it.
For example
the database name we wanna connect is say myDB1
The SQL Server's Name is represented as \\LEOPARD\SQLServer1
Offcourse the application should always access myDb1 but can we make our application in such a way that we dont have to depend on '\\LEOPARD\SQLServer1' part??
I HOPE I got it clear enuff.
Thanks in advance
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
Well you could use a config file, allow the user to select from a list of servers or create some sort of discovery service.
With the config file theres plenty of stuff built in to .Net.
There are articles around on obtaining lists of local servers.
A discovery service would run on a boradcast/multicast address and allow the client to 'discover' where the server is. Sql Server 2000 has this built in (this is how you'd retrive a list of local servers) but you'd probably want your own so you can specify the exact servers rather than all avalible servers.
|
|
|
|
|
Ok I'll look into the config file articles in a moment.
and I think you're talking abt using SqlserverEnumeration for finding out the available servers over the network and locally as well. I've read abt it as well. The thing that's ocnfusing me is that when we're intending the application to become more portable like I was talking abt.. then should we follow the usage of config file right from the start.. if yes then how r we gonna make our typed datasets on it. and If its not the case and we develop the application in the usual fashion i.e with the static connection string then how r we gonna change the settings later on...
Oh well... youre right I think I should try an article first
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
Hello Everyone,
ArrayList arr = new ArrayList();
arr.Add("Manoj");
arr.Add(4);
arr.Add(4.5);
Arraylist is hetergenous so i've taken three datatype values as shown above
But anybody let me know how to print these object's values........
|
|
|
|
|
Hi,
There is no problem for printing your ArrayyList values by following.
ArrayList arr = new ArrayList();
arr.Add("Manoj");
arr.Add(4);
arr.Add(4.5);
for (int i = 0; i < arr.Count; i++)
lblResult.Text += arr[i];
Naresh Patel
|
|
|
|
|
you can use ToString for primitive types like int ,double,string,... but in some cases ToString does not return the data we expect (like classes we define by our self) so in those cases you can override the ToString() method.
foreach(object obj in arr)
Console.WriteLine(obj.ToString());
hope the post would be useful
|
|
|
|
|
In addition to the ToString() method suggested above, you can also use GetType() on any object which returns an object of type Type . This object has all the information you could ever need on what types are inside your arraylist.
|
|
|
|
|
I think you should use an object then add it to your arraylist.
such as You can create an object:
myObject obj =new myObject();
obj.Title="Manoj";
obj.Age=4;
obj.Weight=4.5;
//Add to arraylist
ArrayList arr = new ArrayList();
arr.Add(obj);
//Get from arraylist
for(int i = 0; i < arr.Count; i++)
{
myObject obj = arr[i] as myObject;
Console.Write(obj.Title);
....
}
Hope that help you
vtkiet05
|
|
|
|
|
Thx in advance.....
Could u pls help me how to get the active tab's url in IE7 & Mozilla Firefox by using C#.
|
|
|
|
|
Hi,
I need to add some custom tweaks to the regular windows radio button and check box. Basically, i need to tamper with the colours throughout the different events (roll over, disabled,selected...) and cater for the size of the control as well as the distance between the control and its text. I am inheriting my control from the usual System.Windows.Forms.RadioButtton/CheckBox. Can you please give me a tutorial or example that i can follow to achieve this?
Thanks beforehand.
Yours truly,
Krugger
|
|
|
|
|
You should write your own controls which inherit from the controls you mentioned and extend their functionality. Perhaps you will need to override OnPaint event
|
|
|
|
|
Yes, this is indeed what i need to do. The thing is that i am totally new to Windows controls and do not know how to work this around. Can you plz give me a tutorial or an example i can follow?
Thanks
|
|
|
|