|
But that way if the value has 3 decimal values, it will cut it short.
So I guess what I am asking, how come the same command produces different results in both version of Visual Studio?
|
|
|
|
|
Actually, I'm not getting the results your describing. No matter what I input for a datatype, I'm always getting the trailing zero's removed when .ToString() returns.
You might want to try to force the value to a known type first before calling ToString() on it:
textbox.text = ((float)row["TotalArea"]).ToString();
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is there some documentation of all available formatting rules? In my opinion MSDN lacks this information, but maybe I'm just blind
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Do you mean this[^]?
Be sure to look at the index on the left side of the page to see additional information. Formatting is a MUCH larger topic than it would appear to be.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
That's a great source, thanks
modified 12-Sep-18 21:01pm.
|
|
|
|
|
How can I make a form ALWAYS topmost regardless if another form within the project has been set to topmost? Thanks in advance.
P
|
|
|
|
|
try adding to your database at your forum-msgs table another field called "Type", you should probably use numbers for this.
when you call for your messages at your page, try putting first the ones with type = 1, and later get the others.
this is a prioraty for your messages, then you can arrange them.
|
|
|
|
|
Ummm....And this has what to do with making a form TopMost???
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hmmm... escuse me for being new here and not knowing **** about anything...
but now i get what he sais... sorry
|
|
|
|
|
So, is there a way to do this?
Thanks
|
|
|
|
|
well... i think that the best solution is that when you show it, you use the command form.showdialog() insted of form.show, this way it won't enable it to go to the last one...
that's the best option that i could think of, i don't think that you can do topmost with some other and not enable it to switch forms... unless...
you can do an event "On leave", and then do a focus command on the form, that way if you leave, it will get focused on the form and wouldn't be able to switch... i think that that would work.
no moer options for me...
good-luck, NaNg
|
|
|
|
|
Thanks for the help guys.
P
|
|
|
|
|
Hey, no offense. We just found it really odd that the OP kind of asked a question about, say, washing a dog, and you gave him instructions on aging cheese.
We thought you posted a reply to a question, but clicked on the wrong Reply link. That's how far off topic you were!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Well, off the top of my head, you have a problem. Your app can only have one TopMost form. The one that gets set to TopMost LAST stays there. Ther previous ones get knocked down the z-order. It looks like you're going to have to manage your TopMost property a bit more carefully, and sparingly.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hey guys.
I'm writing a program that is integrated with Outlook 2003. When I create mails from my program, i'm having trouble inserting the default signature the "right" way. The signatures are stored locally in different formats, but I cannot seem to access them by the Outlook SDK object model.
Anyone out there who have encountered, and solved this issue?
Regards, Thomas.
|
|
|
|
|
Hi every body
I Need a Simpe Ftp client program with source code (C#) and it work truely
Any one can help me?
|
|
|
|
|
You didnt search on CP or Google, did you?
|
|
|
|
|
yes I did,but my finds didnt works unfortunately.
|
|
|
|
|
Google results for ftp client c# source[^]. You really need to learn how to use a search engine...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i need to use the native code(unmanaged code),and i have to use void*,so i use the "unsafe" symbol then i meet the trouble
c++code:
SC_InitAsk sca;
memset(&sca, 0, sizeof(sca));
sca.m_Head.m_nType = SC_INIT;
sca.m_dwSoftware = 0x12345678;
sca.m_hWnd = m_hWnd;
m_Dll.SCInit(&sca, sizeof(sca)
c# code:
unsafe
{
SC_InitAsk sca = new SC_InitAsk();
sca.m_Head.m_lIndex = PublicValue.SC_INIT;
sca.m_dwSoftware = 0x12345678;
sca.m_hWnd = this.Handle;
SCInit(&sca, sizeof(SC_InitAsk));
}
c++ interface:
BOOL WINAPI SCInit(void *pInit, int nSize);
c# reference definition:
public unsafe static extern bool SCInit(void* pInit, int nSize);
---------
my trouble:
when debug c#,i got dismatching error with the c++ interface,then i can't find out what's wrong,for the reason may be the struct definition or the "void *"
so how i can work it out ,or how i can debug this?
gary.ruan
|
|
|
|
|
You don't have to use unsafe code here. Why not do something like this.
C#
[DllImport("yourdll")]
public static extern bool SCInit( System.Intptr pInit, int nSize )
Now in your function do this:
SC_InitAsk sca = new SC_InitAsk();
sca.m_Head.m_lIndex = PublicValue.SC_INIT;
sca.m_dwSoftware = 0x12345678;
sca.m_hWnd = this.Handle;
System.IntPtr p;
p = Marshal.AllocHGlobal( Marshal.Sizeof( typeof( SC_InitAsk ) ) );
Marshal.StructureToPtr( sca, p, true );
SC_Init( p, Marshal.Sizeof( typeof( SC_InitAsk ) );
Marshal.FreeHGlobal( p );
I hope this helps.
Andy
Human beings were not meant to sit in little cubicles staring at computer screens all day, filling out useless forms and listening to eight different bosses drone on about about mission statements. -- Peter Gibbons
|
|
|
|
|
hi i want encrypt exe file in hdd . when my program is running after testing some conditions the exe file that encrypted , decrypting and running (like stream playing)
and i want my program works like "TZ Executable Protector".
TZ Executable Protector get an exe file and encrypt it and create loader exe and one key file .when you click on executable load it's test key file and run encrypted exe file (decrypting and running)
my problem is : ican file encrypt exe file and save it on hdd,but when i want decrypt exe file and run it ,i don't want that save decrypted exe file in hdd. i want to decrypt and run it in the same time.
thanks...
|
|
|
|
|
Compilation to native code (so that a exe can't be simply disassembled by reflector) isn't enough?
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
Hello to all,
I have to develop a project which can implement RTP Audio-Video Streaming. I found so many document releed to this. I also know he packet formate of RTP. But still not know that how to start .
I have problem with codecs. How can i use different codecs with it. & also i dont found any example that realy implement this packet formate.
Is there any ready made component which i can use with my project. I see the component WinRTP. It is good but it is limied with use if codecs. It does not support all codecs & also not support video at all.
I use C#.Net to implement my project.
Regards,
Divyang Mithaiwala
|
|
|
|
|
please,
how can i make an activex control (i need an ocx file! and not a dll) with visual studio .net and c#?
thanks! kopi_b
|
|
|
|