|
tjschilling wrote: I am looking for a control/DLL to add to my c# solution.
Oh, ok then that makes it a C# question. Good luck
led mike
|
|
|
|
|
how to fixed a mdi child form on restricted ares ... i must be move only small areas only
do you know pls reply me
laknath
|
|
|
|
|
It can be done by checking the location property of the form in the move or locationchanged event but it's nasty as the form jumps.
I wrote an article[^] about doing this with dialog forms (not children) but you may be able to adapt it.
The trick is to capture the WM_NCLBUTTONDOWN message that occurs when the title bar of the form is clicked and calculate the rectangle from that cursor point where movement is allowed - and set the cursor's clip property to that rectangle. You need to remove the clip after the mouse is released
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
laknath wrote: i must be move only small areas only
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
How do I link a keyboard shortcut to a button on a form? I have added shortcuts to menu items-that is very straightforward-but for some reason, I cannot find information on how to add the shortcut to a button.
Thanks.
|
|
|
|
|
just use Amperion ("&") before the charecter on which you want to use Keyboard Shortcut.
<br />
e.g : Button Text="Click"<br />
<br />
Just Give "&Click"
and on Runtime -> "Alt + C" will invoked Button Click Methods !!!!
|
|
|
|
|
Amperion
Ampersand[^]
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
Is there a symbol that can be used for Ctrl + C instead of Alt + C?
Thansk.
|
|
|
|
|
Abhijit's answer is correct. if you want to assign function keys, you'll have to set the Form's KeyPreview property to true and handle the Form's KeyPress or KeyDown events and call the PerformClick method (and Focus if you need it) of the button you want pressed.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
|
my app is at(root):
C:\Documents and Settings\wolf\My Documents\Visual Studio 2008\Projects\MyMoO\Client\bin\Debug
my resources are at:
C:\Documents and Settings\wolf\My Documents\Visual Studio 2008\Projects\MyMoO_Resources\stars
and i'm accessing them with latter path, however, if i would archive MyMoO & MyMoO_Resources and unarchive them to another path i would have to edit the path in source. I need to give it a relative path approach.
My problem is that i don't know how the relative path for the resources would look like in this particular case(URI above)
I found this helpfull link however i don't know what my relative path would look like, i might even be able to hard code it.
http://weblogs.asp.net/pwelter34/ar...de-snippet.aspx
Even so if that' the right method for me then what do i pass it as fromDirectory and toPath arguments? Root and resources paths?
I tried first hardcoding stuff like @"..\..\..\MyMoO_Resources\stars" but it didn't work.
modified on Friday, August 22, 2008 10:17 AM
|
|
|
|
|
private string GetResourcesPath()
{
string basePath = AppDomain.CurrentDomain.BaseDirectory;
string commonPath = basePath.Remove(basePath.Length - @"MyMoO\Client\bin\debug\".Length);
return (commonPath + @"MyMoO_Resources\");
}
|
|
|
|
|
Hy everyone!
I used the itextsharp dll http://itextsharp.sourceforge.net/examples/Chap0607.cs ccomponent to add images to a pdf document. In default it uses the squar format for the page. I didn't change this, but no matter which size i choose the pic to be or which parameter I try to use to set the location where the pic is located at, there is a white strip on top of the page. is there a chance to use 100% of the page?
my code is
Document document = new Document(PageSize.A4.Rotate());
try
{
PdfWriter.GetInstance(document, new FileStream(outputPath, FileMode.Create));
document.Open();
for (int i = 0; i < list.Count; i++)
{
iTextSharp.text.Image img = iTextSharp.text.Image.GetInstance(list[i]);
if (img.Width >= img.Height)
{
img.Alignment = iTextSharp.text.Image.MIDDLE_ALIGN;
img.RotationDegrees = 0f;
}
else
{
img.Alignment = iTextSharp.text.Image.MIDDLE_ALIGN;
img.RotationDegrees = 270;
}
img.ScaleToFit(855, 550);
document.Add(img);
document.NewPage();
}
}
catch (System.Exception EX)
{
logger.Error(EX.ToString());
}
finally
{
document.Close();
}
is there a chance to fit the pic into the page to use the whole size, so to get rid of the white strip on top (compareable to the orange bar on top to the rest of this page here)?
thanks!
stephan.
|
|
|
|
|
I have to fill a column in a datagridview with a default value, therefore I have defined a custom celltype:
public class BNummerCell : DataGridViewTextBoxCell
{
public override object DefaultNewRowValue
{
get
{
return NewCellValue();
}
}
}
From this custom cell I created a custom columntype:
public class BNummerColumn : DataGridViewTextBoxColumn
{
public override DataGridViewCell CellTemplate
{
get
{
return new BNummerCell();
}
set
{
//base.CellTemplate = value;
}
}
}
I have added a column of type BNummerColumn to my DataGridView, and new rows are supplied with a correct default value.
However, whenever I click on the new row, the default value dissapears and doesn't come back.
It must be simple, but I searched already over an hour....
Thanks in advance,
Rob
|
|
|
|
|
Hey guys
Im still battling with this crap!
this is a console app and sits in C:\windows\system32 . the reson being so that another program can access it via command prompt. When the caller program calls this exe i get the error message "CLR error: 80004005 program will now terminate".
If i move the app and its dll to the desktop it executes
im so confused... this works like a charm in XP
why is this happening? apart from vista being retarded
[update]
i wrote an hello world console app and put it in system32, targeted 3.5 and it worked fine. Im convinced it has something to do with the SDK (C++ wrapper) the app is calling. I still dont get how it works if i move it out of there.
also tried running as admin & played with the compatibility stuff
[/update]
thanx
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
modified on Friday, August 22, 2008 2:36 PM
|
|
|
|
|
Check which versions of .NET framework are installed.
This problem can occur if v2.0.50215 is installed (it was a pre release version)
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
only 3.5 shows in "Programs and features"
how would it execute after i moved it out of system32 if its a compatibility thing? im so confused with this
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Check the framework folder - not sure where it is on Vista, on XP it's C:\WINDOWS\Microsoft.NET\Framework - there's a folder in there for each version.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
found it, its got...
V1.0.3705
V1.1.4322
V2.0.50727
V3.0
V3.5
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Looks OK
It may be worth uninstalling all of them and then re-installing the ones you need.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
all but 3.5 is "built in" vista, AFAIK there isnt an easy way to uninstall it
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Hmmm... Maybe this blog[^] can help?
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
Thank you dave, ill try it monday morning
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Try taking over permissions of that file.
Chuck Norris has the greatest Poker-Face of all time. He won the 1983 World Series of Poker, despite holding only a Joker, a Get out of Jail Free Monopoloy card, a 2 of clubs, 7 of spades and a green #4 card from the game UNO. In the movie "The Matrix", Chuck Norris is the Matrix. If you pay close attention in the green "falling code" scenes, you can make out the faint texture of his beard. Chuck Norris actually owns IBM. It was an extremely hostile takeover.
|
|
|
|
|
hey
i just updated the original message...
what do you mean by taking over permissions?
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|