|
Not a problem at all - glad to help.
If you don't have the option to do the transparent color in the flat button, alternatively you can use PictureBox or Panel control (I would go with PictureBox) for the same effect. I use PNG files for transparency - if it's transparent in the PNG file it comes out transparent in the button, imagebox, panel etc. Let me know if you find the flat style button transparency property and if you have any other question. You can also make a custom form/dialogbox. So it doesn't have to have the sharp edges - you can have a circle dialog box. If you don't know how to do it and need that, let me know.
PS.
Look and see if you have these properties:
this.button1.FlatAppearance.BorderSize = 0;
this.button1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
this.button1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
|
|
|
|
Yes..
thats exactly what i am doing.. i have made up the window using some images (using GDI+).
That minimize problem was occuring because of the code that i had written for detecting the click on that image used for closing the window. I havent worked down to the root of the problem yet.. i'll do it once i get out of my office.
I was actually inspired to make such a custom window when i used Google Talk.
Its cool... i have made seperate images for the titlebar, the body and the buttons. I had some problem while customizing the button, so i left it for the meanwhile. So, i use GraphicsPath to bring them all together and compose the window.
But i have a problem in store for me... how do i go about writing code to help the user in expanding the window. I mean how to detect when the mouse has been placed on the border of the window and how to expand the window.... because if i do so, the images will be distorted.
Can you tell me, how to go about doing it. Or simply put, what approach do you use... (something which i can implement in Visual Studio 7)
Thanks !!!!
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
That would be more challenging. Normally the skins in a custom app don't change - the app doesn't visually resize. What you could do in that case is have 4 pictureboxes and dock them in each corner. When the app resizes so will the pictureboxes automatically. What you would have to do in that case is make sure the picture of the border/frame is very high resolution/large picture - large enough so that when it explands it won't get pixelated.
-- modified at 3:37 Wednesday 28th December, 2005
|
|
|
|
|
Hmmm.. that would be nice.. i'll give it a try.
Well, you are right that such windows are rarely expandable..
Hey, but look at Google talk window... it is allowed to expand the window there. But very cleverly, they have the background of the window as white... must be some nice trick up their sleeves.
Anyway, i'll give it a try and let you know.
Thanks for all the cool advice.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
There is a way to make custom controls with custom properties that is much cleaner than this, but it requires more code.
Google talk doesn't seem hard to make, with exception of the semitransparent shadow if this shadow is not caused by the operating system.
Check this out:
http://www.ondotnet.com/pub/a/dotnet/2002/03/18/customcontrols.html
-- modified at 4:40 Thursday 29th December, 2005
|
|
|
|
|
thanks man..
its great !!!!
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
Oh.. i am extremely sorry....
After reading your reply and sending my reply, i made a different form and created a button to help it minimize and also added code to help it move around.
But this one is working fine...
Seems that there is something wrong with my code.
I'll look into it and let you know whatever the problem was.
Thanks a lot man.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
Hi
This question is related to printing in .NET winform application, I am working on a wizard kind of application (in.NET using C# language) where in user will be guided through a set of win forms that collects user response for a series of questions (and stores/saves as a file in a srialized format).
I am at a stage where in i have to implement the "print and print preview" functionality for this application, Could you please suggest what is the best method to accomplish this task?
Tricky bit for me is - wizard/questionnaire contains (at some stage) a list view that will have entries which opens into child windows where the detailed information is displayed.(for eg, if the wizard collects information about a student, at some stage it has to provide in a list view, number of subjects he/she enroled into and upon clicking it opens a child window with details of subject/enrolment).
Your help in any form is greately appreciated!! Sorry if i haven't explained the problem clearly!!!
Thanks
Sr
|
|
|
|
|
Check this out:
http://www.c-sharpcorner.com/winforms/texteditor.asp
http://www.ondotnet.com/pub/a/dotnet/2002/06/24/printing.html
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdrawingprintingprintdocumentclassprinttopic.asp
"Don't worry about the world coming to an end today. It's already tomorrow in Australia"
|
|
|
|
|
Hie,
I want to know is there any method to Stop File Creation,modification in C#.
Secondly,I also want to know is there any way to Stop Cookie creation from any Website in C#.
Please We need the answer urgently as we r working on a project and the time frames are very short.
SAM.
SAM
|
|
|
|
|
Hi,
I'm no expert in this field, but take a look at code based security. By applying 'evidence' to your assemblies (or somewhere) you can control what they do. This is the mechanism used to stop an untrusted control running in IE on a local user's machine maliciously damaging files etc.
Regards,
Rob Philpott.
-- modified at 8:09 Tuesday 27th December, 2005
.. or is it Code Access Security...
|
|
|
|
|
I need to add online help functionality in my project(.Net), how to do that?
|
|
|
|
|
I extend a textbox for keypress event.
a form includes one extended textbox and a button which is accept button of form.
But when after editing text when u press Enter key , doesnt raise button_click event. How can pass this event to FORM when user press ENTER key after edit text.
|
|
|
|
|
if your case what i understand that after the user enters or modify the text he/she will press enter and the form should the run the code for that button .
so Simply select the form in the design Area and click F4 for properties the at go to Accept Button And choose your button.
as simple as that if this was your case .
|
|
|
|
|
Make sure in the Form properties the property KeyPreview is set to true.
of if you can't find it there go to where the Form properties are initialized and put this code there:
this.KeyPreview = true;
//"this" refers to the Form
//or
KeyPreview = true;
//but make sure the code is in the Form class
//otherwise you'll get an error
-- Don't worry about the world coming to an end today. It's already tomorrow in Australia --
|
|
|
|
|
You got me wrong
Form has a button and ExtendedTextbox textBox
Button is already accept button of Form
ExtendedTextbox has keypress event to control entry ,So if u press ENTER, this event handles enter key.
|
|
|
|
|
I understand that, but you need to have KeyPreview = true; to be able to assign the AcceptButton property to a button for it to work without any extra code. (If the KeyPreview property is set to false, your case will only work if the only control on the Form is the button.)
This is part of the code and it doesn't include the Form initialization where you need to put KeyPreview = true;
This is all you need to be able to let's say write something in a textfield, press ENTER and even if your text still has focus it will work.
But if you don't have the KeyPreview set to true, it will not.
//**********************************************
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace ButtonPressedCsharpDELETETHIS
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
textBox1.Text = "Button is pressed";
}
}
}
//*******************************************
-- Don't worry about the world coming to an end today. It's already tomorrow in Australia --
|
|
|
|
|
thanks friend i solved my problem
|
|
|
|
|
Hello,
I would like to have this behavior too.
What is your solution ?
Please
Freg.
|
|
|
|
|
Im having trouble with a Windows application .......
When i run the Application in windows XP NO PROBLEMS
But when i run the APPLICATION ON WINDOWS2000 SP4 i dont get the same results as in XP
although all the nessecary Prerequisites are all installed (MDAC2.8,.NET Framework 2,Windows Installer 3)
The Application Opens up an excel file and read the data to a dataset and then copies one column that a user selects to an arraylist, then Open another excel file and also read the data to the dataset and copies the selected cloumn to another ArrayList and then compares the Arraylist from the first file with the arraylist from the second file and REPORTS in which rows there have been match's ........
so when i run the Application in the XP i GET about 342 Match's but in Windows2000 I GET ONLY 10 MATCHS
i dont know how the Application is Affected by the OS And HOW TO SOLVE THIS !!!!!!!!!
LIVE TO THE BEST WHILE GATHERING KNOWLEDGE AND LOVE IN LIFE
|
|
|
|
|
|
SAME EXCEL files same program diffrent OS's!!!!
|
|
|
|
|
CAPS LOCK IS SO F***ING ANNOYING, REMEMBER HARDLY ANYONE WILL HELP YOU WHEN YOU SHOUT LIKE MAD
modified 12-Sep-18 21:01pm.
|
|
|
|
|
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
|
|
|
|
|
following is the default procedure for calling event
this.button1.Click += new System.EventHandler(this.button1_Click);
private void button1_Click(object sender, System.EventArgs e)
{
}
Now what i want the following
this.button1.Click += new System.EventHandler(this.demo);
private int demo()
{
MessageBox.Show("Called");
return;
}
demo is the function which i have to called. which is returning value.
but when i do with above code it gives me error " does not match with delegate"
how can i call my own function instead of system defined. and how can i handle the returning value
Amit Grover
CDAC R&D
|
|
|
|