Desktop Form

  • Thread starter Thread starter fliversen
  • Start date Start date
F

fliversen

Hello,

for some reasons like
- create a font (without a real form)
- dimension of desktop

I need access to a default Form / Desktop form.

In which way, it is possible with windows::forms.

In MFC I use 'GetDesktopWindow()'.

Is 'Win32-API GetDesktopWindow()' is only way ?

So long
Frank Iversen
 
- create a font (without a real form)
well, you don't need any Form for that, just new Font()
- dimension of desktop
well you don't need a font for that: Screen.AllScreens[0].WorkingArea?

I need access to a default Form / Desktop form.

In which way, it is possible with windows::forms.

In MFC I use 'GetDesktopWindow()'.

Is 'Win32-API GetDesktopWindow()' is only way ?

1. there is no such function in SWF (but you could always use your own
private invisible Form)
2. you could alway PInvoke GetDesktopWindow()
 
Hello,
well, you don't need any Form for that, just new Font()

to set the correct size, I need the DpiY from a Graphics object.

But
-------
Form ^fm = gcnew Form();
Graphics ^g = fm->CreateGraphics();
int logy = g->DpiY;
g->Dispose();
fm = nullptr;
 
Back
Top