|
i hope i understood your question. you can add a Zoom function to your pannel that has a zoom parameter (on a 1 to at least 100, it can be higher since you could zoom to lets say 500%) that will resize the size of your controls and the distance betwin them(theyr location that is). you need to define a scale however for your controls. ofcourse you need to remove the anchor proprietys of all the controls in that panel and for more realism you will need to code a function for resizing the text font of the controls and add it to every control's SizeChange eventHandler.
|
|
|
|
|
thanks a lot for your submission. it would be greate , if you can send some url's .
Sreejith Nair
[ My Articles ]
|
|
|
|
|
I'm trying to overlay a form that I have created in C# over another application that is not an MDI window. I've been doing some research in the user32 dll and found how to overlay my form onto other applications such as IE that are MDIs but ran into this problem when I tried it with the one im intending to use it on. Is there a way to do this without too much trouble or will I have to just create the window without a parent and then manage the z-orders of the windows to make it appear to be a child? and if so are there events that fire that will let me know when the z-orders change and the position of the parent window changes? Thanks for the help.
|
|
|
|
|
I would like to set the focus of a text box with the blinking cursor after the form is loaded. Where in the construction do I accomplish this functionality?
|
|
|
|
|
In FormLoad event.
Ex: textbox1.Focus();
|
|
|
|
|
|
Hi,
You can use the tabindex property. Set the tabindex property of that control to 0.
Thanks and Regards
SGS
|
|
|
|
|
select the text box you want to get focus, in designer go to its properties, set "TabIndex" property to 0 and Its done
|
|
|
|
|
I want to hide windowxp taskbar from C#.net.
Who can help me?
pls...
|
|
|
|
|
|
Hi kyawsoe;
The only way I know how to do this is by using unmanaged code. The two functions you need to call are FindWindow and SetWindowPos which are found in user32.
Here is some code to do it.
Import the two dll's [DllImport("user32.dll",EntryPoint="FindWindow",CharSet=CharSet.Unicode)]
static extern IntPtr MyFindWindow(string _WindowClassName, string _WindowName);
[DllImport ("user32.dll",EntryPoint="SetWindowPos",CharSet=CharSet.Unicode)]
static extern bool MySetWindowPos (IntPtr hWnd, Int32 hWndInsertAfter,
Int32 X, Int32 Y, Int32 cx, Int32 cy, uint uFlags);
Define some variables
private IntPtr hTaskWindow; // Handle to task window
private const uint TOGGLE_HIDEWINDOW = 0x80;
private const uint TOGGLE_UNHIDEWINDOW = 0x40;
You can place this in form load event or somewhere appropriate. It is the handle to the task bar
hTaskWindow = MyFindWindow("Shell_traywnd", "");
Now when you want to hide the task bar execute this statement
MySetWindowPos(hTaskWindow, 0, 0, 0, 0, 0, TOGGLE_HIDEWINDOW);
Or when you want to un-hide the task bar execute this statement
MySetWindowPos(hTaskWindow, 0, 0, 0, 0, 0, TOGGLE_UNHIDEWINDOW);
That's it.
I hope that is was of some help.
-Fernando Soto
|
|
|
|
|
Ok, now that I have access to my data I need to display it in another aspx page. How do I do this?
What I am trying to do is use one of my frames to display different bits of informtion depending on what the user is doing.
|
|
|
|
|
You would be answerded if you ask this in the asp.net forums.
|
|
|
|
|
Hello,
How can i block Pop-Ups in a AxBrowser Component? has a way to do this?
Thanks.
|
|
|
|
|
|
|
|
Man, the other topic wasn't well written nor well understood :\, so i'm still without answser!
The articles I found didn't helped me to find out how to block Pop-ups directly
|
|
|
|
|
Lol o.o
I got it
the answer:
NewWindow Event
private void web_NewWindow(object sender, AxSHDocVw.DWebBrowserEvents2_NewWindow2Event e)<br />
{<br />
e.cancel = true;<br />
}
Thanks
|
|
|
|
|
Being an intermediate programmer, I'm having a hard time understanding the documentation that is out there regarding this topic.
Let's say I have two objects, derived from ClassA and ClassB. The lifecycle of Class B is as follows:
-ClassA instantiates an instance of ClassB, and places this object into, say, a hashtable.
-ClassB does its thing for a while, but then becomes useless.
-ClassA removes ClassB from the hashtable. Now, there is no reference to that object within ClassA.
What happens to ClassB? Is it still floating out there in memory? Do I need to tell ClassA to actually destroy the ClassB object, or does the GC already know that ClassA no longer refers to ClassB, and therefore destroys it automatically?
Thanks for your help.
|
|
|
|
|
tantiboh wrote:
Is it still floating out there in memory?
Yes, for an indeterminate amount of time, until the GC puts the memory back into the general pool ("collects" it).
tantiboh wrote:
Do I need to tell ClassA to actually destroy the ClassB object
No. Not unless ClassB was using some non-managed resources.
does the GC already know that ClassA no longer refers to ClassB, and therefore destroys it automatically?
Yes.
It's hard to get ones arms around this, coming from C++. There's a lot of good articles out there. Try googling on "Understanding .NET Garbage Collection".
Marc
MyXaml
Advanced Unit Testing
YAPO
|
|
|
|
|
I'm using a System.Timers.Timer object. How can I get (or calculate an estimate for) the amount of time remaining on the timer? The estimate wouldn't have to be any more accurate than a few dozen milliseconds.
It's an ASP project, so System.Windows.Forms.Timer is not available.
Thanks for you help.
|
|
|
|
|
tantiboh wrote:
How can I get (or calculate an estimate for) the amount of time remaining on the timer?
Here's an idea: derive your own timer that hooks the Elapsed event. Whenever the timer fires, do an intervalStartTicks=DateTime.Ticks or something.
Have a method in your derived class called "RemainingTime", or something like that, that gives you Interval - DateTime.Ticks - intervalStartTicks, doing the appropriate unit conversions.
You might also want to provide your own Start method that sets the intervalStartTicks as well.
Marc
MyXaml
Advanced Unit Testing
YAPO
|
|
|
|
|
Hi everybody!
In Java such a piece of code
<br />
javax.swing.JFrame frame = null;<br />
try<br />
{<br />
frame = Class.forName("javax.swing.JFrame");<br />
}<br />
catch (Exception e) {}<br />
would create a new JFrame object (of course if the string provided isn't a correct name exceptions are thrown).
Is there s similar mechanism in C#? Becouse if there is it would let me ommit many string.Equals() and is calls and make the code a whole lot easier to read.
|
|
|
|
|
Look at System.Activator.CreateInstance, or you can do the same if you already have a reference to an assembly.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|