|
I have metod
private void axWebBrowser1_NewWindow2(object sender, AxSHDocVw.DWebBrowserEvents2_NewWindow2Event e){
}
Help me please.
|
|
|
|
|
What is it that you want help with?
---
b { font-weight: normal; }
|
|
|
|
|
Hello,
I search a DataGridViewColumn which has the possibility to select a few Items (with Checkbox). It should be also possible to bind data to that control.
Knows anyone a control for Net2.0
Regards
Hansjörg
|
|
|
|
|
How can we access SSAS cube data in a datagrid? If it is using adomd, can anyone please give the code.
Is there any .NET client application which will provide the same view as cube browser in SSAS cube project?
|
|
|
|
|
hi
i want to draw a shape (for example : line) in my form but i can't get result and nothing occured in my form and my code is :
private void Form1_Load(object sender, System.EventArgs e)
{
Graphics g = pe.Graphics;
Pen mypen = new Pen(System.Drawing.Color.Violet,2);
g.DrawLine(mypen,35,35,150,100);
}
and when i override OnPaint event of my form it is done and line create in my form.
my problem is that i can draw a shape only in OnPaint event and not i other events (for example : Form1_Load )
how to do that and how to draw shapes in picturebox..
please explain fully because i am beginner and i don't anything in web that explain fully.
thanks
|
|
|
|
|
This is what i have written in the click event of a button
Graphics g = pictureBox1.CreateGraphics();
Pen pe = new Pen(Color.Red,3);
g.DrawRectangle(pe,10,10,20,30);
This draws a rectangle on the pictureBox with the specified size.
Hope that is helpful
Regards,
Pramod
|
|
|
|
|
thanks you solved my problem
many thanks
|
|
|
|
|
Be careful when following the advise above, that's not really a clean solution!
First of all, you'll have to dispose of every Graphics object you create, otherwise you'll get a resource leak that can be very hard to debug.
Then the answer depends on what you want to do.
Do you want to draw into a Bitmap that's displayed in a PictureBox or do you want to show an Image in a PictureBox and draw something on this PictureBox (something like an overlay)?
In the first case, you'll have to use Graphics.FromImage() to get the Graphics object to draw on the Bitmap (don't forget to call Dispose() afterwards, or use the using() statement).
In the second case, the Paint event of the PictureBox is the only correct place to perform your painting. Everything else will be lost when the PictureBox is hidden (partially or full) and repainted.
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Hi there fellow programmers!
I have a datagridview with say 20 rows, and I know that only ONE of them has a certain value in one of its cells. What I want to do is displaying this one row in top of the others, so it shows itself first.
There is no way i can set it first via sorting, and the FirstDisplayedScrollingRowIndex property doesnt seem to work unless Im doing something wrong - I'm setting in there the index of the row.
Any ideas? Thanks in advance
|
|
|
|
|
Hi
i been awak for two nights i can't see anything infront of me
BUT i must complete this
int [,,] myArray = new int [,,] {{1,2,3}};
it gives me the error
Incorrectly structured array initializer
WHY
--------------------------
If you found my answer to your question useful; then vote for me.
------------------------
Ahmad Shaban
|
|
|
|
|
|
Hi Stefan Troschütz
Thank you i found the error
object [,,] myArray;
myArray = new object [,,] { { {"@EngCode"},{SqlDbType.Int},{TxtCode.Text} } };
---------------------------------
I Have a stroed procedure that take 13 parameter
CREATE PROCEDURE dbo.CreateUser
(
@EngCode int,
@EngFName nvarchar(20),
@EngMName nvarchar(20),
@EngGName nvarchar(20),
@EngLName nvarchar(20),
@EngNotes nvarchar(500) ,
@EngineeerTypeID int,
@UserName nvarchar(10),
@EngMail nvarchar(50),
@EngCellNo int,
@EngHNo int,
@UserPassword nvarchar(12),
@UserNotes nvarchar(500)
)
I call this proc from my C# sO
SqlParameter POne = new SqlParameter();
POne.ParameterName = "@ParaName";
POne.Value = MyText.Text;
POne.SqlDbType = SqlDbType.NVarChar;
MyCommand.Parameters.Add ( Pone );
i will repeat this operation 13 time But
if i had a Multidimensional array
myArray = new object [,,] { { {"@EngCode"},{SqlDbType.Int},{TxtCode.Text} } };
and have a foreach to loop; it would be then a better idea
--------------------------
If you found my answer to your question useful; then vote for me.
------------------------
Ahmad Shaban
|
|
|
|
|
You can write those five lines of code in a single line:
MyCommand.Parameters.Add(new SqlParameter("@ParaName", SqlDbType.NVarChar)).Value = MyText.Text;
Notice that the Add method returns a reference to the parameter, so that you can set the value property.
---
b { font-weight: normal; }
|
|
|
|
|
Hi
Thank you very much
But we should put it that way
MyCommand.Parameters.Add(new SqlParameter("@ParaName", SqlDbType.NVarChar).Value = MyText.Text );
Thank You again
--------------------------
If you found my answer to your question useful; then vote for me.
------------------------
Ahmad Shaban
|
|
|
|
|
No, that doesn't work. The value of the operation or assigning the string to the Value property, is the string. The result is that you will be throwing the SqlParameter object away and adding the string to the parameter collection instead.
Use the method that I showed, or this even shorter one:
MyCommand.Parameters.Add("@ParaName", SqlDbType.NVarChar).Value = MyText.Text;
---
b { font-weight: normal; }
|
|
|
|
|
hi,
How can I import the data froma .csv file in SQl server database by DTS package in Dot Net C#.
Thank in advance
|
|
|
|
|
If i do that:
Image img_1 = new Bitmap(200, 200);
Image img_2;
img_2 = img_1;
now there are two different objects in the memory so if i do:
img_2 = null;
then
img_1 = 200x200 bitmap
or that is the same object so:
img_2 = null
then
img_1 = null too?
|
|
|
|
|
img_1 and img_2 are both refferenes to the object, and not the object itself.
If you do this:
Image img_1 = new Bitmap(200, 200);
Image img_2;
img_2 = img_1;
Then apply some manipulation to img_1, these changes will also reflect in img_2.
If you do this:
img_2 = null
Then it now points to nothing, but img_1 is still the value it once was (200x200 bmp).
And this:
img_2 = img_1
img_2 = new Bitmap(50,50)
img_1 will be the origional 200x200 bitmap, while img_2 will be the new 50x50 bitmap.
hope that helps
Tris
-- modified at 5:01 Tuesday 28th March, 2006
|
|
|
|
|
|
I've been experimenting with remoting, and have got it fairly well figured out.
I'd like to play with app domains now, but have a few questions -
1) Firstly, when creating a program we have a "MAIN" method that takes a number of string arguments. Am i right in assuming that these are the "/w" "/r" "/filename" etc tags that we can specify as command line parameters after the .exe name in a given shortcut?
2) When an app domain is created, it will run and behave exactly as one would expect an application to behave. It will be started on a new system thread, and run until a set of conditions cause it to exit. I.e If we create a new AppDomain that is a windows forms App, it will look and behave like a windows forms app.
3) If the above are both right, it should be possible to write an app that will, on creation, take a number of arguments, and connect to a remote object (In this case the Application that created the new AppDomain).
What i would need to do is forward the remoting host destails in the apps main method but i don't know how to set them when creating an app domain.
Can anyone help me with this?
Cheers
Tris
-- modified at 4:40 Tuesday 28th March, 2006
|
|
|
|
|
I am using Windows 2003 server, when W3wp.exe dialog box appears it stops the some services, after clicking on OK button it works fine. Can anyone knows how to create a service which close the w3wp.exe dialogbox automatically, or else(any other soloution).
Know Yourself Than Grow yourself.
|
|
|
|
|
A better solution would be to figure out whats causing the dialog to pop up in the first place and fixing that.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How can I close /kill an error message dialog appearing on the desktop automatically e.g. if a service crashes I want to close its error message.
Know Yourself Then Grow Yourself.
|
|
|
|
|
First, your putting alot of effort into putting a band-aid on the real problem.
What's causing the service to crash?? Fix the problem, instead of wasting the time building an automated way of ignoring it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dear, Dear and Dear if i am using a product and i have no source code, then i want same kind of solution.
Know Yourself Then Grow Yourself.
|
|
|
|