|
I take it by doing it the way i posted above, i'm getting an int from a pointer, and not handling it properly.
That will lead to memory leaks? Unless i unallocate it?
Cata
|
|
|
|
|
I hope I can explain this well enough to make sense, I am writing a C#/ASP app where I have a grid (4x3) of buttons on a page. Each one is named btnMonth1, btnMonth2 - btnMonth12 I am working with some database stuff where they may only be working on certain months at a time so depending on what number is in the data I would like to make it visible... so if I had a variable mth I would want to somehow say btnMonth(mth).visible = true; AFAIK in C++ you can do this by incrementing it but I don't think forms use resource ID's so I am not sure this would work.
I'm trying to learn something at the same time while trying to cut a big switch statement out of the mix that seems unnecessary. Maybe that's how it should be done though?
Any help is appreciated
Thanks!
|
|
|
|
|
Is this on the web page? If so, you can use:
System.Web.UI.Control.FindControl(string id)
If it's on a windows form, you'd probably have to do some funky iteration using GetNextControl or something...
Jeremy Kimball
|
|
|
|
|
Yes it's on a webpage. Thanks! I'll give this a try!
|
|
|
|
|
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
|
|
|
|