|
|
Perhaps you should answer the original poster instead of me...
---
b { font-weight: normal; }
|
|
|
|
|
In c#, hi! I'd like to know how to invalidate a space in a textbox.
say, a user can't input empty string in a textbox and at the same time cannot input " "(space).
thanks!
much appreciated!
CandyMe
|
|
|
|
|
this will work
if (textbox1.Text != null && textbox.Text.Trim() != string.Empty)
{
}
|
|
|
|
|
|
Hi
does anyone know how to redirect the stdout to a txt file.
thanks
|
|
|
|
|
myapp.exe > somefile.txt
xacc-ide 0.0.99-preview7 now with C#, C, C++, IL, XML, Nemerle, IronPython, Perl, Caml, SML, Ruby, Flex, Yacc, Java, Javascript, Lua, Prolog and Boo highlighting support!
|
|
|
|
|
I draw an image in the form_Paint event handler:
e.Graphics.DrawImageUnscaled(bmp,0,0/*panel1.Bounds*/);
But the image IS scaled! The size of bmp is 2048*1900, but the whole image was drawn in a small area of the form, the width was 800 more or less.
Why scaled? How can I make it unscaled?
|
|
|
|
|
That's really weird. Is there any sort of scaling transform happening on the graphics object ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
The DrawImageUnscaled method draws the image at it's original physical size. The size is about 11" wide, so it's resized to show up as 11" wide on the screen.
If you want to draw the image without resizing, use a different method.
---
b { font-weight: normal; }
|
|
|
|
|
|
Ask the article author, we won't read the article for you.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have developed my own image file format for compressing stastic images(VS.net - C#, C++).
Now how can I assosiate windows explorer to show my images files as thumbnails?
|
|
|
|
|
Hi,
If there is a main form with various child forms that have context menus with generic items like copy and paste, how does it usually work in terms of merging these items? How do I make sure that the right 'copy' functionality is executed for each particular child form? Do I create these items in the main menu and then merge them with individual child context menus or vice versa?
thanx in advance
|
|
|
|
|
Hi all
I have some file that in run Time i check the file size,
If this file is bigger then X [in KB] i want to change the file name.
The problem is that i don't know how i change the file name.
I try to use FileInfo object , but i don't see any method that do it.
I need help....
Thanks.
|
|
|
|
|
|
I need to update certain controls on a form in C# while a test sequence is performed that lasts up to 90 seconds while keeping a running record on that same form of the test results. Basically, the top half of the form will be the data entry portion of the form with the relevant text and combo boxes while the bottom portion of the form contains the data being tested. Certain labels and text boxes on the bottom part of the form need to be updated as the test progresses, but I need to enable the user to enter new data in the top half of the form. I thought perhaps multi-threading would solve the trick, but would the threads be able to access the same resource, this one form, at the same time?
|
|
|
|
|
Multi-threading *will* solve the problem. You just need to read a bit about synchronizing access to shared resources. There are many articles on the internet that cover this topic. Take a look at this article: http://www.c-sharpcorner.com/Code/2002/April/MultithreadingP3.asp[^] and then do a search for "C# thread synchronization".
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
I develope desktop app and use develope dataaccess component to handel the sql server but every time i try to use the programes i got this exception. and i am sure that the component in the same folder with the programes and i refrenced it in the visual studio
"File or assembly name DataAccess, or one of its dependencies, was not found.
File name: "DataAccess""
Please help
hoho
|
|
|
|
|
Have you attempted debugging? Can you post code where the error message appears?
|
|
|
|
|
This exception is thrown when one or more assemblies is not located by Fusion using the standard, documented paths. Simply put: you are missing a file referenced at compile time but is no where to be found at runtime.
Find the assembly with DataAccess in it and make sure it can be located at runtime. Beyond that make sure that assembly has all of its dependant assemblies locatable as well.
|
|
|
|
|
Hi
I have various forms that are opened by a main form (SDI) and each form has its own context menu (for right clicking) that includes functions like copy, paste, delete, etc. But if I select Edit->Copy from the main menu of the main form, it should copy the right thing in the currently active form (the form with the focus) . What is the best way to accomplish this basic function? Is it through menu merge?
Thanx
|
|
|
|
|
Are you talking about MDI. If its a MDI, then Menu merge will work. Have the implementation of the menu clicks on the child form.
The parent window should provide the basic menu's like Exit, Open, Close arrange vertically etc.
|
|
|
|
|
i'm actually working with SDI, is there a way to merge it in SDI?
|
|
|
|
|
u should put the data to be copied in the active form in the somthing liake a clipboard (ie: an object) and pass this object to the main form
|
|
|
|