Click here to Skip to main content
15,167,867 members

Comments by merh (Top 26 by date)

merh 8-Sep-21 4:04am View
Thanks Richard!
merh 12-Mar-21 12:22pm View
Hi!My code crashes at return await browser.PrintToPdfAsync(path);

using System;
using System.Windows.Forms;
using CefSharp;
using CefSharp.WinForms;
using System.Threading.Tasks;
using System.Threading;

namespace CefTest
public class Program
private static ChromiumWebBrowser browser;

public static async Task Main(string[] args)
await HtmlToPdfHeadless();

private static async Task HtmlToPdfHeadless()
const string testUrl = "";
var settings = new CefSettings();
browser = new ChromiumWebBrowser(testUrl);
string path = "Test.pdf";
Task<bool> printToPdfAsync = PrintToPdfAsync(path);
var result = await printToPdfAsync;

public static async Task<bool> PrintToPdfAsync(string path)
return await browser.PrintToPdfAsync(path);


merh 12-Mar-21 9:54am View
Sorry I have changed to the following and it still dosent work.
Task<int> printToPdfAsync = PrintToPdfAsync(path);
int result = await printToPdfAsync;
merh 12-Mar-21 9:24am View
There is await before PrintToPdfAsync method. I have also changed the the invoked method to the following but it still dosent work.

await PrintToPdfAsync(path);
public static async Task PrintToPdfAsync(string path)
await browser.PrintToPdfAsync(path);
merh 8-Jun-20 10:18am View
Yes, thanks!
merh 16-Oct-18 11:44am View
merh 15-Aug-18 17:07pm View
Thanks for your answer. But how can I use the path with RootFolder? Because with RootFolder I jump into the folder.
merh 22-Dec-15 6:40am View
Thanks a lot!
merh 7-May-15 7:26am View
Thanks, but I get the problem when I include C++ header file in the header file for C.
merh 2-Apr-14 4:49am View
I found the problem in "Regional and language Options" under Standards and Formats. I has to be changed to Russian and the question marks are removed. The string loads correctly the string from the resorce file but when the string is added to the tab, it shows strange characters which are not Russians.
nTab = m_tabWnd.AddViewTab(RUNTIME_CLASS(CRequiredSettingsView), str, pContext);
m_ptrRequiredSettingsView = (CRequiredSettingsView*) m_tabWnd.GetTabClient(nTab);
m_tabWnd.SetTabIcon(nTab, IDI_Page);

Thanks for any Help
merh 18-Jun-12 13:25pm View
Thanks for your answer.
I working with Swedish language. I would like to find the abbreviations and replace them with real words.
I have already a limited dictionary of abbreviations.
how can I recognize an abbreviation?
you says words which cannot be recognized should make the whole text invalid.
How can I find out words which make the whole text invalid?
merh 11-Nov-11 17:18pm View
Hi, yes. It was from me. I try to point to that Im searching for something like that but in this case for starting of application.
merh 10-Nov-11 17:29pm View
It works, Thanks a lot
merh 18-Oct-11 15:38pm View
Thanks for an Excellent explanation.
merh 18-Oct-11 14:48pm View
Windows XP
merh 27-Oct-10 10:38am View
Thanks a lot
merh 30-Sep-10 3:29am View
Thanks a lot.
merh 28-Sep-10 11:13am View
The "text box" is in both English and Russian resource files. Because Im beginner in this case´, how can I code the "text box" in cp1251?
merh 28-Sep-10 9:57am View
The "text box" is in both English and Russian resource files. Because Im beginner in this case´, how can I code the "text box" in cp1251?
merh 28-Sep-10 9:03am View
Its placed with SetWindowText(m_strDisplay) and CString m_strDisplay; // Holds the string that gets displayed.
merh 2-Sep-10 15:31pm View
I have windows XP. I restart the computer but the changing dosent take effect.
merh 24-Aug-10 3:54am View
Thanks a lot for your help and it works as I have expected.
merh 23-Aug-10 9:48am View
Could you please give me a example how to change Default input language to English by the function SystemparameterInfo?
merh 20-Aug-10 15:44pm View
It works fine and thanks a lot for your help
Best Regards
merh 20-Aug-10 8:33am View
It seems that I can load "ntdll" and seems also GetProcAddres works but
LCID lcId(0); NtQueryDefaultLocale(FALSE, &lcId); dosent work.

HINSTANCE hInstLibrary = LoadLibrary("ntdll.dll");
if (hInstLibrary)
FARPROC farproc = GetProcAddres(hInstLibrary, "NtQueryDefaultLocale");
LCID lcId(0);
NtQueryDefaultLocale(FALSE, &lcId);
merh 19-Aug-10 15:53pm View
thanks, could you please tell me what I need to use "NtQueryDefaultLocale"? Because I get error message.