If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Ribbon in Access 2007 works incorrect
Hi! I am writting application with access 2007, I have problem about ribbon.
please help me. In access 2007, I create class and form by API function (my purpose draw ordanization chart). However, after I run that form, Ribbon in Access 2007 worksed incorrect. To give a concrete: open one form with design status and order form with form view status. Ribbon of design status not appear. This my code to form Public Function vbWinMain() As Long Const CLASSNAME = "Hello_VB" Const TITLE = "Organization chart" Dim hwnd As Long Dim wc As WNDCLASSEX Dim message As Msg Dim lngStyle As Long Dim CS As CREATESTRUCT Dim RecWin As RECT ' Set up and register window class wc.cbSize = Len(wc) wc.style = CS_HREDRAW Or CS_VREDRAW wc.lpfnWndProc = GetFuncPtr(AddressOf WindowProc) wc.cbClsExtra = 0& wc.cbWndExtra = 0& wc.hInstance = 0& 'Application.hWndAccessApp wc.hIcon = 0& 'LoadIcon(Application.hWndAccessApp, IDI_APPLICATION) wc.hCursor = 0& 'LoadCursor(Application.hWndAccessApp, IDC_ARROW) wc.hbrBackground = GetStockObject(WHITE_BRUSH) wc.lpszMenuName = 0& wc.lpszClassName = CLASSNAME wc.hIconSm = 0& 'LoadIcon(Application.hWndAccessApp, IDI_APPLICATION) RegisterClassEx wc GetWindowRect GetDesktopWindow, RecWin ' Create a window hwnd = CreateWindowEx(0&, _ CLASSNAME, _ TITLE, _ WS_EX_APPWINDOW, _ CW_USEDEFAULT, _ CW_USEDEFAULT, _ RecWin.Right, _ RecWin.Bottom, _ 0&, _ 0&, _ 0&, _ 0&) ' Show the window ShowWindow hwnd, SW_SHOWNORMAL UpdateWindow hwnd SetFocus hwnd SetWindowPos hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE 'enter message loop '(all window messages are handles in WindowProc()) Do While 0 GetMessage(message, 0&, 0&, 0&) TranslateMessage message DispatchMessage message Loop vbWinMain = message.wParam End Function |
#2
|
|||
|
|||
Ribbon in Access 2007 works incorrect
In my code have use ACTIVESKINLib
mASkin.LoadSkin Path mASkin.ApplySkin hwnd I have example with activeskin 4.3 First you open form1 and click command, close form1 then you open form2 with design staus and form3 with form view status then change between form2 and form3, ribbon design form2 not appear this link file http://www.4shared.com/file/11732310...Database3.html thanks "Tuan Anh" wrote: Hi! I am writting application with access 2007, I have problem about ribbon. please help me. In access 2007, I create class and form by API function (my purpose draw ordanization chart). However, after I run that form, Ribbon in Access 2007 worksed incorrect. To give a concrete: open one form with design status and order form with form view status. Ribbon of design status not appear. This my code to form Public Function vbWinMain() As Long Const CLASSNAME = "Hello_VB" Const TITLE = "Organization chart" Dim hwnd As Long Dim wc As WNDCLASSEX Dim message As Msg Dim lngStyle As Long Dim CS As CREATESTRUCT Dim RecWin As RECT ' Set up and register window class wc.cbSize = Len(wc) wc.style = CS_HREDRAW Or CS_VREDRAW wc.lpfnWndProc = GetFuncPtr(AddressOf WindowProc) wc.cbClsExtra = 0& wc.cbWndExtra = 0& wc.hInstance = 0& 'Application.hWndAccessApp wc.hIcon = 0& 'LoadIcon(Application.hWndAccessApp, IDI_APPLICATION) wc.hCursor = 0& 'LoadCursor(Application.hWndAccessApp, IDC_ARROW) wc.hbrBackground = GetStockObject(WHITE_BRUSH) wc.lpszMenuName = 0& wc.lpszClassName = CLASSNAME wc.hIconSm = 0& 'LoadIcon(Application.hWndAccessApp, IDI_APPLICATION) RegisterClassEx wc GetWindowRect GetDesktopWindow, RecWin ' Create a window hwnd = CreateWindowEx(0&, _ CLASSNAME, _ TITLE, _ WS_EX_APPWINDOW, _ CW_USEDEFAULT, _ CW_USEDEFAULT, _ RecWin.Right, _ RecWin.Bottom, _ 0&, _ 0&, _ 0&, _ 0&) ' Show the window ShowWindow hwnd, SW_SHOWNORMAL UpdateWindow hwnd SetFocus hwnd SetWindowPos hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE 'enter message loop '(all window messages are handles in WindowProc()) Do While 0 GetMessage(message, 0&, 0&, 0&) TranslateMessage message DispatchMessage message Loop vbWinMain = message.wParam End Function |
Thread Tools | |
Display Modes | |
|
|