|
If you take a screenshot of a button pressed and not pressed, you'll see it's pretty simple to draw. There are two grays, one for the topleft and one for the bottom right. When pressed, the colors swap.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
No, I mean draw the outline over the image.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
You just swap them while the button is being held down and then swap back when it is let up.
Pablo
|
|
|
|
|
Im sorry I dont have an example but it would be something like this:
NormalImage
PressedImage
If MouseDown In Image Control
ImageControl.Image = PressedImage
Endif
then when the mouse is let back up
ImageControl.Image = NormalImage
Pablo
|
|
|
|
|
Hi all, I have this mdi application that I'm creating
This MDI application has 2 MDI Child.
Everytime I do the show() on each of the child form, it will flickers badly since I have a lot of controls on my child forms. How do I make them draw on the background first and show it when it's done ??
To give you all the idea with what i mean, think about when you first start windows. It will have the loading screen and after it's done loading, the shortcuts on your your desktop will appear in a very manner :P.
Thank you guys
|
|
|
|
|
You can turn on double buffering, but you can't make your control paint themselves before they paint themselves, they won't draw until a WM_PAINT message occurs.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
eagertolearn wrote: I have a lot of controls on my child forms.
Have you considered using more forms with less controls on each? Too many controls on a single form is, as a general rule of thumb, poor design practice.
|
|
|
|
|
Stupid question I'm sure, but although I can easily copy a form's code across projects, I can't figure out how to copy the design element of the form. I've tried copying foo.resx and foo.designer.vb, but neither of them seem to bring up the designed form.
tia!
|
|
|
|
|
Hi,
cstrader232 wrote: I've tried copying foo.resx and foo.designer.vb
Try copying the InitializeComponent() along with the files you specified ?
<marquee>"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
Anant Y. Kulkarni
|
|
|
|
|
hello!!
when i run crystalreportviewer in my vb.net application i get the error
"the .net assembly CrystalDecision.Windows.Form could not be found
could anybody tell how could i resolve this problem???
|
|
|
|
|
Reposting your question every 6 hours is rude. It'll just get you ignored...
Does your app have a Reference (in My Project) to the CrystalDecisions.Windows.Forms DLL??
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
i have an problem when i convert .net 1.1 proj in 2.0 through its default converter as it not converts project accurately.
tell any way to convert .
thanx
|
|
|
|
|
jagmit20 wrote: tell any way to convert
With 100% accuracy?? The only way to do that is to rewrite it by hand. You can use the Conversion Wizard as a starting point, but that's about it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
If the converted one compiles, then the conversion has done the job. That is what migration promises to do. The migration pretty much occurs to the project settings only. It won't upgrade your source code, nor does it add any new features that didn't exist before.
Best,
Jun
|
|
|
|
|
He's asking other ASP.NET questions, so that's the kind of project I think he's upgrading.
There's so much that's different between ASP.NET 1 and 2, that his project will more than likely break when he compiles it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I see. Forget about what I posted earlier.
Best,
Jun
|
|
|
|
|
is there any way
to call function automatically when webforms loads without writing each time
code at page load of each webforms.
|
|
|
|
|
You get a better response if you ask this question in the ASP.NET forum.
AFAIK, there is no event that fires for every request in every session.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
1. Create base page that calls the function.
2. Have all your pages inherit off of the base page.
Mike Lasseter
|
|
|
|
|
Create the function in a seperate module/class (depending on your requirement) and make the method call at page load, e.g.
Protected Sub Page_Load....
Dim MyClass1 As New MyClass 'declare the class
MyClass.DoFunction() 'do the work
End Sub
Is that what you mean?
Agree with Dave Kreskowiak - this topic is better off in ASP forum.
|
|
|
|
|
Hi,
I'm trying to build a more informative error log. Upon encountering an unexpected error, I'd like to get more information about the error to help me pin point its origin.
Specifically I'd like any/all of the following:
The line of code that caused the error
The Event Name, Function, or Sub that caused the error
The module that caused the error.
Thanks.
Ben
|
|
|
|
|
The best you can get is what you see in the StackTrace property of the Exception. You can get the name of the method from the top line of the StackTrace, or you can get it from the .TargetSite.Name property of the Exception. The module name will also come from the .TargetSite , but in its .DecalringType or ReflectedType properties.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi there:
As you know we can compile a C Sharp program at DOS prompt like
csc MyProgram.cs
Where MyProgram.cs is the source code file.
Now i want to perform the same compilation through another C Sharp Program. Like i made a program named ShellExecution, which tries to compile another C Sharp Source Code File called "First.cs" lying in my c directory. The program runs fine without any exceptions; it opens the dos window and runs csc, but nothing happens and seems like the file name "First.cs" is not being passed to the csc.exe as a parameter. I have used the following code for executing the compilation process:
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = "C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\CSC.exe";
process.StartInfo.Arguments = "C:\\First.cs";
process.StartInfo.UseShellExecute = true;
process.StartInfo.RedirectStandardOutput = false;
process.StartInfo.CreateNoWindow = false;
process.Start();
process.WaitForExit();
Please help me out!!!!
|
|
|
|
|
I don't know if it'll help any but I always use the Start() method by passing the arguments directly into the method call.
<br />
System.Process.Diagnostics.Start("CSC.exe", "C:\First.cs")<br />
Works eveytime for me.
-- modified at 6:14 Friday 25th August, 2006
|
|
|
|