|
I am working with very limited screen space and I would like to add a toolbar that just has text but no images. If I leave the image list null, space is still set aside for the images.
Can I use the Toolbar control without images and without the control defaulting space for the image?
thanks
|
|
|
|
|
can't you just use a mainMenu bar? otherwise try altering the default width setting of the buttons - ButtonSize. hwo about turning off the AutoSize control? don't know if this is any help...
looking for hosting? ithium is good.
|
|
|
|
|
Hi every body!
please tell me, how can i get addresses from outlool express?
Thanks!
|
|
|
|
|
not sure but the address book file seems to be:
C:\Documents and Settings\[user]\Application Data\Microsoft\Address Book\[user].wab
don't know if this will help!
looking for hosting? ithium is good.
|
|
|
|
|
You can add a COM reference to the Outlook type library and interop it; not sure what's in there as far as an API goes. I haven't played with it for some time.
Jeremy Kimball
|
|
|
|
|
Hi, everyone
I have a dll file developed by someone else in VC6. Now I tried to use it in VS.Net, but how can I do that?
Thanks in advance.
|
|
|
|
|
If it is a COM dll, you can just use Add Reference meny by right click on your references in your project solution and select its dll in COM tab and simply use its namespace. If its not COM and its just like win32 dlls you can use DllImport to use its functions. See MSDN and this site for samples.
Mazy
"Man is different from animals in that he speculates, a high risk activity." - Edward Hoagland
|
|
|
|
|
It's not a com dll. Because when I am using "add reference", it doesn't work. Then I tried to use DllImport like this:
[System.Runtime.InteropServices.DllImport(@"C:\Visual Studio Projects\test\bin\Debug\dcli.dll", EntryPoint="AdminLogin")] <br />
public static extern bool AdminLogin(string lpctstrUser, string lpctstrPassWord);
Then I got a "DllNotFound" exception. But I already put the dll file in "C:\Visual Studio Projects\test\bin\Debug\dcli.dll". Do you know why?
Thanks in advance.
|
|
|
|
|
Ugh. I think I remember reading/hearing something about this. I'm not sure I remember exactly, but I don't believe you can explicitly provide a path as you have. I think it looks for "filename.dll" in a set order of pathnames.
Jeremy Kimball
|
|
|
|
|
Seems that your dll is delivering strings. If you want to get a string from a dll, you should use a string builder. Try something like this:
StringBuilder sb = new StringBuilder( 256 );
[DllImport( "myDll.dll" )]
public static extern void GetString( StringBuilder sb );
void myFunc()
{
GetString( sb );
Debug.WriteLine( "String = " + sb.ToString() );
}
|
|
|
|
|
hi,
how to redirect the output of certain window into my app to make this window appear in certain pos in my application consider that i have DirectX App
|
|
|
|
|
The short version is, you can't. Simply because you can't tell the app's paint code to repaint in another processes window. What you might want to try is grabbing the image of the original app window, sort of like Alt-PrintScreen does, and using the image in your app.
RageInTheMachine9532
|
|
|
|
|
Use multiple render targets. Remember a render target does not have to be a form object. PictureBox works well. Its been a while since I worked with DirectX9 but I can dig up some from work if need be.
|
|
|
|
|
Hi everyone,
Well i have a little problem. I have recieved some source code written in java that performs some xml parsing. I need to design a front end in C# and allow to call the java app. I'm currently doing that through a bat file which i call through System.Diagnostics.Process class. However, this "hangs" my c# program and i want the user to be able to see the output of a program in large text box (with scroll bars) within the form, in real time. Also, i have an animated gif that should continue to loop without being interupted. As soon as i execute process.start(), the program "hangs" while the java app runs in the background. The gif stops animating... the form looks funny with some control's dissapearing .. etc. What is the best way to do this?
Thanks.
I have read up on multi threaded applications on using them to update UI controls while processing in the backgroudn.. however the stuff was a little over my head.. any help would be appreciated.
|
|
|
|
|
|
Build an enterprise application for a customer with aprox. 100 Clients ???
HI!!!
If you would happen to get the chance to build an enterprise application
for a customer with aprox. 100 Clients (…and increasing) which technology
and architecture would you choose. The security policy is pretty strong
so we would have actually only port 80 available. Besides that no deployment
effort on client side is desirable. There is a 100Mbit LAN and this new
application would be deployed on the intranet (internal network).
The GUI of this application should be very rich and fast like win32 applications.
What would you propose in order to fulfil those requirements.
It is an enterprise app… so inputing data, printing invoices,
packing lists, reporting, etc
Clients are win xp machines It processes data on the server mainly,
the presentation is on the clients Data is stored in a database
100Mbit has to do with the access speed to the backbone resources
from clients.(only port 80)
Any hints, links and ideas will be highly appreciated
Regards,
gicio
|
|
|
|
|
Is smart client applications THE SOLUTION????
gicio
|
|
|
|
|
|
This application rockz!!!!!!!!!!!
regards,
gicio
|
|
|
|
|
Hi,
I have a datagrid filled with a table having 15-20 columns.At a time only 4-6 are visible without scrolling in a datagrid.Now I want to select a particular column header for my application.So I want to keep a check box on each column header and so that I can select the check box in the header.How do I keep this?
Karteek
|
|
|
|
|
Hi all,
I need to call a constructor from an unmanaged C++ dll and then call some functions based upon it. The header for the dll is this:
#define SIMPLE_PLAYBACK_EXPORTS
#ifdef SIMPLE_PLAYBACK_EXPORTS
#define SIMPLE_PLAYBACK __declspec(dllexport)
#else
#define SIMPLE_PLAYBACK __declspec(dllimport)
#endif
#ifndef CONSOLE_ELEMENT_H
#define CONSOLE_ELEMENT_H
#include "simple_playback.h"
#include "pa_synth.h"
class SIMPLE_PLAYBACK console_element {
public:
int active,ready;
pa_synth *ce_synth;
simple_playback *ce_simpleplay;
console_element::console_element() {
this->active=-1;
this->ready =-1;
};
/*
* Constructor
* file: the file that contains a monophonic 16 bit wav file
* rep is a flag telling whether you want to repeat (1) or play once (0)
* if you choose to repeat then rep_per_sec are the repeats per second
* After Calling the constructor playback starts automatically
*/
console_element::console_element(char *file,int rep,int rep_per_sec) {
ce_simpleplay=new simple_playback(file,rep,rep_per_sec);
ce_synth =new pa_synth(ce_simpleplay);
};
console_element::~console_element() {
delete ce_synth;
if (ce_simpleplay) delete ce_simpleplay;
};
};
#endif
From other readings i'm guessing that I have to use DllImport, but I'm not quite sure how to go about it. Can anyone provide an example?
Many thanks, G
|
|
|
|
|
You'll be much better off using a C-style class factory to create and destroy your class instances, and then declare your extern methods using CallingConvention.ThisCall . So, in your unmanaged C/C++ DLL, define something like this:
#ifdef __cplusplus
extern "C" {
#endif
__declspec(dllexport) LPVOID CreateClass();
__declspec(dllexport) void DestroyClass(LPVOID lpBuf);
#ifdef _cpluscplus
}
#endif Later in your code, define those declarations so that they new and delete the class. This is because DllImportAttribute cannot be used to instantiate classes. For your methods, you declare those two functions using IntPtr and then define all your class's methods using the CallingConvention.ThisCall like so:
[DllImport("mylib.dll")]
private static extern IntPtr CreateClass();
[DllImport("mylib.dll")]
private static extern void DestroyClass(IntPtr inst);
[DllImport("mylib.dll", CallingConvention=CallingConvention.ThisCall)]
private static extern int Add(IntPtr inst, int a, int b); To use it, create your instance and call the method with the pointer from CreateClass :
IntPtr inst = CreateClass();
int total = Add(inst, 1, 1);
DestroyClass(inst); If you need to pass parameters to your constructor, modify (or overload) the CreateClass function both in your unmanaged and managed code and pass the necessary parameters.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Nice use of design patterns, Heath!
I tend to agree. Trying to "new" an object in an unmanaged DLL would be ugly, if it were even possible.
Jeremy Kimball
|
|
|
|
|
Hi,
Can anyone tell me how to add intellisence descriptions to an object, function, and or property? I think it has something to do with adding text in [] above a object, function, or property but that's just a guess.
Thanks
|
|
|
|
|
XML Comments are your friend.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
|
|
|
|