|
Michel Prévost wrote: A good started could be string[] logFields = logLine.Split(',');
this is what i have showing in a text box...
how will your line fit here...
private void btnOpenFile_Click(object sender, EventArgs e)
{
OpenFileDialog dlg = new OpenFileDialog();
dlg.Title = "Open File";
dlg.InitialDirectory = @"c:\";
dlg.Filter = "Text Files (*.txt) | *.txt |Log Files (*.log) | *.log | All Files (*.*) | *.*";
if (dlg.ShowDialog() == DialogResult.OK)
{
StreamReader sr = File.OpenText(dlg.FileName);
string s = sr.ReadLine();
StringBuilder sb = new StringBuilder();
while (s != null)
{
sb.Append(s);
s = sr.ReadLine();
}
sr.Close();
txtContent.Text = sb.ToString();
}
The Devil Lives in all of us, It's up to you to let HIM/HER out!!!!!
|
|
|
|
|
Hi.I need to enter a list of coefficients divided by semicolon in a textbox and convert this list to an array of doubles.Anybody has any idea how this can be done?
Best regards
|
|
|
|
|
string stringList = "2.1;3.4;0.9;-0.124";
string[] splitted = stringList.Split(';');
double[] doubleList = new double[splitted.Length];
for (int i = 0; i < splitted.Length; i++)
doubleList[i] = Convert.ToDouble(splitted[i]);
Some errorhandling should also be added.
|
|
|
|
|
Hi
I have a problem that realy brings me down. I'm using the Microsoft.Ink SDK in a usercontrol project. Here i implement some functions and push the .dll file in an object tag to a asp.net site. In javascript i call the inner functions of the .dll and get a 64BitString that i save in a hidden field on the asp.net Site.
From the 64BitString i create an .gif Image and save this file in the filesystem. I need the .gif in 300 x 300 px but the file that i got have the dimensions of the ink. When i draw just a point of 2 x 2 px the .gif file got the same size.
How can i get a .gif file that got the exactly dimensions of the box i'm painting in?
My Control where i can paint something got the size of 300 x 300 px. I need exactly that as gif file.
Please help..
Best Regards
|
|
|
|
|
Hi there.
Many of you will be familiar with Outlook 2003.
I like how it looks and it made me think how does one do something similar to that. For instance on the lower left we have something (I don´t know what it is called but it is similar to TabPage) that can be pressed, Mail, Calendar, Contacts and Tasks. When one presses these a window to the right opens. How does one do this? What are the tabs/something called on the lower left?
Any information is greatly valued.
Thanks,
FJ
|
|
|
|
|
There are two Outlook Bar implementations here on CodeProject but both aren't on 2003 visual standards. You can find them here[^] and here[^].
Other than those you could buy something. There are many different commercial UI components on the market. Ask Google for Infragestics, Syncfusion, Developer Express...
|
|
|
|
|
Thanks a lot for your help. Have a nice day
FJ
|
|
|
|
|
Hello naglbitur,
If you are looking for a control suite that will make implementing an Outlook 2003 look and feel easy, please take a look at ComponentOne's Menus and ToolBars for .NET. It has an outlook style toolbar, standard toolbar, tab page, context menu, and a docking component that allows you to make any of them dock and float. You can also host other controls in the docking component. For more information, please click Here[^].
Suelinda W
Customer Engagement, ComponentOne LLC
|
|
|
|
|
hi all,
i had created a windows service and added a projectinstaller .then in the afterinstall event i am trying to start it using serviceController it installs succesfully but it is not started and i get the following exception
:System.InvalidOperationException: Cannot start service Service1 on computer '.'. ---> System.ComponentModel.Win32Exception: The service cannot be started, either because it is disabled or because it has no enabled devices associated with it
--- End of inner exception stack trace ---
at System.ServiceProcess.ServiceController.Start(String[] args)
at System.ServiceProcess.ServiceController.Start()
at TestWindowsService.ProjectInstaller.serviceInstaller1_AfterUninstall(Object sender, InstallEventArgs e)
and now if unsinstall it starts it seems afterinstall event is called in both after install and after uninstall.how can i make this service self starting i hadn't added any extra code(except in the afterinstallevent) in the windows service.
ServiceController sc = new ServiceController("Service1");
sc.Start();
sc.Close();
i am using the windows service template.
thanks in advance.
Rakesh
|
|
|
|
|
Have you checked whether the service starts up correctly when doing it manually via control panel?
|
|
|
|
|
Hi robert,
yes, i checked and it was starting perfectly.after being installed with installutil.any idea what is causing the problem.thanks in Advance.
Rakesh
|
|
|
|
|
I made a user control class and added a property called "KeyboardColor" of type string to it. Currently the choices are black and white and the class will handle both, and if something else was entered post a message back saying black and white are acceptable values, then default to white.
The property can be set design time from the control's property tab, or run time with the usual control.property = "value" method.
Is there a way to make the property appear as an LOV in the property tab and/or the intellisense?
|
|
|
|
|
Change the type of the property from string to something different.
If you really want only black and white then define an enum like this
public enum BOW {
Black,
White
}
Then set the return type of the property to BOW.
If you want to support all possible colors you could also set the type of the control to Color. This way the designer would show the same color picker gui as with the default ones (ForeColor/BackColor).
|
|
|
|
|
Thanks a lot!
Took a little time to figure out how to use an enum, but it works great.
|
|
|
|
|
Hello!
When disabling a treeview control, its background isn't set to gray automatically (in contrast to the listview control).
I want to set the color myself now (using the BackColor property of the treeview), but I don't know the color value of the "disabled" color. Any idea where to get it from?
I of course don't want to hardcode the value, it should be dependent on the current system colors...
Best regards
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
I'm not sure but shouldn't this simply be SystemColors.Control?
|
|
|
|
|
Hello, may be some of you could help me. I have a winform with FormBorderStyle asigned to None (I need it in that way), and an AXWebBrowser with Dock asigned to Fill. My problem is that the MouseEnter event for the winform only work if I have a part of it visible, but in this case I must have the webbroser filling all the winform, so the event MouseEnter never work. And the webbrowser doen't have a MouseEnter event, so I can't call that event too. I need the event for enter and leaving.
I try:
((Control)this.browser).MouseEnter += new System.EventHandler(this.AlertWindow_MouseEnter);
But doesn't work !!!
Can any of your give an example of how can I implement my own mouse enter event jobs?
Any ideas??
Thanks a lot.
|
|
|
|
|
how can i move pictureboxes on the screen vertically from bottom to top??
Sumeyra
|
|
|
|
|
hi there.
i have a project to be submited in the 20th of may.
i read many articles in this site they was good espacialy those about objectARX but for those how used AutoCAD before.
my project is small but need who knows to use these tools.
I am a new user to .net and AutoCAD 2006. I had a project that is required:
1. some 3D plans.
2. objects that are located in the plans should be linked to the databases.
3.it should run some codes if i clicked those objects and do some changes on them such as changing there colors.
4. view the plan through .net forms and deal with the objects through the viewers in the forms.
Those are the most important requirement in my project. Does AutoCAD help me to do this project????
Please help..
And thanks alot.
-- modified at 8:26 Thursday 30th March, 2006
|
|
|
|
|
I don't see the connection between .NET and AutoCAD...
--------------------------------------------------------
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
thanks for your replay.
but if you had read some of the articles that are uploaded to this site you will notice that there are a connection between them.
especially with autocad 2006
-- modified at 3:16 Friday 31st March, 2006
|
|
|
|
|
Hi!
I've got a problem (obviously)...
Here's the thing I wanna do:
I have a directory with a lot of images (from 10 up to about 1000).
All I want is, to see the thumbnails of the pictures and, in case of a double-click, open it.
Thats it...
Shouldn't be that hard - or so I thought.
.NET doesn't have any control that can do it; at least I didn't find anything appropriate.
I tried to implement an IE browser and set the URL to "C:/example/pictures".
It works fine, but I don't see the thumbnails - just the filenames.
I can change the View to thumbnails manually, but that's not what I want.
As soon as I set a directory, it should show the thumbnails.
Is there a way to tell the browser he should show me the thumbs and not the detailed list?
I also looked for custom controls which are able to show thumbnails.
I found three kinds of websites.
There are the sites which have awesome looking controls (altough I don't know about the performance), but you have to pay for them.
Then there are the custom control tutorials, but I didn't find anything helpful.
At last (but not least), there are some free controls, but they aren't capable to do the thing i need to.
And now I'm out of ideas...
Do you guys have helpful tutorials, hints, links or ideas about how to solve this problem?
Thanks!!
katatonius
|
|
|
|
|
|
Hi!
Thanks for the help!
I tried to implement it, but it seems harder than I thought.
Also, the demo-project uses over 100MB of memory if I add about 500 small pictures.
Isn't there a way to just change the "View" (I think it's called view, as I work with the german version) of a webbrowser-control to Thumbnails???
Thanks,
Manfred
|
|
|
|
|
Hello...
I'm working on a project that requires encrypting some files and deliver them to users that uses an application that I developed to decrypt them, read them and then when the user exits the application those decrypted files are deleted.
The problem here is that the application that decrypts data stores the decrypted files on the user's hard disk... if the users figures out the path of the decrypted files he can copy them and I don't want him to do that
The Question is:
Is there any way to do that decryption process without storing the decrypted files on user's hard disk?!!
Thanks in advance.
|
|
|
|