|
Thank you for your answer.
but I wanted to know is there another way without copying file.
I'll try to describe my situation. I have created application which downloads Button Images form the remote server and shows to the Users. when Application tries to download the Image which already downloaded I wont to ovverride it but error occures.
|
|
|
|
|
Hi
I want to know how to make mouse pointer visible within a windows form only.
Since iam working on a windows application, in that I should not allow mouse pointer to be visible when the mouse pointer comes outside the form.
Thanks in Advance For Ur Help
|
|
|
|
|
What's with the flood of non descriptive headers tonight ? Everyone on this forum is asking for help in some regard, probably about C#.
You can capture the mouse, and as it moves out of your form area, you can set the cursor to be null.
Seems nasty to me, tho.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I am retriving Date from SqlServer 2005 but i gets date and time instead that i want only date how should i do it?
|
|
|
|
|
First, C# is not a useful header, imagine if everyone put C#, the forum would look a little silly, right ?
There is no Date type in C#, only DateTime. You can ignore the time, if you want to.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
MyDateTime.Date will return a new object with the time element reset to midnight.
|
|
|
|
|
you can also format the date
Datetime datetime=Person.subscribedate;
datetime.tostring("d");
|
|
|
|
|
you should return only date from sql
you can use convert function
forexample
convert(datecolumn,varchar,101)
it'll only return date not time
|
|
|
|
|
Hi,
System.ComponentModel.Design.IReferenceService.GetComponent() is described by MS here:
http://msdn2.microsoft.com/en-us/library/system.componentmodel.design.ireferenceservice.getcomponent.aspx
unfortunately the do not offer example code.
This is what I know:
If a component is sited, you can get the IReferenceService by a call of Site.GetService()...
this works fine.
My Problem:
with C# Express at DesignTime, I always get:
Parent.Equals(myComponent) == true
as a result of this kind of code:
Component myComponent;<br />
IReferenceService refSvc;<br />
[...].br />
IComponent Parent = refSvc.GetComponent(myComponent);<br />
Am I doing something wrong, or is this a bug?
best regards,
Bernd
|
|
|
|
|
no one knows?
no ideas?
Am I describing anything unclear?
This is about writing a custom UITypeEditor for replacing the buildin one for a property like this:
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]<br />
public Component Owner<br />
{<br />
get { return this._Owner; }<br />
set { this._Owner = value; }<br />
}
The build in Editor allows choosing components from a toolbox, which are private Fields in the BaseClass of my Form. The result is, that the code added by the designer cannot be compiled anymore, if such a component is chosen.
I am also experimenting with IInheritanceService and IDesignerHost to solve this... I already have a DropDown Editor that works, but till now I cannot filter the shown components properly...
Normal Reflection is no help here, as Reflection does not work on the RootComponent of the Designer...
... I'll check if TypeDescriptor solves the Reflection lack...
So the complete Problem I have to deal with:
How to find out if a Component in DesignMode is a field of the Designers RootComponent or a public or protected (but not private) field of the RootComponents base class...
best regards,
Bernd
|
|
|
|
|
I solved the complete Problem, but without IReferenceService.GetComponent()...
... would still be interresting if anyone knows about this...
My solution:
Get the RootComponent with IDesignerHost
Check if the Component you want to use is a Field of the RootComponent by using Reflection:
FieldInfo FI = RootComponent.GetType().GetField(ComponentName, BindingAttributes...);
-> as Reflection on the RootComponent itself is not possible, you will only get Results for Fields of a BaseType
-> you can get also private fields of the BaseType (The code needs ReflectionPermission!)
-> you can be (almost) sure, that all Components for which you cannot find fields, are Components with fields in the RootComponent.
-> all Components with fields in the RootComponent are accessible
-> all private fields you got by reflection are not accessible
best regards,
Bernd
|
|
|
|
|
Hi,
How to make a button transparent?
|
|
|
|
|
Set the Opacity property to something less than 100%
|
|
|
|
|
Button does not ve a opacity property as far of my knowledge
|
|
|
|
|
Button control provides the opacity function ???????????????????
|
|
|
|
|
Hi,
you can set the BackColor property of the button to Color.Transparent
Manoj
Never Give up
|
|
|
|
|
|
right, its not working
san
|
|
|
|
|
Please provide genuine and realistic answers.
|
|
|
|
|
button.backcolor.transparent does not work.
Back color does not ve transparent property
|
|
|
|
|
Hi,
I have tested it here, and its working fine.
See I have done the Following to test :
I have created Form as "Form1" and a button as "button1" over it.
Form1.BackgroundImage = TransparentButton.Resource1.Image2;
This just to check if transparentcy is working.
For the Button too I have used a Bitmap.
button1.Image = TransparentButton.Resource1.Image1;
Now in the Constructor of the Form I have set:
button1.BackColor = Color.Transparent;
Also, please set the
FlatStyle as "Popup" for the "button1".
That makes the button transparent, meaning u can see the Image2 from over the
button body.
Manoj
Never Give up
|
|
|
|
|
hi,
Thanks. I don't need any images both on button and form. My idea is to place the button dynamically on the datagrid and when dragged it should be transparent. Hope u got my point
Bye
|
|
|
|
|
hi,
if you are using .net v1.1 then you have to set the backcolor of the button to Color.Transparent.
like:
this.button1.BackColor = System.Drawing.Color.Transparent;
and FlatStyle should NOT be "System.Windows.Forms.FlatStyle.System"
It can be either Flat, Popup, or Standard; but NOT System
regards
|
|
|
|
|
|
using System;
using System.Collections.Generic;
using System.Text;
namespace My practice page
{
class WordPair
{
string[] rightpair = new string[] {"below\tunter", "blue\tgel", "cat\tgelb", "cat\tdie Katze",
"red\trot","the dog\tder Hund","to read\tlesen"};
string [] wrongpair = new string []{"below\trot", "bue\tlesen", "cat\tunter", "red\tgelb",
"the dog\tdie katze"};
}
}
I am a beginner in C# programming and seeking advice.
What I am trying to do here is to build up an application in 4 parts.
Part A.
Which I have already started with the code above, to be an application that has the class WordPair implemented. The application creates a word pair object and calls the method for matching with two different strings-one that produces a match and one that doesn't & to show the results of these matches.
Part B.
An application in the same programme but as part B, that reads in the 'word_list.text' ( that is located in the solution folder). This part to be able to check each line.If the line has a word pair(i.e. two strings separated by a '\t') it puts this string into an ArrayList. If the line does NOT have a word pair, the application put that line into a file 'wrong_lines.txt'(that will be located in the solution folder).This application to count the number of lines without word pairs and reports this number to the user & shows all the input lines in a rich text box. If the word list file is not available, the program to produce an error an appropriate message.
Part C
Trying to have this part of the programme to be an application that reads the wordlist, puts the word pairs into an ArrayList of word pair objects, writes the wrong_lines files, reports on faulty pairs, allows the user to ask for a word and attempt the answer, also tells if the user's answer is correct.
Part D.
This to be a combination of Part A, Part B and Part C.
AM NOT SURE IF AM ON THE RIGHT TRACK WITH THE PART OF MY CODE ABOVE.SEEKING ADVICE ON WHAT COULD BE A BETTER WAY OF WRITING THE RELEVANT CODES.
Ntoki
|
|
|
|