|
Like leppie said:
FileStream templateStream = File.Open(@"C:\MyImage.gif", FileMode.Open);
buffer = new byte[templateStream.Length];
templateStream.Write(buffer, 0, (int)templateStream.Length);
Shouldn't that be READ??? In either case, the file has already been destroyed when you ran this code for the first time. You'll have to correct the code to Read, then replace the .GIF file with a known good copy.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi.....
Im workin on Icon class where im gettin this exception at the declarartion of the icon obj
private Icon myIcon= new Icon(typeof(Form1)).Assembly.GetManifestResourceStream("winapptry.app.ico" ));
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
with additional info as
Additional information: Could not find file "..\Visual Studio Projects\winapptry\bin\Debug\winapptry.app.ico".
just dunno how to sort tht out
sathy
-- modified at 8:15 Wednesday 28th December, 2005
|
|
|
|
|
First of all you have forgotten a "(" so your code won't even compile.
Check the following:
1. You have a file named "app.ico" in the same project as Form1 (and not in a subfolder).
2. This file is a valid icon.
3. You have set its build action to "Embedded Resource".
4. The root namespace of your project is named "winapptry".
|
|
|
|
|
Thanks a lot Robert
"(" this is bcoz i edited the code here
its the third point is wat i missed out.....
GREAT!!!!!!!
sathy
|
|
|
|
|
Hi ..
i have a few textBoxes that are bounded to a tableview...
but whenever i change my ROWFILTER at the tableview , the Bounded textboxes remain the same...
this is the databind code:
UpdateCoptxtMa.DataBindings.Add("Text",source[0],"Ma");
UpdateCoptxtFirstName.DataBindings.Add ("Text",source[0],"FirstName");
UpdateCoptxtLastNAme.DataBindings.Add ("Text",source[0],"LastName");
UpdateCoptxtAddress.DataBindings.Add ("Text",source[0],"Address");
cboYehida.DataBindings.Add("Text",source[0],"Yehida");
UpdateCoptxtStatus.DataBindings.Add("Text",source[0],"Status");
UpdateCoptxtHomePhone.DataBindings.Add("Text",source[0],"HomePhone");
UpdateCoptxtCellPhone.DataBindings.Add("Text",source[0],"CellPhone");
And the RowFilter code:
source.RowFilter="(LastName + ' ' + FirstName)='"+SelectedCopName +"'";
Thanx! Yosi
|
|
|
|
|
.
.
.
.
.
source.RowFilter="(LastName + ' ' + FirstName)='"+SelectedCopName +"'";
urdataview.RowStateFilter = DataViewRowState.ModifiedCurrent;
i am not so sure but hope helps???
|
|
|
|
|
nope.. when i try using it it throws an exception .
"index 0 is not negative and below total rows cund"
whenever he tries to bind it for example: UpdateCoptxtMa.DataBindings.Add("Text",source[0],"Ma");
i'm lookin for some way , to refresh the textBoxes, ReBInd them i dunno , a way to make them realize that the datasource has changed...!
thanks anyway..
Any other suggestions? please?
|
|
|
|
|
check this link
http://www.codeproject.com/cs/miscctrl/GridFilter.asp
|
|
|
|
|
Hello,
I am C#.net programmer(beginner).I want to disable resize and close button in
my c#.net application.pls anybody help me.i am waiting
alex.
Thanks in advance.
Help Me
|
|
|
|
|
follow this link in the end page u got example in C#.
in load of form write this code
this.MaximizeBox =false;
http://addressof.com/blog/articles/232.aspx
|
|
|
|
|
In the designer, set the form's BorderSyle property to FormBorderStyle.FixedDialog , and set the ControlBox property to false.
I hope this helps,
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
|
|
|
|
|
add this.ControlBox = false; in the InitializeComponent() of ur app
sathy
|
|
|
|
|
sir i have to make a gui application in c# that will run a cosole application and will give inputcommands and receive output from that console application. i invoke the cmd.exe in c# using system.diagnostic.process.start() function now i need do pass commands to my process as well as receive output.
please give solution to it and list related namespaces to be used.
sherry; email : shaheryar011@gmail.com
-- modified at 5:32 Tuesday 27th December, 2005
sherry
|
|
|
|
|
You don't need to start CMD.exe. Just start your Console app using System.Diagnostics.Process.Start. To intercept output or give input, you can use some methods of the Process class:
System.Diagnostics.Process proc = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo("myConsoleApp.exe", "any arguments go here");
proc.StartInfo = startInfo;
proc.StandardInput.Write("I'm now inputting text to the console app!");
proc.StandardOutput.ReadLine();
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Bought a House!
Judah Himango
|
|
|
|
|
HI,
I want to disable the MS OFFICE File Menu options and Tollbar Buttons
by using WINDOWS API's..?
We can do this by using MS OFFICE libraries, but i want do using WINDOWS API's.
IS IT POSSIBLE..?
If so PLZ send reply to : pradpb999@gmail.com
pradeep kumar
|
|
|
|
|
Have you tried getting a handle to the menu items in question, then doing a SendMessage to hide it? I'd imagine this could work.
However, I question why anyone would want to do this; sounds either malicious or just a bad solution to a problem. What are you trying to do?
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Bought a House!
Judah Himango
|
|
|
|
|
How do I broadcast IP packets on the network using Windows Sockets?
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
Such a large question to an even larger topic. Check out a book on Network programming.
|
|
|
|
|
|
I have some problems with being always one pixel off when using GDI+ (I can fix it by experimenting, but I want to understand this...)
Does someone know a good article about that?
Specifically:
(1) I have an Rectangle r, for which I
<br />
r.Inflate(-1, -1);
g.DrawRectangle(Pens.Brown, r);
r.Inflate(-1, -1); <br />
g.FillRectangle(Brushes.Beige, r);
- the rectangle isn't filled completely (bottom / right one pixel row/column shows background)
- adjancted cells have one pixel difference (I hoped for two)
- adjancted cells with connecting lines do connect to the rectangle, even though they shouldn't
We say "get a life" to each other, disappointed or jokingly. What we forget, though, is that this is possibly the most destructive advice you can give to a geek.
boost your code || Fold With Us! || sighist
|
|
|
|
|
Also had this effect some time ago.
The rectangle drawn by DrawRectangle is one pixel wider/higher than one would assume, but FillRectangle works like expected.
You either have to adress this directly when using DrawRectangle:
g.DrawRectangle(Pens.Brown, new Rectangle(r.Location,
new Size(r.Width - 1, r.Height - 1));
or always use FillRectangle instead:
r.Inflate(-1, -1);
g.FillRectangle(Brushes.Brown, r);
r.Inflate(-1, -1);
g.FillRectangle(Brushes.Beige, r);
The latter one will reduce performance and you will need double buffering to avoid flickering.
|
|
|
|
|
|
go for what leppie said.
this is because all "pen" based commands in gdi+ is not pixelbased.
if you say draw a box from 0,0 to 3,3 it draws a box from the "center" of the 0,0 pixel to the "center" of the 3,3 pixel:
+---+---+---+---+
| | | | |
| ############# |
| # | | | # |
+-#-+---+---+-#-+
| # | | | # |
| # | | | # |
| # | | | # |
+-#-+---+---+-#-+
| # | | | # |
| ############# |
| | | | |
+---+---+---+---+
so we get a rectangle at subpixel level.
and when this is rendered with the default settings it looks funky and 1px off..
so just do what leppie said.
-- modified at 9:06 Wednesday 28th December, 2005
|
|
|
|
|
Hi,
I have to specify row delimeter for my Textfile other than the default delimeter(Carriage Return)...
Am using Microsoft.Jet.Oledb.4.0 engine to read the file...Is it possible to register the row delimeters in the Registry of thi sEngine?
Kindly help me....
|
|
|
|
|
hi all,
i am new to C# and hope you people can help me.
may i know how to use the style sheet in Microsoft Visual Studio 2005..?
i know how to add new item.
but i dunno how to "play" with style sheet.
like adding pictures etc.
-DarkangeL-
|
|
|
|