|
i have a program, that scan files in a directory .
i need to know, if is the file open or in edit mode, or if it Changes the size.
Is there any way to do that, any method like IsOpen?
|
|
|
|
|
I think you could simulate it. Try to open it, if it works, then it isn't open otherwise it's close.
Niklas Ulvinge aka IDK
|
|
|
|
|
Did anyone has seen a C program that fixes JPEG header files? I've saw it before and unfortunately haven't had time to copy it down. I would love to compile it and run it. Any tips in tracking position before pointer and after pointer would also help, I've always thought it was *+1 or *-1 Thanks!
|
|
|
|
|
Say that i want to get the text that is found on a specific line of the text box... (say line 5). How do i do that? Pls help.. thx
|
|
|
|
|
|
|
Hey, thx everybody
|
|
|
|
|
I have a small area on a windows form that, based on user input, should have different controls displayed. The way I'm thinking to do it is to just overlap all the controls in design, and then change the .visible property of individual controls as needed. Ugly. Is there a better way to do this?
I don't want to use tabs, since the space is small and I don't want the other tabs visible.
Thanks -mutty
|
|
|
|
|
Use panels. Put all controls belonging to a "tab" inside a panel of their own. Overlap the panels, and show the panel that should be visible. Hiding a panel automatically hides all controls inside of it.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Thank you, this works very well.
-mutty
|
|
|
|
|
I’m running an external process using “System.Diagnostics.ProcessStartInfo” and have encountered and interesting problem. When I compile and run the debug version it works fine, but when I compile and run the release version it fails. Anybody encounter this problem before?
Thanks
Dave
dhmnet.com
|
|
|
|
|
Nope. "Fails" is a pretty generic description of the problem. So, what exception does it throw?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
The interesting thing is the application does not throw an exception; it is Windows complaining that a dll is not registered when the external application is being run. The error reads like the following:
"MMC failed to initialize because it was installed incorrectly or because a portion of the registry has been corrupted."
The program I'm actually running is Device Manager (devmgmt.msc). It's like when I run the release version I'm not getting the Windows evironment or something.
Dave
dhmnet.com
|
|
|
|
|
Very strange. I can't find anything on the problem.
This only happens when the app is compiled Debug?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'd like to get and set the left property in a css in my code behind file.
Style sheet:
#lblLabel
{ top:100px;
width:100px;
}
Code behind file (c#)
protected override CreateChildControls()
{ // Add the opening html ...
// Add the Label
string sLeft = 0;
Label lblLabel = new Label();
lblLabel.ID = "lblLabel";
lblLabel.Text = "Hello";
lblLabel.Style["left"] = "100px"; <=========== works fine
sLeft = lblLabel.Style["left"]; <=========== doesn't work ???
Form.cantrols.Add(lblLabel);
}
If anyone can help me, I'd me very grateful.
Thx
There is someone in my head but it's not me - Pink Floyd
|
|
|
|
|
Standard question #1:
What do you mean by "not working"?
When I try your code, I get the value "100px" in the string sLeft, just as expected. You put the value in the Style collection and read it on the next line. Why shouldn't that work?
---
b { font-weight: normal; }
|
|
|
|
|
// Hi
// I see that my question is not very clear...
// I set the left in the css file.
#lblLabel
{ Left:100px;
...
}
// Now in the code behind.
...
Label lblLabel = new Label();
string sLeft = lblLabel.Style["left"];
...
// now why is sLeft != "100px" ??
// Thank you.
There is someone in my head but it's not me - Pink Floyd
There is someone in my head but it's not me - Pink Floyd
|
|
|
|
|
Because the value for the left style is present in the style sheet, not in the style property of the label. When you set the style on the id of the label, it only inherits the style, it's not copied into the style property of the label.
Furthermore, the css file is loaded by the browser, not the server. The server does not even know that there is a style added to the id.
---
b { font-weight: normal; }
|
|
|
|
|
Oh, I see.
I'm very new to ASP.NET (2 months to be precise), so I bought
ASP.NET Unleashed. Very good book.
But what would be the best way to place controls dynamically at a specific position then?
Thanks for the help.
I appreciate it very much.
There is someone in my head but it's not me - Pink Floyd
|
|
|
|
|
Unless you need any specific functionality provided by the Label class, I think that you are better off using the HtmlControls instead of WebControls for this. That way you know exactly how they will be rendered, regardless of the browser.
Use a regular div tag with runat="server", this will become a HtmlGenericControl in the server code. You need to specify css for position:absolute and set left and top to position the element. Preferably also width and height. The css properties can either be set in a class in the style sheet or adding them to the Style collection.
---
b { font-weight: normal; }
|
|
|
|
|
Hi
// I see that my question is not very clear...
// I set the left in the css file.
#lblLabel
{ Left:100px;
...
}
// Now in the code behind.
...
Label lblLabel = new Label();
string sLeft = lblLabel.Style["left"];
...
// now why is sLeft != "100px" ??
// Thank you.
There is someone in my head but it's not me - Pink Floyd
|
|
|
|
|
Hello,
Is there a way to see the column headers in datagrid at design time (Design Window).
Thank you.
|
|
|
|
|
Drag DataSet from the toolbar into the designer. Create DataTable and DataColumn etc using the PropertySheet. Drag a DataGrid Set the DataSource of the Grid to the DataSet and you will see the columns in the designer.
Live Life King Size
Alomgir Miah
|
|
|
|
|
Thank you.
By the way, do you know how to format the decimal output to only 4 decimal points?
If I have:
decimal totalArea = (NetRes * DevRes);
how do I format totalArea to have 4 decimal points?
Thank you.
|
|
|
|
|
I think I had posted this earlier to your similar question
Anyway never mind.
// Create a NumberFormatInfo object and set several of its
// properties that apply to numbers.
NumberFormatInfo provider = new NumberFormatInfo( );
string formatter = "{0,22} {1}";
// These properties will affect the conversion.
provider.NegativeSign = "minus ";
provider.NumberDecimalSeparator = " point ";
// These properties will not be applied.
provider.NumberDecimalDigits = 4;
provider.NumberGroupSeparator = ".";
provider.NumberGroupSizes = new int[ ] { 3 };
Convert.ToString( ObjDouble, provider ) );
Live Life King Size
Alomgir Miah
|
|
|
|