|
How to disable fullscreen mode for a maximized form without border ?
This form must fit WorkingArea that is smaller than screen because desktop contains a custom application bar. This application bar hide itself when a form switch in fullscreen mode. But I don't want this app bar hidden when my first form is present.
Loutre Maline
|
|
|
|
|
Set FormBorderStyle property to FormBorderStyle.None
|
|
|
|
|
This property is already set.
When a form has both properties FormBorderStyle.None and FormWindowState.Maximized , the .Net Framework give it fullscreen behaviour (and system launch ABNotify.ABN_FULLSCREENAPP event). But I don't want fullscreen mode.
Loutre Maline
|
|
|
|
|
Try to set size manually without maximize action.
Get resolution from Screen.PrimaryScreen.Bounds.
|
|
|
|
|
This is a solution, but how can I detect working area change (when user move Windows application bar for example) for updating position ?
|
|
|
|
|
Try this code:
<br />
Rectangle rect = Screen.GetWorkingArea(Screen.PrimaryScreen.Bounds);<br />
Best regards, Alexey.
|
|
|
|
|
When application start, setting bounds isn't a problem.
But during application life, how application detect working area changes for updating its bounds ?
Loutre Maline
|
|
|
|
|
I think, that probability of changing size or position of application bar is very low, while user running full-screen application.
Best regards, Alexey.
|
|
|
|
|
yes short problem but me and my friends dont know about it (new users we are)
how we can open and compile VS 2005 projects with VS 2003.
mayb some assembly works.
-- modified at 3:09 Wednesday 12th April, 2006
|
|
|
|
|
and i want to work VS2005 with netFrameWork 1.1-- like this -->>the subject of the old messages about the copiled works..
|
|
|
|
|
Please don't write in bold.
You can use 2.0 code in 1.*
search tjis forum for a solution on how to use VS2005 with 1.1
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
sorry CWIZO.. i corrected the text .. thanks.
|
|
|
|
|
Ooops what I was trying to say before is that you can't use .NET 2.0 code in visual studio 2003. VS2003 just dosen't work with .NET 2.0
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
INPUT :
VC++ dll (abcd.dll) has funtion named DecryptString.
Requirement :
i need to create a dotnet project which uses this function in unmanaged dll.
Steps taken
public class CryptoAPI
{
[DllImport("abcd.dll", EntryPoint="#392")]
public static extern string DecryptString(string key,string text);
}
When i access the function in DOTNET
string EncryptedText = CryptoAPI.DecryptString(Key,PlainText);
It works fine couple of times.Some times it throws up an error
"object reference not set to instance of an object".
Can u please help me on this?
Can u tell me if i call the method - 5 times is it loaded 5 times during the runtime?
or only once when i do it for the first time.
for thendral
|
|
|
|
|
Maybe you pass to your function null or empty string ?
Try to check this before call.
I use this function: string.IsNullOrEmpty(string)
|
|
|
|
|
I have validated the function before.
The gets passed the unmanaged code as well the unmanaged code returns a value
but the result set is not recieved back in the DOTNET string.
getting me?
string EncryptedText = CryptoAPI.EncryptCString (Key,PlainText);
VC++ implementation()
{
char * EncryptCString (Key,PlainText);
{
AfxMessageBox(Key);
AfxMessageBox(PlainText);
///Code to do manipulatione
AfxMessageBox(encryptedvalue);
return encryptedvalue
}
}
the above code snippet ensure that the values of the parameter are passed correctly to the
unmanaged code and it process and return the value correctly
so the interop is the problem i suppose?
ie) getting it from vc++ to DOTNET ?
for thendral
|
|
|
|
|
Try to set charset in DllImport attribute:
<br />
[DllImport("abcd.dll", CharSet=CharSet.Ansi, EntryPoint="#392")]<br />
public static extern string DecryptString(string key,string text);<br />
And try unmanaged type conversions:
<br />
[DllImport("abcd.dll", EntryPoint="#392")]<br />
public static extern [MarshalAs(UnmanagedType.LPStr)] string DecryptString(string key,string text);<br />
I don't know exactly wich type is char *.
I hope you'll find it changing UnmanagedType.LPStr to other string types from UnmanagedType enum.
|
|
|
|
|
I had a similar function that returned a string from a C++ dll. Try declaring a global char array in your dll and then copy the string into the array, as below:
char szReturn[MAX_PATH];<br />
<br />
BOOL APIENTRY DllMain( HANDLE hModule, <br />
DWORD ul_reason_for_call, <br />
LPVOID lpReserved<br />
)<br />
{<br />
return TRUE;<br />
}<br />
<br />
__declspec(dllexport) LPCTSTR Test()<br />
{<br />
<br />
lstrcpy(szReturn,"success!");<br />
return szReturn;<br />
}
Hope that helps
|
|
|
|
|
When, if ever, should we force the garbage collection to run??
|
|
|
|
|
why all messages are not in one... dont flood
|
|
|
|
|
Different questions - Different posts. If he wrote better subject lines it would work better. Also, if you put in all your questions into one post some people feel reluctant to answer because they don't know the answer to all the questions, or they may feel compelled to answer a post that is beyond their knowledge and give the OP some bad advice.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
Please don't cross post.
Please don't spam the forum.
pankajgarg12 wrote: When, if ever, should we force the garbage collection to run?
Normally never. The garbage collection runs when needed and when there is enough unused objects for a collection to be effective. Unless you have a very extreme situation you never have to bother about it.
---
b { font-weight: normal; }
-- modified at 5:03 Wednesday 12th April, 2006
|
|
|
|
|
Everything on this forum is a problem to someone - A subject line of "problem" is absolutely useless. Please read the post at the top of the group by Chris that explains the rules of the foru,.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
Why should we not use global variables??
|
|
|
|
|
Please don't cross post.
Please don't spam the forum.
pankajgarg12 wrote: Why should we not use global variables?
Because the code gets hard to follow. If you use global variables you have to know how the entire application is working to know how the global variables are used.
---
b { font-weight: normal; }
-- modified at 5:03 Wednesday 12th April, 2006
|
|
|
|