|
|
No, I am attempting to paint a grid in the forms OnPaint function but can't find a way of painting on top of the child controls.
|
|
|
|
|
Hi,
I want to be able to view pdf files in Winforms. The easiest way I could think of was to create a webcontrol in my winforms. I knew you could very easely do this in C++, but in C# I didn't find such a control. Looking on MSDN and CP I found things like WebClient and WebControl classes, but I can't figure out how they work, in what control do you view the actual page?
So there would be two possible ways I could think of:
1: Create a WebControl
2: Embed I-Explorer into the application.
Can anyone give me any advise what would be best and to what I should look for?
tnx!
No hurries, no worries.
[EDIT]
I found it, off course it was easy enough .
Choose add user control in the toolbox, under COM component choose Microsoft Web Control.
Add the webcontrol to your from.
That's it.
[/EDIT]
|
|
|
|
|
use axWebBrowser control, it is able to view pdf files and also other MS Office file, it is present on the left side panel,DATA panel or add it.
sample is like this
object empty = System.Reflection.Missing.Value;
webBroswerControl.Navigate("c:\\abc.pdg", ref empty, ref empty, ref empty, ref empty);
i hope it will help u
|
|
|
|
|
tnx! I found it before your answer, it was easy enough when I did find it, you only have to stumble upon it .
No hurries, no worries.
|
|
|
|
|
Hi,
you can use axWebBrowser control and call navigate method.
Thanks and Regards
SGS
|
|
|
|
|
tnx! I found it before your answer, it was easy enough when I did find it, you only have to stumble upon it .
No hurries, no worries.
|
|
|
|
|
Hello C# Professionals,
I really need to help of you..
I have a datagrid on my winform and I would like to open this datagrid as READ-ONLY...and then I would like to enable (write-enabled) a specific row with a button click..
I have written a code to select entire row in the datagrid.Now
----------------------------------------------------
private void grdPhone_CurrentCellChanged(object sender, System.EventArgs e)
{
this.grdPhone.Controls.Clear();
this.grdPhone.Select(this.grdPhone.CurrentCell.RowNumber);
}
-----------------------------------------------------
Now what will I do in the button_click event..??
Please help
|
|
|
|
|
Hello dear buddies,
I have read System.Reflection types that help to dynamically invoke object members are slow and are not suitable for high-performance applications.
My question:
Is the low speed because of the member search that is performed to find the requested member to get respectful 'MemberInfo' object (to invoke it) OR not only the member name search but also the member invokation using 'MemberInfo' object is a slow process itself?
A comparision between speed of direct method call and dynamic method call using 'MethodInfo.Invoke()' really helps me to find my answer too.
Thank you so much for any help and note
- Den
---
"Art happens when you least expect it."
|
|
|
|
|
Hi
iam tryin ro make programe about robot simiulation
please tell me how can i move and rotate objects ?
also i want to use pixels how can i do it?
tanks for your help and regards
|
|
|
|
|
That's a really generic question and way to large to be answered in the forums.
It doesn't sound like you have enough experience in the MANY different fields your going to need to accomplish this. I'd suggest picking up books having to do with DirectX, 3D modeling, and animation.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
is it possible to hide/disable console window at the time of calling some console command/utility from C#,for instance,when i call "DIR" command within C#,it first popsup console window for few seconds and then outputs data in the variable or file,whatever has been chosen
thanks
MyBlogs
http://weblogs.com.pk/kadnan
|
|
|
|
|
There are .NET equivalents you can use for the "dir" command. See System.IO.Directory/DirectoryInfo and System.IO.File/FileInfo.
That still doesn't answer your question though; this works for me with a cmd window:
System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo("cmd");
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
System.Diagnostics.Process.Start( psi );
James
|
|
|
|
|
anyone out there know how to set a C# windows forms application to expire, say, after 3 months?
i'd really appreciated if you could point me in the right direction in trying to find out, thanks!
|
|
|
|
|
The easiest thing to do would be to put this into the constructor of the form:
if( (DateTime.Now - DateTime.Parse("20 February, 2005")).Months >= 3 )
{
throw new Exception("This application has expired");
}
Extending on that just a bit though you can use the License mechanism built into the framework.
[LicenseProvider(typeof(MyLicenseProvider))]
public MyForm : Form
{
License license = null;
public MyForm()
{
try
{
license = LicenseManager.Validate( typeof( MyForm ), this );
}
catch( LicenseException )
{
}
}
} Then code up your own MyLicenseProvider (using the base LicenseProvider class) to somehow know whether it has been 3 months.
All of this could be defeated with some work, but there are tools to help you combat that (Obfuscators, placing some important work along with the licensing procedure in native code).
The best way to stop it is to use a web service or remoting to do some important work and at the same time you can check whether the application has a valid license. This isn't appropriate for most applications though.
James
|
|
|
|
|
Hi,
I am Serializing an Object by using XmlSerializer but when XML file is created it is including the Namespace details like xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" in the Element.
But I dont want that Namespace details in the XML file.
Is there any way to do this.
Thanks for your help in advance.
Zaheer
|
|
|
|
|
|
i'm trying to make programme bout matrix,i have square matrix 4*4, please tell me how to choose first column and second row ([1][2]) of the matrix
pleeeaaaseee help me
thank you
|
|
|
|
|
Try using a multi-dimensional array. For example, for a 4*4 matrix of integers, use the following 2-dimensional array:
int [ , ] myMatrix = new int [4, 4];
To access a particular element of the matrix (say the first row and second column of the matrix, which is the 0,1 element on the 0-based array), do as under:
myMatrix[0, 1] = 5;
int i = myMatrix[0, 1];
|
|
|
|
|
Hi,
Is it possible to open a form in Modal mode to a Form which is Child to another Form.
I have 3 Forms - AppWindow, ChildWindow and DialogWindow. OnClicking a button in the AppWindow(Application), a ChildWindow is shown with AppWindow as its owner. again a DialogWindow is opened from the ChildWindow Form by using ShowDialog method. Now I need this DialogWindow to be Modal only to the ChildWindow which initialized it and not to AppWindow or any other ChildWindow's.
Can anyone tell me how it is done.
Please excuse my english
Thanks & Regards
Thejus
|
|
|
|
|
A modal dialog is likely to be modal to the application. Perhaps you can simulate modal behaviour for the one form, by keeping the DialogWindow as a variable, and checking if it's visible before accepting any input ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Just like Christian suggested, but try disabling the ChildWindow when the DialogWindow is displayed. There's nothing in Windows or .NET that will allow the behaviour you want, you'll have to simulate it.
Actually modal dialog boxes work by disabling the parent window, and then executing another message loop (that's why the call to ShowDialog blocks.)
I would suggest changing your approach, because the problem is that there is only one message loop for the entire application, so, to achieve what you want, you'd need to display the form as modeless, and disable the ChildWindow so it doesn't accept any input while the DialogWindow is displayed. That might work, but still I don't know how intuitive that would be to your users, since I don't remember any other application in Windows working that way.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
I agree with you. ShowDialog blocks the messageloop until processing of the dialog is complete. but, the ShowDialog method also has a parameter overload to set the parent, cant this be of any help to achieve the behaviour.
If not can you please suggest me how I could simulate the behavior.
Thanks & Regards
Thejusks
|
|
|
|
|
thejusks wrote:
the ShowDialog method also has a parameter overload to set the parent
It's not the parent, but the owner, and it's not exactly the same thing.
thejusks wrote:
how I could simulate the behavior
Both Christian and I suggested already: disable ChildWindow or set a flag, and don't react to input if the DialogWindow is visible.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Hello,
I have my Toolbar control in my base MDI child form. Autosize is true , ButtonSize is 22,22 and Wrappable is false . And in every deriverd form it appears fine.
But I have one rebel form that has a ToolbarButton with style set to DropDownButton (an arrow to the right with a drop down menu.) In this form, the Toolbar is about 6 pixels taller, and no matter what I change, I can't make it the same size as the others (or the others taller.) If I remove the drop down button, everything comes out fine.
In the designer, with drop down button, the toolbar looks the regular height, but once I run the app, it appears taller.
I'm using XP styles.
Has anyone had this problem? any ideas?
-- LuisR
P.S. BTW, in IE there are both types of buttons - the CP toolbar has taller buttons for a 16x16 image, while the Google toolbar has regular-height buttons for the same 16x16 image.
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|