|
As usual. Create an inherited DataGridTextBoxColumn and override Edit method to call base.Edit(...) only if Your another column has appropriate values.
Hi,
AW
|
|
|
|
|
Hiya I want to use xp style controls and have been reading about using manifest files to do this.
But I can't get it to work for me. My project is called "form". ( a test!! )
These are the steps I have taken so far:
1. Opened new file in notepad and added (removed arrows for display. )
?xml version="1.0" standalone="yes"?
assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"
description>form/form
dependency
dependentAssembly
assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
publicKeyToken="6595b64144ccf1df"
language="*"
processorArchitecture="X86" /
/dependentAssembly
/dependency
/assembly
2. Renamed this .txt file to form.exe.manifest
3. Copied the file in my project folder.
4. Set the controls FlatStyle to System.
But it still doesn't work. What am I doing wrong??
(version visual c# 1.0)
thanks
grahamoj.
|
|
|
|
|
You may have put it in you "project" folder... But did you put it in your "Debug" folder???
/\ |_ E X E GG
|
|
|
|
|
Is there any wayout to convert HTML to PDF?
clr.
|
|
|
|
|
iSEDQuickPDF.com 65.00 for the control
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
|
i have a new form inheriting from another form. the new form has a datagrid in it.
i'm creating a table style so my datagrid cells will fill the entire width, but my datagrid.width is not working correctly. it gives out a width entirely too small.
for example:
. . . . . . . .
DataGridTextBoxColumn ProductID = new DataGridTextBoxColumn();
ProductID.HeaderText = "Product";
ProductID.MappingName = "ProductID";
ProductID.Width = 100;
DataGridTextBoxColumn Comments = new DataGridTextBoxColumn();
Comments.HeaderText = "Comments";
Comments.MappingName = "Comments";
Comments.Width = dg.width - 100;
. . . . . . . .
the Comments column is very small. i've used this in other applications, but this one is acting funny. i'm wondering if it might have to do with the inheritance. ( note, the datagrid is not being inherited )
|
|
|
|
|
well you have to account for row header size - a few pixels, plus it rounds. jusy play with it
Column.Width = dg.width - dg.rowheaderwidth -3;
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
And next, autosize Your column in OnPaint method . Another events work poor
Hi,
AW
|
|
|
|
|
Hi guys,
Sorry to bother you with such a dumb question, I've been trying to figure it out for days now. All I want to do for an application is that after reading in data from a file (I've done), I want to graph it (I know how to graph) in different ways in different windows. Basically my question is how do I, upon user's command from a menu choice, bring up a new window, a new window and assign a certain view to that window.
In summary I have about 10 different views(with a different graph on each view). What I want to know is how do I, anytime a user wants to see one of them, display a new window on top(MDI) with the according view attached to that window.
Please could you reply with an answer.
Thank you respectfully
Raj Qbus Surendra
|
|
|
|
|
hey dude its c#.net forum
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Does anyone knows how to create a class which will calculate Net Volumes from Pressure, Temperature and gas quality according to AGA (AGA-3, AGA-5 AND AGA-8) standards?
Thanks. Mike
|
|
|
|
|
look up the formulas and move them into methods
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Hi
I am trying to load a texture from an image I get from a Web Service. D3D provides a method TextureLoader.FromStream using which you can load a texture from a stream. This is the code I wrote to load the texture:
imageRequest = (HttpWebRequest)WebRequest.Create(URL);
URL is something like http://terraservice.net/ogcmap.ashx?version=1.1.1&request=getmap&layers=drg&styles=utmgrid_yellow&srs=epsg:4326&bbox=-122.427,36.66,-117.756,38.947913&width=1000&height=500&format=image/jpeg
imageResponse = (HttpWebResponse)imageRequest.GetResponse();
imageStream = imageResponse.GetResponseStream(); // get a "Stream" from the "Response" object
TextureLoader.FromStream(device, imageStream);
But TextureLoader.FromStream() fn. Gives an error message that “stream does not allow seeking”
Then this is the second thing I tried:
imageRequest = (HttpWebRequest)WebRequest.Create(URL);
imageResponse = (HttpWebResponse)imageRequest.GetResponse();
imageStream = imageResponse.GetResponseStream(); // get a "Stream" from the "Response" object
byte[] buffer = new byte[imageResponse.ContentLength];
imageStream.Read(buffer, 0, (int) imageResponse.ContentLength);
// imageResponse.ContentLength is long so have to cast to int
MemoryStream stream = new MemoryStream(buffer);
texture = TextureLoader.FromStream(device, stream);
but imageResponse.ContentLength is always equal to -1. I was able to save the image by doing:
Image img = Image.FromStream(imageStream);
img.Save("c:/junk/texmap.jpg", ImageFormat.Jpeg);
and it came out fine when i opened it in photoshop.
Then I tried following code (replaced imageResponse.ContentLength by imageStream.Length):
imageRequest = (HttpWebRequest)WebRequest.Create(URL);
imageResponse = (HttpWebResponse)imageRequest.GetResponse();
imageStream = imageResponse.GetResponseStream(); // get a "Stream" from the "Response" object
byte[] buffer = new byte[imageStream.Length];
imageStream.Read(buffer, 0, (int) imageStream.Length);
MemoryStream stream = new MemoryStream(buffer);
texture = TextureLoader.FromStream(device, stream);
but this gives following error while trying to access imageStream.Length while executing
byte[] buffer = new byte[imageStream.Length];
exception of type 'System.NotSupportedException' occurred in system.dll
This stream does not support seek operations.
Any ideas what to do?
sid
|
|
|
|
|
like whats the location of the wsdl?
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
For getting Pictures from Webpages i use following Code:
---------------------------------------------------------------
WebRequest request = WebRequest.Create("<urltofetch>");
WebResponse response = request.GetResponse();
Stream stream = response.GetResponseStream();
Stream local = File.Create("filename.gif");
byte[] buffer = new byte[1024];
int n;
do
{
n = stream.Read(buffer, 0, buffer.Length);
local.Write(buffer, 0, n);
} while (n > 0);
stream.Close();
local.Close();
---------------------------------------------------------------
Where the url can be whatever you want ...
Hope this will help!
|
|
|
|
|
How can I get rid of the beep that happens when I press enter on a form with no default button?
|
|
|
|
|
Add a default button? It seems to me that every form should have a default button, no?
Cheers, Julian
Program Manager, C#
This posting is provided "AS IS" with no warranties, and confers no rights.
|
|
|
|
|
Unless the application is a simple, one form, dialog application.
Have you tried catching the key down event?
|
|
|
|
|
I tried, but it didn't seem to work.
But I fixed it with a default button that's positioned outside the form
|
|
|
|
|
Ouch. That seems like a bit of a hack. What did you try in terms of capturing the Enter key?
Cheers, Julian
Program Manager, C#
This posting is provided "AS IS" with no warranties, and confers no rights.
|
|
|
|
|
Sorry, can you tell me where can I download Rotor? I cannot find it
Thanks!
|
|
|
|
|
http://www.sscli.net/
Cheers, Julian
Program Manager, C#
This posting is provided "AS IS" with no warranties, and confers no rights.
|
|
|
|
|
What's 'ROTOR'??? I've been hearing alot about that lately...
and instead of actually going to the link provided by the message below this, and finding the answer in 10 seconds. I'd much rather wait a day and, have my question answered here.
/\ |_ E X E GG
|
|
|
|
|
partial sample .net implementation from microsoft with source code (to say it shortly)
|
|
|
|