|
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
|
|
|
|
|
AFAIK, this is not possible. You can, however, build a dll that is exposed to COM and should behave identically to ocx objects.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Connor's Christmas Spectacular!
Judah Himango
|
|
|
|
|
unfortunately i need the activex in another software that can just read ocx files and no dlls
but thanks anyway!
|
|
|
|
|
This is just a shot in the dark, but have you tried renaming the dll as an OCX? I'm not familiar with the differences, but I believe a COM dll and an OCX file are similar if f not the same.
|
|
|
|
|
i'll try that on monday
but i don't think it's possible
|
|
|
|
|
It's not possible. The C# compiler (or any of the .NET Framework Managed languaged) cannot possibly target building an .OCX file. You also can't just rename a .NET .DLL to .OCX and expect it to work. An .OCX file is a native (processor code) image whereas all .NET assemblies are MSIL code. Even using NGen on the resulting image to convert it to native code wont work either because .NET Framework assemblies don't support exports of the type required by an .OCX file.
You'll have to go back to Visual Studio 6 (VC++ or VB) or build the control using unmanaged Visual C++.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
Dave, so even if a .NET dll is exposed to COM by the runtime (thus making it a kind of ActiveX control), this still isn't possible? After doing some research, it looks like an .ocx differs very little from a standard COM/ActiveX control. Since one can build ActiveX control by exposing your type to COM, isn't it then possible to have an OCX built from managed code? My understanding is that the ComVisible attribute causes the assembly to be exposed to COM, thus allowing for things like ActiveX objects.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Connor's Christmas Spectacular!
Judah Himango
|
|
|
|