|
I did this too.
Assuming that your browser control is named webBrowser1, use
webBrowser.Document.InvokeScript() method
It takes two parameters: the name of the JavaScript function and an array of objects representing it's parameters.
|
|
|
|
|
ComboBox control has got selectedindexchanged event. As the name suggest this event should fire when selected item change for the combobox. But this event fires even when the currently selected item is selected again from the dropdown list of combobox.
e.g.
if I have loaded following items in my combobox say
item1
item2
item3
item4
with item1 as selected when my application starts.
Now if from UI, I again select the "item1" (which is already selected in combo box) then also the selectedindexchanged event fires. In this case the index has not changed still the selectedindexchanged event fires. I find this bit strange.
Is there anyway to findout when the selected item has changed by User. I want some kind of notification when user indeed changes the combobox selected item (not when combobox.selecteditem is set through code)?
regards
KC
|
|
|
|
|
Hi All,
I have created a class which holds a method for impersonating a user and starting a process using the impersonated login.
I'm having a windows application wherein i start a process from my windows login say Process1 and another process using the impersonation method say Process2 (i'm calling notepad.exe in both logins).
When i'm copying a word from the notepad under Process1 and pasting it in the notepad under Process2, it should not get pasted. But instead it gets pasted.
Is there any possiblity that i can restrict the pasting event in the notepad.
Parimala
|
|
|
|
|
I want to make an User Control in VC# that can be used in VC6.
For that I have made a control in C# using 'Windows Control Library', which make dll file; But in VC6 to add a control only OCX files are requird.
So how to make an User Control in VC# that can be used in VC6
|
|
|
|
|
The only way is to create a COM based one. VC6 was written before C# existed, it plainly knows nothing about C#. COM can provide a common interface.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
I have a Windows Form application with a simple GUI that contains a progress bar. Pushing the button 'Start' on my form invokes some other project[ in same solution] classes that carry out a lot of calculations and database access. I want to show the user the progress of the program. The program is actually a loop of database migration that are handled.
My solution contains more the one project.
we have different layer.
Presentation layer.
bussines layer.
My question is: How do I make the progress bar update itself from other layer, when we dont have reference in bussines layer?
Thanks in advance for your help
|
|
|
|
|
If you don't have a reference to the business layer, how are you calling it ? If they are both exes, then the design sucks and you need inter process communication to make it work.
Usually, I'd have a business layer DLL and I'd use a delegate to send progress reports back from a worker thread.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Exception Sample :
static void Main(string[] args) {
try{
Console.WriteLine("Level 1");
try {
Console.WriteLine("Level 2");
goto exit;
}
finally {
Console.WriteLine("Level 2 Finished");
}
}
finally {
Console.WriteLine("Level 1 Finished");
}
exit: ;
}
What is the wrong in this code sample above?
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Are you asking @ sytanx or what.. It will compile successfully.
Jayant D. Kulkarni
Brainbench Certified Software Engineer in C#, ASP.NET, .NET Framework and ADO.NET
|
|
|
|
|
hi kulakarni,
thanks for the response.
actually today i took one pre assessment test in C#. they asked this question.
they gave me 5 options:
What is the console output for the code sample above?
Choice 1
Level 1
Level 2
Level 2 Finished
Level 1 Finished
Choice 2
Level 1
Level 2
Level 1 Finished
Choice 3
Level 1
Level 2
Choice 4
Level 1
Level 2
Level 1 Finished
Level 2 Finished
Choice 5
Level 1
Level 2
Level 2 Finished
which one is the correct out put?
Thanks,
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
It is obvious choice1. Because of the rule that finally block is always executed inspite of any excpetion is occured or not. In this case, inner most try and finally is executed first and then the outer one.
Jayant D. Kulkarni
Brainbench Certified Software Engineer in C#, ASP.NET, .NET Framework and ADO.NET
|
|
|
|
|
oho....thanks Kulakarni.
i know this but when i saw the question, i didn't understand the question first of all........now i came to know the correct answer!
Thanks,
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
The problem is that you are using GOTOs Get over that crutch quickly.
|
|
|
|
|
Hi everyone,
How to get Insert button status?
Thank You.
|
|
|
|
|
Is the following feasible?
I'm looking for a way to develop an application that is developed in dot NET that looks like a desktop application and can be run within a browser the same way a Java applet or an ActiveX application does.
Please advise.
|
|
|
|
|
My msn:
wangpc@msn.com
Welcome everyone!
|
|
|
|
|
I am sorry but I do not think people are here for making friends. Anyways if you have any .NET related questions, you will get answers.
Jayant D. Kulkarni
Brainbench Certified Software Engineer in C#, ASP.NET, .NET Framework and ADO.NET
|
|
|
|
|
THe best place to post this is in the soap-box there you will make more firends.
Go on, move the thread to the soap-box and see how welcoming people there will be,
|
|
|
|
|
The lounge is a good place to meet people. This forum is better for asking programming questions.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
I have one question... How do you get an image to show up on a windows form? I've got that you can use the this.BackgroundImage property of the window, but I want to be able to put it anywhere, like a ControlItem.
---
*** Never give me an answer have anything to do with Visual Studio. I don't have this program, and it'll be that way for a long, long time. ***
Description: A 13 Year Old Programming Wiz
The elementary kids were right! "1" + "1' does = "11"!
|
|
|
|
|
OK I did a little more research and found the PictureBox class. I think this will be all that I need... If there are any more suggestions please let me know.
-----
*** Never give me an answer have anything to do with Visual Studio. I don't have this program, and it'll be that way for a long, long time. ***
Description: A 13 Year Old Programming Wiz
The elementary kids were right! "1" + "1" does = "11"!
|
|
|
|
|
I never use a picture box, I just draw direct on the screen. But, a picture box will work fine.
max29297 wrote: A 13 Year Old Programming Wiz
If I were you, I'd remove that until you've moved along the learning curve a bit. It just doesn't work, yet. I'm sure one day it will
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
well, it's really there because I've really mastered javascript. I've only recently started learning c#
-----
*** Never give me an answer have anything to do with Visual Studio. I don't have this program, and it'll be that way for a long, long time. ***
Description: A 13 Year Old Programming Wiz
The elementary kids were right! "1" + "1" does = "11"!
|
|
|
|
|
I am having a problem printing to a Brother HL-2700CN printer from a C# graphics object.
Every other printer works fine and prints both graphics & text correctly. The Brother printer prints graphics correctly, but the text is just a whole lot of jibberish.
I am using common fonts:
Font headerFont = new Font("Times New Roman", 26, FontStyle.Bold, GraphicsUnit.Pixel);
Font headerInfoFont = new Font("Arial", 16, FontStyle.Bold, GraphicsUnit.Pixel);
Has this got anything to do with the printer driver?
Hope you can help,
Cheers!
|
|
|
|
|
Hi ,
I am wondering if there is anyone who can help me to load just a portion of TIFF image to memory, then I can display that portion to a form .
Thanks
|
|
|
|