|
A component I made has a property which has only sense when read in hexadecimal.
I wish the property grid of the component, at design time, show this property in hexadecimal, not in decimal.
Something like this:
<br />
[ Name: | MyComponent ] br />
[ MyProperty: | 0x30010080 ] br />
Can someone tell me how to do this ?
FDK
|
|
|
|
|
Hello,
Is it a readonly property?
Do you have an additional int property for the input at designtime?
All the best,
Martin
|
|
|
|
|
Not readonly. But the problème will be the same, because I want it to be displayed in hexadecimal.
I dont understand your second question.
FDK
|
|
|
|
|
Hello,
You can not have a property which takes int value as input and shows a HEX string as output.
You have only the possibility to have two properties one readonly and one for the input, or like the other suggestion only a string property which converts the input to int value!
All the best,
Martin
|
|
|
|
|
I am a bit surprise and a bit disappointed.
But I have to admit that your solution is good and simple.
Thanks.
FDK
|
|
|
|
|
Hello,
FDK2 wrote: I am a bit surprise and a bit disappointed.
That happens to me every day, minimum once!
FDK2 wrote: But I have to admit that your solution is good and simple.
:->
FDK2 wrote: Thanks.
Mais, c'est avec plaisir !
P.S.: Got my '5' for the feedback!
All the best,
Martin
|
|
|
|
|
<myint>.ToString("X")
Paul
|
|
|
|
|
I know this.
This do not answer to my question.
FDK
|
|
|
|
|
You stated that you wished to show the property value 'in hexadecimal, not in decimal'.
How are you storing the property value within your application? If, as you suggest, you are storing it as an integer then you can get the hexadecimal representation of this number by calling ToString("X") on an integer variable containing the value.
|
|
|
|
|
Sorry. My english is probably not good enough. :s
So imagine you have conceived a component on which you have an integer property.
You will see this property in the property grid, at design time.
But the value will be displayed in decimal format.
I want to see it in hexadecimal format.
FDK
|
|
|
|
|
You can continue to store the value of the property internally as an integer. However, you should make the public property declaration of type String. When reading the value, convert the internal integer value to a string representing its value in hex format using the code I previously supplied. When setting the value, parse the hex string and convert the value back to an integer.
Paul
|
|
|
|
|
Same simple and good solution than martin#
So thanks.
FDK
|
|
|
|
|
Hello Friends of the forum
I have a LAN with a Domain of windows 2003 server.
As I can make to block the use via automation of Directory it Activates with C#
the use of Windows Messenger, winamp.
But alone of certain IPS.
Example
1923.168.1.15 blocked winamp, excel
192.168.1.16 blocked messenger, winword
thank you
>Hola Amigos del foro
>Tengo una LAN con un Dominio de windows 2003 server.
>Como puedo hacer para bloquear el uso via automatizacion de Active Directory con C#
>el uso de Windows Messenger, winamp.
>Pero solo de determinadas IPS.
>Ejemplo
>1923.168.1.15 bloqueado winamp, excel
>192.168.1.16 bloqueado messenger, winword
>gracias
|
|
|
|
|
|
How to convert html file to xml file?
Karthick
|
|
|
|
|
Karthi_jpk wrote: How to convert html file to xml file?
Change the extension!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
1) I think you should read the forum guidelines.
2) I doubt you will get any response based on the subject.
|
|
|
|
|
which country are you from ???
I hope not from India..There was a big issue about this in Launge.
Anyway read guidelines.And try to be polite and give a proper subject title....And then we might help you...
hv fun
|
|
|
|
|
alas the joke about changing the file extension is correct in regards to information provided in the question.
what exacting are you trying to achieve?
|
|
|
|
|
sonsam wrote: alas the joke about changing the file extension is correct in regards to information provided in the question.
you hit the jackpot.
The above was my intention.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
See, demanding something at CP does not work in your favor.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
Actually, I would like to mow your lawn
Hogan
|
|
|
|
|
Hello everyone,
I am working on an Windows Application which I need to change the loaction of a TableLayoutPanel at the RunTime. I use the following code in order to do this.
this.tableLayoutPanel8.Location = new System.Drawing.Point(771, 3);
I was wondering if the specific loacation (771, 3) is refrence to the screen or the actuall Windows Application? Since the TableLayoutPanel is placed in the SplitContainer with ScrollBar to provide access to the entire Control Panel, I get the feelling that the above line of code locate the TableLayoutPanel on a different spot depending on the position of the ScrollBar.
I was wondering if it is possible to place the TableControlPanel at the same spot regardless of the ScrollBar position?
Thank you very much and have a great day.
Khoramdin
|
|
|
|
|
Hello,
The Location, means allways the Location inside the Container (SplitContainer in your case)!
All the best,
Martin
|
|
|
|
|
Hi,
my application (C#) can run with a culture set from a config file (e.g. "en-GB") that is different from the systems CurrentCulture (e.g. "sv-SE"). Is it possible to start a another process via System.Diagnostics.Process.Start with modified culture settings so that the new process has same CurrentCulture as my application?
Example:
Systems CurrentCulture = "sv-SE"
myApp CurrentCulture = "en-GB" (set from config file)
wanted: newProc CurrentCulture = "en-GB"
Thanks
Rolf
|
|
|
|