|
Can anyone help me about how to change the height and width of a video inside the wmp activex component?
Im using c#...
i found a property which helps but its a read-only variable; the code goes like this:
wmp.currentMedia.imageSourceHeight = 500;
i just need to change the video size, not the control but only the size of the video inside the control.
Thank You
Souhail J Jabbour
Software Developer
Activemania.com
|
|
|
|
|
Are there any possibilities to change font size in MessageBox ?
I want to make it bigger.
|
|
|
|
|
Here[^] what u want.
regards,
Divyang Mithaiwala
System Engineer & Software Developer
|
|
|
|
|
hi guys!
need some help.
i m deploying a .net application using the .net setup project and also using the installer class to add some custom actions every thing is running fine..
but i want to rollback the setup if a condition does not matches.. for which i m using the
base.rollback(isavedstate) method but it gives an exception
that "savedstate might be corrupted" and then rollback the setup from the catch block..
i m searching for it from a long time but couldnt figured it out. can any one tell me what i m missing..
i wrote the code some what like this:
protected override void OnBeforeInstall(IDictionary savedState)
{
base.OnBeforeInstall (savedState);
try
{
if(DialogResult.No==(MessageBox.Show("This Setup Will restart your Internet Infromation Service Mannager(IIS). Do you want to Continue ? ","Alert",MessageBoxButtons.YesNo,MessageBoxIcon.Hand)))
{
base.Rollback(savedState);
return;
}
}
catch(InstallException iex)
{this.Rollback(savedState);
}
catch(Exception ex)
{this.Rollback(savedState);
}
}
but it gets rollback in the catch block gining the error.
abhinav
abhinav
|
|
|
|
|
Dear friends,
I've a simple winform application with one form. My application loads MS-Word, and makes MS-Word window as a child window of my form.
When i type something in MS-Word window, its parent window (i.e my main form) becomes inactive and its title bar turns grey. It is so, because though MS Word window is a child window of my form, but it runs in a separate process.
Now the problem is that i want to make my main form window Active at a certain time. It only becomes active when i click on it. However, i want to do it programatically. I am calling Form.Activate() for this purpose, but it only causes my taskbar button to be flashed for few seconds. I want to completely activate my main window and having input focus. How can i do so? I also tried Form.BringToFront() and Win32 API SetWindowPos but nothing worked for me.
MSDN says about Form.Activate() as follows:
Activating a form brings it to the front if this is the active application, or it flashes the window caption if this is not the active application.
Obviously, my application is not an active application when focus is inside the MS-Word Window.
Imtiaz
|
|
|
|
|
I too am facing the same dillemma. Curious to know of the answer
|
|
|
|
|
Hi everyone
I have a valid HTMLImgClass element that I retrieved from the web browser component. I need some help converting this element into a Bitmap object. There are no obvious methods in the HTMLImgClass that I could see for converting a Bitmap. Someone during my google suggested using the local path to the file via localhost and loading it that way.
I am looking for any suggestions.
Thanks for your time.
Dave
test
|
|
|
|
|
Doesn't that element contain a path to an image and the browser downloads and renders it ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
The element has an href with the path to the object. In the case Im dealing with it's an object that gets dynamically created on a server. Anyway I got it..
Here it is for anyone ever interested
string href = imgageElement.href;
WebRequest webrq = WebRequest.Create(href);
Bitmap bmp = (Bitmap)Bitmap.FromStream(webrq.GetResponse().GetResponseStream());
Dave
test
|
|
|
|
|
I can't use this way.
The object InternetExplorer.Aplication maintain open your session.
If you use webrequest, this open other session and can't get image of the session of internetexplorer.application.
Saludos,
Luis Alfredo Lozada Portal
Microsoft DCE3
Trujillo - Perú
|
|
|
|
|
I have the same problem that I want to access the graphics of the element already loaded into the page. Alternatively, I just want to get the number of bytes that compose the picture. Is there really no way to access the bytes binary image of the element loaded within the System.Windows.Forms.WebBrowser control?
I understand the solution with getting the address of the image and WebRequest-ing it, but this picture address does return a different picture each time. Yes, I might avoid the problem by loading the picture again but I would not be able to push it to the element, so I would have a different picture on the screen and in my program.
Is there any way to access it from the browser cache?
Thanks.
|
|
|
|
|
Hi, you can access from the cache using
tempDir = Environment.GetFolderPath(Environment.SpecialFolder.InternetCache).ToString();
and simply getting the file from there.
Since it seems to have been some months since you asked this did you find any way to get the image directly from the browser because i am trying to do something similar but the file isnt saved in the cache for me and i cant just make a new request to the src because it returns a different image.
|
|
|
|
|
hi
i have a database in sqlserver2000 and i want to convert it to access 2003 . how to do ??
thanks ..
|
|
|
|
|
If you use things like stored procedures and triggers, they can't be exported to Access.
You can use the export wizard or DTS to export the data to an Access database.
---
b { font-weight: normal; }
|
|
|
|
|
Hi everybody
I'm trying to recreate the tutorial for webbrowser automation that is posted in code project using c# 2005.
this tutorial shows how to get into google, write something in the text area, and than click the search button.
I've wrote this kind of app in c# 2003 many times, but in c# 2005, it seems that I just cannot find a way to click the search button.
can anyone explain how to do that? thanks alot!
|
|
|
|
|
K here is my problem, I have been racking my brain doing other things but cannot come up qith a way to make a polygon follow a line.
For instance, If I create a line Like this
<br />
Point[] lnePoints = new Point[]{new Point(10, 10), new Point(100, 10),<br />
new Point(100, 70), new Point(300, 70)};<br />
I want to draw a line but I want to Draw a polygon around this line, kind of like a focus shape that surrounds the line, not a rect or square
I started a function to do it but it got waaay to out there and never made it right, any Suggestions.
|
|
|
|
|
|
|
For each line calculate a new line offset the desired distance outwards (I hope you know what direction outwards is, if not I guess it is possible to find out, but I can't remember how - Google it).
For each calculated line, calculate the intersection with each of the neighbouring calculated lines. These are the new points.
There is a catch though - some of the very short lines might no longer be needed. If you after the intersection calculation get a line where the direction between the points are 180 degrees offset from the original line, then throw away this calulated line. This of course means you must recalculate the intersection points of the neighbouring calculated lines as they now intersects each other instead of your line.
Sorry if it is not clear - I did my best in a short time. Oh, and I do in no way claim this algorithm is fastest or easiest way to do this, but it should work.
Alternatively (depending on your needs) you might get away with drawing the outline with a wide pen (twice as wide as you want the focus area to extend) and then filling the polygon with the same color. This will basically draw the sourounding polygon you requested, but if you can use this "drawing" for anything depends on how you use it further on.
|
|
|
|
|
You're going to need to build a path that follows the line in the manner you've described, offsetting your points by a given factor so you draw all around it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thank you for your replys, I pounded it last night and almost got it done, here is what I did in a nutshell. I made two functions, one calcs one offset from the line and one calcs the other offset of the line.
I went through each point in the point array first I check to see which Direction it has come, then I check to see which direction it will be going, then I offset the new point accordingly. Sounds easier than doing it that's for sure. Have some kinks to work out but, In a nutshell I pass each function the point array of the origional line calculating both sets of the offsets, then I combine them together in order by adding each point to another point array the first set in order, then the second set in reverse order, add then to a path object then draw.
|
|
|
|
|
Hi everyone,
I have this small project. It reads from a file and populates a DataGridView. It has been working great when there were only 100 or 200 rows, but now there are 750 and it doesn't work well at all. I'm not sure what I am doing wrong.
When you first enter the page, there is a "SYNC" button. This opens the file, reads from it and populates the datagridview. Well, you can hit SYNC as many times as you want. What I am doing is when you press that button, clear the datagridview, and then re-populate it. I have tried DataGridView1.Rows.Clear(), and I have also tried ForEach loops that run a Rows.Remove() and Rows.RemoveAt() with no luck. I have 751 rows in there, and I have a message box pop up before it begins the Rows.RemoveAt() routine, then another message box that pops up after the foreach loop. It is taking like 30 seconds (I'm on a very very fast machine) to do this, and 98% of my system resources go to it. I'm not sure if it is trying to sort, or redraw or do something each time it deletes a row out of there or what. When the Rows.RemoteAt() routine finishes it has done what needed to be done (cleared out the datagridview completely), but it just takes way too long. I'm not sure exactly what it is that I can do to speed this up?? Any help would be extremely appreciated.
|
|
|
|
|
I need to create a form to act as InputBox like in VB6.
When I write, string temp = InputBox.Show(); it displays the form where I need to insert some text and click ok so that temp variable is set to text entered in InputBoxes text field.
I want to design each of my InputBoxes from the forms I added to my Project.
How can I make this kind of form?
|
|
|
|
|
Make the form of type dialog. Then when you show the form use ShowDialog instead of Show. You can then check the DialogResult to see what action the user returned. Create the form any way you want.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
Thanks, that helped a lot.
Becouse I don't want to create an instance outside the InputBox, I've created a method inside the form.
public static string InputBox()<br />
{<br />
string tmp = "-1";<br />
frmReason reason = new frmReason();<br />
reason.ShowDialog();<br />
<br />
if (reason.DialogResult == DialogResult.OK)<br />
{<br />
tmp = txtReason.Text;<br />
}<br />
<br />
return tmp;<br />
}
This way I just need to call InputBox method: MessageBox.Show(frmReason.InputBox()); and I will get a form, write any text, and after clicking on ok (or enter) MessageBox will Show that text.
Thank you Ennis, very much.
|
|
|
|