|
Glad to have helped
If you have anymore questions, we, and especially I, will be glad to help.
Check back in a week or so and see if I posted the article by then, then you can compare notes
Best of luck with your assignment.
If the post was helpful, please vote, eh!
Current activities:
Book: Devils by Fyodor Dostoyevsky
Project: Hospital Automation, final stage
Learning: Image analysis, LINQ
Now and forever, defiant to the end.
What is Multiple Sclerosis[ ^]?
|
|
|
|
|
Hi everyone.
This is probably something I should be able to figure out by myself, but I'm not having much luck so I figured I'd ask.
The issue: I'm translating a system from java to C# and they use a java framework[^] that I'd really like to use, since it takes care of the most complex parts of the system, which I would otherwise have to implement myself. I have the source code of this framework.
I know there are several possibilities for using java libraries in C# (although I'm not familiar with any of them, so I'd appreciate suggestions). So far I've thought of using IKVM.NET[^] to generate a .dll, but I'm not sure what to do next, because in java in order to run the framework with your code you're supposed to use the option -javaagent[^] by adding
-javaagent:bin/deuceAgent.jar (where deuceAgent is the framework) to your java command line. I don't know what the equivalent in C# would be once I have my .dll, or whether there's an equivalent at all.
Any help? Thanks so much.
|
|
|
|
|
Hi all,
can anybody help me out here by providing me a solution.
I want to set a focus to masked TextBox control displayed over a cell in CellBeginEdit event.
MaskedTextbox.focus() is not working here
can anybody help me out ???
|
|
|
|
|
Do it using gridviews findcontrol method.
|
|
|
|
|
I have already tried that but no success
Control[] ctrl = datagridview.Controls.Find("name of textbox", true);
ctrl[0].Focus();
|
|
|
|
|
Try it like this.
MaskTextBox mt=datagridview.row[0].FindControl("nameof textbox")
mt.setFouus().
Hope this works.
|
|
|
|
|
there is no funciton like FindControl for datagridview
and there's no function like setFocus() for maskedtextbox
so r u serious in giving this solution?
|
|
|
|
|
sorry for the late reply. But i just did the same.
t1 = GridView1.Rows(0).FindControl("InstallmentDec")
t1.Text = dt.Rows(0)(12).ToString()
Its working for me.
Here use Foucus function in place of setting text will work fine.
|
|
|
|
|
Hi,
there is a stored procedure in Oracle that has a output parameter of type table of records.
What OracleType to use in C# to retrieve it?
Regards,
Adrian
|
|
|
|
|
|
|
|
In addition to SaMartens answer, if you are using .NET 3.5, you can use XDocument.Parse
|
|
|
|
|
i have created a CSV file with following format
"Test1";"Test2";"Test3"
when i tried to read that csv in Notepad using C#.net i am getiing with following format
"""Test1"";""Test2"";""Test3""" is there any way to resolve this
|
|
|
|
|
Hi,
what do you mean by "read that csv in Notepad using C#"? Maybe you could post the piece of code doing this?
Regards
Sebastian
|
|
|
|
|
Hi, according to the output, i think, the standard seperator in your system should be ',' not ';'.
|
|
|
|
|
If you are looking at the value in the debugger, you will see that sort of thing(though usually with backslashes (\)), but it's just the display format, nothing to worry about.
How did you create file? How are you reading it?
|
|
|
|
|
Hi,
I had window Form application in which some text is entered in TextBox and On a button Click, the text in the textbox should be copied through clipboard and those text has to be pasted on other window which has been opened.
I have copied the text through
if(String.IsEmptyORNull(TextBox1.Text))
string CopiedText = ClipBoard.SetText(TextBox1.Text);
i.e., For example, If I want to paste the copied text in the internet explorer in which http;//www.google.com/ is opened, I have to paste that copied text in the searchbox of google site opened in internet explorer.
I have tried to Find the handle through
IntPtr IEHwnd = FindWindow("IEFrame", Null);
and there after
If(IEHwnd != IntPtr.Zero)
{
MessageBox.Show("Handle Found");
SendMessage(IEHwnd, WM_PASTE,0,0);
}
But This is also doesn't effect?
How to approach?
|
|
|
|
|
Does this[^] article help?
/ravi
|
|
|
|
|
Hello,
I am having an enumerator problem while making a custom panel user control. The control extends the System.Windows.Forms.Panel with properties to allow a user to draw a background gradients and rounded border edges.
I use a bit wise enumerator to control which rounded corners are drawn on the border. This all works fine until i make a public property that is accessible in the visual studio designer. The designer will display the default setting when the control is added to a form, but when you change the value of the property it crashes visual studio.
---
The enum...
public enum RectangleCorners
{
None = 0,
TopLeft = 1, TopRight = 2, BottomLeft = 4, BottomRight = 8,
All = TopLeft | TopRight | BottomLeft | BottomRight
}
---
the implementation...
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
namespace Ez_Backup.UserControls
{
public class Panel : System.Windows.Forms.Panel
{
private RoundedRectangle.RectangleCorners pRoundedBorderCorners;
public RoundedRectangle.RectangleCorners RoundedBorderCorners
{
get
{
return pRoundedBorderCorners;
}
set
{
RoundedBorderCorners = value;
base.Refresh();
}
}
}
}
I believe i possibly may be required to add some type of designer attribute. After an hour of google action I am here.
Please help me.
Thanks
|
|
|
|
|
First thing that jumped right(not left ) into my eyes was the lack of the Flags atributte.
You must use it if you want to create combination(s) of the Enums wich you are doing by using the bitwise or (|) operator.
Something like this:
[Flags]
enum Days
{
None = 0x0,
Sunday = 0x1,
Monday = 0x2,
Tuesday = 0x4,
Wednesday = 0x8,
Thursday = 0x10,
Friday = 0x20,
Saturday = 0x40
}
|
|
|
|
|
Hello Moshu,
I have made the following changes.
[Flags]
public enum RectangleCorners : int
{
None = 0x0,
TopLeft = 0x1, TopRight = 0x2, BottomLeft = 0x4, BottomRight = 0x8,
All = TopLeft | TopRight | BottomLeft | BottomRight
}
This is still causing Visual Studio to crash. =[
|
|
|
|
|
MDL=>Moshu wrote: You must use it if you want to create combination
That is not true.
|
|
|
|
|
true. My Bad or my bad expresion.
But it helps. No need to decode and create a human representaion :
using System;
class FlagsAttributeDemo
{
enum SingleHue : short
{
Black = 0,
Red = 1,
Green = 2,
Blue = 4
};
[FlagsAttribute]
enum MultiHue : short
{
Black = 0,
Red = 1,
Green = 2,
Blue = 4
};
static void Main( )
{
Console.WriteLine(
"This example of the FlagsAttribute attribute \n" +
"generates the following output." );
Console.WriteLine(
"\nAll possible combinations of values of an \n" +
"Enum without FlagsAttribute:\n" );
for( int val = 0; val <= 8; val++ )
Console.WriteLine( "{0,3} - {1}",
val, ( (SingleHue)val ).ToString( ) );
Console.WriteLine(
"\nAll possible combinations of values of an \n" +
"Enum with FlagsAttribute:\n" );
for( int val = 0; val <= 8; val++ )
Console.WriteLine( "{0,3} - {1}",
val, ( (MultiHue)val ).ToString( ) );
}
}
|
|
|
|
|