|
|
|
hi
i will put a image that is curve in background form and in run i will form should be hide and image show in curve mode
for this part i use what? vcl form or fire monkey application?
i am low level
please help me
best regard
|
|
|
|
|
You may use TImageShape from
http://mail.feranchuk.net/vcl/forms/nonrect/vwimageshape.zip
-Raja
|
|
|
|
|
thanks for guide
i will looking component that control custom image that propertis hover ,over click color and ,... , and that espical efect .i was download graphic32 but i have n't control . i want looking component that control in tools .for example tms component have control dbgid . i will make a button custom that is enable that have one effect and when disabled another effect .what this do ?
please help me
best regards
|
|
|
|
|
hi
i dont english good
i want change form from Square mode to curve mode for 4 side form
and i put image for background form .
please help me.
best regards
|
|
|
|
|
You may use TImageShape from
http://mail.feranchuk.net/vcl/forms/nonrect/vwimageshape.zip
-Raja
|
|
|
|
|
|
Is this[^] what you want to do?
|
|
|
|
|
|
I just can't seem to get this right.
I have a Com Class written in VB.Net that brings up a form where users can enter information.
I have a delphi program that opens this class and it shows the form fine.
The problem I have is with events raised in the Com Class. It just does not get fired in delphi, although I can assign it to a procedure.
Has anybody managed to do this?
|
|
|
|
|
|
The FireMonkey DrawLine has an opacity parameter.
When I pass that as 1.0, I would expect complete over write but I'm still getting some mix of the new and old values.
What do I do to get complete opacue lines?
|
|
|
|
|
Hi Delphi gurus. I have had this com component registered on my machine, imported the component (xxxx_TLB got generated) and then I installed the component.
Is there any way that I could use the xxxx_TLB file after loading it dynamically and I don't have to install the component?? I mean all it contains is interface, dispinterface, CoClass and a class. Can not I instantiate this class dynamically?
Thanks for any information.
|
|
|
|
|
Hello. I am trying to get cpu usage in delphi, using Performace Data Helper API . At the moment I know just two methods of getting it. One using Registry Interface and second PDH Interface and latter is easier than former. I am trying to use following code but it produces PDH_INVALID_ARGUMENT meaning either argument is missing or is invalid.
hStatus := PdhOpenQuery(Nil, 0, hQuery);
if hStatus <> ERROR_SUCCESS then
begin
GetErrorMsg(hStatus, sErrorMsg);
Exit;
end;
SO WHAT COULD BE WRONG? Thanks for any pointer.
May be irrelevant, but to give an idea that pdh variables are intialized with what values.
implementaion
var
PdhOpenQuery : function( pReserved: Pointer;
dwUserData: DWORD; phQuery: PDH_HQUERY ): PDH_STATUS; stdcall;
DllHandle : THandle;
hStatus : PDH_STATUS;
procedure TClass.Create()
begin
DllHandle := LoadLibrary('pdh.dll');
if DllHandle <> 0 then
begin
PdhOpenQuery := GetProcAddress( DllHandle, 'PdhOpenQuery' );
end;
|
|
|
|
|
Not sure your compiler is able to delay load dynamic library[^] which is another option. I haven't got chance to use this syntax though...
I would use the following to dynamically load the function.
type
PDH_HQUERY = THANDLE;
PDH_STATUS = DWORD;
FuncPdhOpenQuery = function(szDataSource: LPCTSTR; dwUserData: DWORD_PTR;
var phQuery: PDH_HQUERY): PDH_STATUS; stdcall;
procedure LoadPDHQuery;
var
PdhOpenQuery: FuncPdhOpenQuery;
DllHandle: HModule;
QueryHandle: PDH_HQUERY;
Res: PDH_STATUS;
begin
try
DllHandle:= LoadLibrary('pdh.dll');
if DllHandle > 0 then
begin
@PdhOpenQuery:= GetProcAddress(DllHandle, 'PdhOpenQueryW');
if (Assigned(PdhOpenQuery)) then
begin
Res:= PdhOpenQuery(nil, 0, QueryHandle);
ShowMessage(IntToStr(Res));
end;
end;
finally
if (DllHandle > 0)
FreeLibrary(DllHandle);
end;
end;
|
|
|
|
|
It don't know where is the error it works here. And there is a third method, you did not mention: WMI.
|
|
|
|
|
Hello guys. I have this type library by importing and installing a COM component. Now I want to know two things.
1 - Each time my solution runs, the library gets loaded from default location C:\Users\xxxx\Documents\RAD Studio\9.0\Imports . What changes should I make so that it points and loads the library in my project folder.
2 - Now we know that if I reinstall the component, the library will be refreshed. Is there any way I could persist the changes made in the type library?
Thanks for any suggestions.
This world is going to explode due to international politics, SOON.
|
|
|
|
|
If you put the library in the same directory as the executable (.exe file) then the loader should find it first.
Use the best guess
|
|
|
|
|
is there any fast way to convert delphi 2007 project to latest delphi XE4? 
modified 9-Jul-13 6:21am.
|
|
|
|
|
If XE4 gives you errors when opening your .dproj file, the answer would be no. And if XE4 is able to open that file, make sure you do a clean build.
Do you have 3rd-party packages installed with Delphi 2007? It's sometimes tricky and annoying to keep packages up-to-date when upgrading your codebase.
I assume you've already dealt with UnicodeString in your 2007 project, which is big bonus to the conversion.
|
|
|
|
|
Hello guys.. I am having this TObjectDictionary object. I can successfully read and write values in this dictionary. But problem comes when I try to update one of my values. When I access a value, change and update it, then it stores some odd object whose values are changed automatically. Here is what I am trying.
type TStudent = class
public
StudentName, StudentClass : string;
StudentId : Integer;
end;
constructor TStudentClass.Create()
begin
m_objStudentList := TObjectDictionary<Integer, TStudent>.Create([doOwnsValues], 256);
end;
procedure TStudentClass.UpdateStudent(nId : Integer; sName : string);
var objStudent : TStudent;
begin
objStudent := m_objStudentList.TryGetValue(nId, objStudent);
if(objStudent = Nil) then Exit;
objStudent.StudentName := sName;
m_objStudentList.AddOrSetValue(nId, objStudent);
end;
So what could be wrong here? Thanks for any suggestions.
This world is going to explode due to international politics, SOON.
modified 16-Jul-13 4:01am.
|
|
|
|
|
Shouldn't the function signature of TryGetValue look like the following?
function TryGetValue(const Key: TKey; out Value: TValue): Boolean;
and the objStudent was corrupted actually after the call to TryGetValue
if (m_objStudentList.TryGetValue(nId, ObjStudent))
begin
objStudent.StudentName:= sName;
end;
|
|
|
|
|
hello guys... I have a small component from which I got a wrapper (.tlb) by importing and installing the component. I dropped the component from toolbox to TMainFormDialog and got events. But I want to redirect these events to some other class NOT the TMainFormDialog . Now I am , well sort of, not moving forward. Well I am not sure but I think I should be able to do this using RTTI. I think I should make and assign new properties (THE events) to the old ones. This is the psuedo-code that I tried.
TServer = class (TOleServer)
private
FOnEventEx : TNotifyEvent;
FOnEvent : TNotifyEvent;
published
property OnEventEx : TNotifyEvent read FEventEx write FEventEx ;
property OnEvent: TNotifyEvent read FEvent write FEvent;
public
procedure FireThisProc();
end;
Now I tried the GetMethodProc() and SetMethodProc() in the Create function of .tlb wrapper like this but could not succeed.
class function CoServer : IServer
begin
MethodProp := GetMethodProp(TObject(TServer), 'OnEventEx');
SetMethodProp(TObject(TServer) , 'OnEvent', MethodProp);
Result := CreateComObject(CLASS_Server) as IServer;
end;
So what (and how) should I do it exactly so that I might be able to redirect my events to some other class, NOT the TMainFormDialog . Thanks for any pointers or suggestions.
This world is going to explode due to international politics, SOON.
modified 16-Jul-13 4:02am.
|
|
|
|
|
Is RTTI the only way to do?
Check if TMethod.Code contains empty info. and you're redirecting properties on TServer class, not a TServer object.
if MethodProp.Code <> Nil then
begin
OutputDebugString('Property Found.');
SetMethodProp(TObject(TServer) , 'OnEvent', MethodProp);
end
else
begin
OutputDebugString('Property Not Found.');
end;
|
|
|
|