|
hi all
i want to know is there any way to manage my application in different user's computer setting?
my application is win app., but in different resolution i have to set its usercontrols location and size .which method let me have some information about computer setting that is running on it?
salmani
|
|
|
|
|
In most cases you can get away with setting the anchors. If you have specific layout requirements there is an event that fires when the form has been resized - it will also fire initially allowing you to do the layout before the form is displayed.
The screen resolution should be ignored as you can't determine the size of the form from the screen size.
|
|
|
|
|
Use:
Screen.PrimaryScreen.Bounds. ....
See at that "Bounds". You get lot of infos there...
|
|
|
|
|
hi friends,
In my application, i need to send mail through outlook from C#(Visual Studio). Please tell me how to create button in the (new mai page) toolbar of outlook and when user clicks that mail should send to the recepient. Please Help.
Thanks & Regards,
Prya
|
|
|
|
|
|
Dear all, iam at the end stage of my project. i am having lot of dll's like common dlls, shared dlls and group specific dlls. while building my solution i referenced all dlls with copy Locat=true; what happened is when depolyed my project using the setup i created separate folders for dlls types. but my Main GUI which refers these dlls takes localy copy of all to its bin folder. so i re referenced the dlls with copy local=false. but this gave me a error "Dll not found on the path = "path i refernced during runtime" in the depolyed machine.
Basically how you people create a setup environment like this. i have one more idea, like can i add the all paths(target directroy paths of (common,shared,group)) in Environment variable-Path. so that the CLR serachs the Environment paths and detect automatically. Please suggest me Thanks and Regards,
Srini
|
|
|
|
|
Hello
engsrini wrote: i am having lot of dll's like common dlls, shared dlls and group specific dlls
Well, the following quote is from MSDN
MSDN: At run time, components must be in one of two locations: in the output path of the project or the Global Assembly Cache (GAC).
MSDN: There are several ways to deploy an assembly into the global assembly cache:
Use an installer designed to work with the global assembly cache. This is the preferred option for installing assemblies into the global assembly cache
Revise MSDN for more details about the Global Assembly Cache.
Regards
|
|
|
|
|
Thanks for your reply,
First of all, GAC is used to share our assemblies. mainly if there is a need to share, version management then we have to go for GAC. also it requires Strong name. in my case it doesn't requires all these stuffs. I want to have the separate folders like Common,Shared and Group where the GUI will refer the dll. At the worst case i can go for GAC. any other options..
I saw one more thing. in the app.config file there is one tag called <probing> where we can specify the folders in which the CLR has to look out for assembly paths. anybody having idea on this.
Thanks and Regards,
Srini
|
|
|
|
|
Hello
engsrini wrote: in the app.config file there is one tag called where we can specify the folders in which the CLR has to look out for assembly
This is at design time, before compiling your applications. It doesn't work after compiling the application.
The only way that will achieve exactly what you want -that I know of, of course-, would be Reflection.
Using reflection means that you load your assembly in the code at runtime, create dynamic instances of your classes and use them just like if they were referenced to prior to compiling-well, almost like that;)-.
It'll be a very painful programming experience if you make every call to your dll's classes or methods through reflection. Trust me you won't forget it
Search MSDN for more details about Reflection.
Regards![Rose | [Rose]](https://codeproject.freetls.fastly.net/script/Forums/Images/rose.gif)
|
|
|
|
|
hi every one
well its strange that I'm having a bit trouble updating the database after updating the dataset here. I'm using SQL server 2000.
sqlUpdateCommand1.Parameters["@BankID"].Value = bID = Convert.ToDecimal(textBoxBankID.Text);
sqlUpdateCommand1.Parameters["@BankName"].Value = textBoxBankName.Text;
sqlUpdateCommand1.Parameters["@Original_BankID"].Value =Convert.ToDecimal(orig_bankID);
sqlUpdateCommand1.Parameters["@Original_BankName"].Value = orig_bankName;
DataRow dr = accounts1.Bank.Rows[this.BindingContext[accounts1,"Bank"].Position];
dr["BankName"] = textBoxBankName.Text;
int n = sqlDataAdapter1.Update(accounts1,"Bank");
MessageBox.Show(n.ToString());
accounts1.AcceptChanges();
---------------------------
what happens is that it shows the update in that particular column untill its not closed. as soon as I close it and reopen it, it shwos the same ol previous value. I've dont the delete and insert part but this ones not working rt.
I'll be very thankful for ur help...
|
|
|
|
|
have you specified update command for ur dataadapter properly.
rahul
|
|
|
|
|
offcourse I made the dataadapter through the wizard
the code is
this.sqlUpdateCommand1.CommandText = "UPDATE Bank SET BankID = @BankID, BankName = @BankName WHERE (BankID = @Original_" + "BankID) AND (BankName = @Original_BankName); SELECT BankID, BankName FROM Bank W" +"HERE (BankID = @BankID)";
I used the two string variables orig_bankID and orig_bankName for keeping track of the previous(original) values of the record. These have the right values too. Where am I going wrong? I just can't understand.
Rocky
|
|
|
|
|
Windows application, Use the log4net, ConsoleAppender and RollingFileAppender to write the log information to Console and file for all classes. Now, there is a problem, how can display the log in the Windows form real time?
If there is a method to display the Console message just like we use the MS VS2005 debugging programs?
thanks!
|
|
|
|
|
Hello,
You can capture the output of the console application and redirect it to a textbox.
This is tricky, but should be doable and work for all kinds of applications.
Checkout the documentation on the Process class. This should provide you with information on how to redirect the output of a process.
WM.
What about weapons of mass-construction?
|
|
|
|
|
I'm trying to make Outlook addin that will add one button to outlook context menu---
(VB.net / C# .net (NO C++ .net))
first,
ActiveExplorerCBars = applicationObject.ActiveExplorer.CommandBars
then
cmdbar = ActiveExplorerCBars.Item("Context Menu") 'cmdbar is commandbar object "^getting error here"
control = cmdbar.Controls.Add(MsoControlType.msoControlButton)
With control
.Caption = "kedar"
.visible = true
..... other props
End With
but i'm gettin an error that the parameter "Context Menu" is incorrect @ cmdbar = Active......
"i have seen code working in vb but not in vb.net so keep that in mind and reply for vb.net"
i've refered -- http://www.outlookcode.com/codedetail.aspx?id=526
http://www.outlookcode.com/codedetail.aspx?id=314 ?
and similar codes but they'r not of any use to me,.....
I think "Context Menu" is not a valid parameter. But accordg to other resources i've cometo know that outlook has that Named menu.
I'd like if anyone can post a code to add the button to context menu.
thnx in advance
"You can do any thing you set to your mind" - theGhost_k8
|
|
|
|
|
Hi,
i need help...
i have a windows application, in which there a datagrid, and i have to show details in the grid in such a way, that when i click "Show Details"(which i can get as a row in the datagrid), the grid expands showingme more rows which get inserted where i clicked on show details...
Similarly, when i click 'Hide Details", the rows are not shown...
Does any one has code for this funnctionality of datagrid? plz do help me...
thanx,
Deepa
|
|
|
|
|
u can use dataview to bind ur datagrid,with dataview u can create diffrent view of data b filtering data from dataset.
rahul
|
|
|
|
|
Hi i did try but couldn't get anywhere...could you plz give example plzz
|
|
|
|
|
Hi,
I am working with sql server and ms access. I want to store .doc files. what is the standard way of keeping such files.
thanks !
jayasshc
|
|
|
|
|
csecharithjayasshc wrote: I am working with sql server and ms access. I want to store .doc files. what is the standard way of keeping such files.
I am guessing it would be with OLE Objects.
Probably something like this...
http://support.microsoft.com/?kbid=198466[^]
but in C#.
|
|
|
|
|
|
I have a video capturer card SDK.
in the .h file,
defined a class
all functions is in the class.
so i want to know how can i use the function?
because when i use the [Dllimport] to define the function in C#, when running, it doesn't work right,for an exception means "can not found the entrypoint in dll".
so i wondered the reason is the define of Class in dll file.
what can i do then?
the .h file is shown as below:
// AVEControl.h: interface for the AVEControl class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_AVECONTROL_H__4E171B4B_A11B_49F1_B41C_5F4A31B5CF08__INCLUDED_)
#define AFX_AVECONTROL_H__4E171B4B_A11B_49F1_B41C_5F4A31B5CF08__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifdef DEVICECONTROL_EXPORTS
#define DEVICECONTROL_API __declspec(dllexport)
#else
#define DEVICECONTROL_API __declspec(dllimport)
#endif
typedef HRESULT (*AVECALLBACK) (PBYTE pbData, LONG lDataLength);
#define E_DEVICE_NOT_READY 0xB0004001L
class DEVICECONTROL_API AVEControl
{
public:
HRESULT StartRecordWithoutPreview(HWND hWndCap, CString FileName, __int64 pFileLength, UINT pFileMessage, BOOL pShowSetting = TRUE);
HRESULT StartRecordWithPreview(HWND hWndCap, RECT rc, CString FileName, __int64 pFileLength, UINT pFileMessage, BOOL pShowSetting = TRUE);
HRESULT StartPreview(HWND hWndCap, RECT rc);
HRESULT SetVideoClippingWindow(HWND hwnd);
HRESULT SetCallback(AVECALLBACK Callback);
HRESULT GetVideoStatus(PUCHAR pSta);
HRESULT SetVideoPosition(LPRECT lpSRCRect, LPRECT lpDSTRect);
void GetCurrentImage(CString BmpFileFullName);
BOOL IsGraphRunning(void);
HRESULT StopGraph(void);
HRESULT ApplySettings(CString IniFileFullName);
HRESULT SetVideoProcAmp(long Property, long Value);
HRESULT GetVideoProcAmp(long Property, long* Value);
HRESULT GetEvent(long* EventCode, LONG_PTR* Param1, LONG_PTR* Param2, long msTimeout);
HRESULT SetNotifyWindow(OAHWND hwnd, long lMsg, LONG_PTR lInstanceData);
HRESULT InitDeviceControl(void);
AVEControl();
virtual ~AVEControl();
};
#endif // !defined(AFX_AVECONTROL_H__4E171B4B_A11B_49F1_B41C_5F4A31B5CF08__INCLUDED_)
|
|
|
|
|
See my post in the VB forum. Don't cross post, people consider it rude.
|
|
|
|
|
PaulC1972 wrote: Don't cross post, people consider it rude
Talking to yourself???
I guess the OP deleted their post.
|
|
|
|
|
I have to create a control really transparent, it is just a bounding box with handles.
I want show it insiede a panel and i want to see trought the background of the bounding box.
How?
|
|
|
|