|
|
Is there a place in the Registry or somewhere, archived, that stores the window dimensions of Microsoft Office applications, specifically Access 2007?
I want to access the Height and Width (possibly location) of the last used instance of Access 2007 and then be able to set those "variables" so that I can restore the dimensions I choose.
Thank you,
JJ
|
|
|
|
|
sorry for breach in Forum-etiquette:
I believe i found what registry values I am looking for under,
HKEY_CURRENT_USER
\Software\Microsoft\Office\12.0\Access\Settings
I will leave this up for a while in case there is any interest
|
|
|
|
|
Hi,
on CodeProject users are not expected to remove anything. The forums can and will be searched by many others, who will be happy to find what they need.
|
|
|
|
|
here i am pasting my code now i want that behind this datagrid i want to show some text that should be visible throw the datagrid and that text may be a only text or any label's text behind the datagrid.
so want my datagrid as transparent but i have tried. but not succeeded.
please help.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class CheckItem : Form
{
public CheckItem()
{
InitializeComponent();
}
private DataTable Item = new DataTable("CheckItem");
private Label lbl = new Label();
private Label lbl5 = new Label();
//To drag The Form Without Border
#region"To drag The Form Without Border"
const int WM_NCHITTEST = 0x84;
const int HTCLIENT = 0x1;
const int HTCAPTION = 0x2;
protected override void WndProc(ref System.Windows.Forms.Message m)
{
switch (m.Msg)
{
case WM_NCHITTEST:
base.WndProc(ref m);
if (m.Result.ToInt32() == HTCLIENT) m.Result = new IntPtr(HTCAPTION);
break;
default:
base.WndProc(ref m);
break;
}
}
#endregion
#region"private void CheckItem_Load"
private void CheckItem_Load(object sender, EventArgs e)
{
try
{
//Fixing the length and position of windows form.
Screen scr = Screen.PrimaryScreen;
//this.Left = (scr.WorkingArea.Width - this.Width) / 2;
//this.Top = (scr.WorkingArea.Height - this.Height) / 2;
this.MaximumSize = new Size(this.Width, this.Height);
this.MinimumSize = new Size(this.Width, this.Height);
// Label
#region"Label"
DataGridTableStyle dgStyle = new DataGridTableStyle();
dgStyle.HeaderBackColor = Color.Chocolate;
dgStyle.HeaderForeColor = Color.White;
dgStyle.HeaderFont = new Font("verdana", 8, FontStyle.Bold);
DataGridTextBoxColumn dgItemCode = new DataGridTextBoxColumn();
dgItemCode.ReadOnly = true;
dgItemCode.Width = 80;
DataGridTextBoxColumn dgItemName = new DataGridTextBoxColumn();
dgItemName.ReadOnly = true;
dgItemName.Width = 90;
DataGridTextBoxColumn dgRecivedQuantity = new DataGridTextBoxColumn();
dgRecivedQuantity.ReadOnly = true;
dgRecivedQuantity.Width = 130;
DataGridTextBoxColumn dgApproved = new DataGridTextBoxColumn();
dgApproved.Width = 80;
DataGridTextBoxColumn dgRejected = new DataGridTextBoxColumn();
dgRejected.Width = 80;
dgItemCode.HeaderText = "Item Code";
dgItemCode.MappingName = "ItemCode";
dgItemName.HeaderText = "Item Name";
dgItemName.MappingName = "ItemName";
dgRecivedQuantity.HeaderText = "Recived Quantity";
dgRecivedQuantity.MappingName = "RecivedQuantity";
dgApproved.HeaderText = "Approved";
dgApproved.MappingName = "Approved";
dgRejected.HeaderText = "Rejected";
dgRejected.MappingName = "Rejected";
#endregion
// Create temprarory datatable
#region"Create temprarory datatable"
DataTable Item = new DataTable();
DataRow dr;
Item.Columns.Add("ItemCode", typeof(string));
Item.Columns.Add("ItemName", typeof(string));
Item.Columns.Add("RecivedQuantity", typeof(Int32));
Item.Columns.Add("Approved", typeof(Int32));
Item.Columns.Add("Rejected", typeof(Int32));
//Add temp datas
dr = Item.NewRow();
dr["ItemCode"] = "I007";
dr["ItemName"] = "RAM";
dr["RecivedQuantity"] = 1344;
dr["Approved"] = 904;
dr["Rejected"] = 220;
Item.Rows.Add(dr);
dr = Item.NewRow();
dr["ItemCode"] = "I004";
dr["ItemName"] = "RM";
dr["RecivedQuantity"] = 10;
dr["Approved"] = 900;
dr["Rejected"] = 200;
Item.Rows.Add(dr);
dr = Item.NewRow();
dr["ItemCode"] = "I006";
dr["ItemName"] = "RAM";
dr["RecivedQuantity"] = 1000;
dr["Approved"] = 900;
dr["Rejected"] = 200;
Item.Rows.Add(dr);
#endregion
//Adding Label
#region"Adding Label"
Label lbl1 = new Label();
lbl1.Font = new Font("Verdana", 8, FontStyle.Bold);
lbl1.BackColor = Color.White;
lbl1.Left = 50;
lbl1.Text = " ";
lbl1.ForeColor = Color.White;
Label lbl2 = new Label();
lbl2.Font = new Font("Verdana", 8, FontStyle.Bold);
lbl2.Left = 50;
lbl2.Text = " ";
lbl2.ForeColor = Color.White;
Label lbl3 = new Label();
lbl3.Font = new Font("Verdana", 8, FontStyle.Bold);
lbl3.Left = 50;
lbl3.Text = " ";
lbl3.ForeColor = Color.White;
//Label lbl = new Label();
lbl.Font = new Font("Verdana", 8, FontStyle.Bold);
lbl.Text = "*";
lbl.Left = 50;
lbl.ForeColor = Color.Red;
//Label lbl5= new Label();
lbl5.Font = new Font("Verdana", 8, FontStyle.Bold);
lbl5.Text = "*";
lbl5.Left = 50;
lbl5.ForeColor = Color.Red;
dgItemCode.TextBox.Controls.Add(lbl1);
dgApproved.TextBox.Controls.Add(lbl);
dgRejected.TextBox.Controls.Add(lbl5);
dgItemName.TextBox.Controls.Add(lbl2);
dgRecivedQuantity.TextBox.Controls.Add(lbl3);
dgStyle.GridColumnStyles.Add(dgItemCode);
dgStyle.GridColumnStyles.Add(dgItemName);
dgStyle.GridColumnStyles.Add(dgRecivedQuantity);
dgStyle.GridColumnStyles.Add(dgApproved);
dgStyle.GridColumnStyles.Add(dgRejected);
#endregion
dgStyle.PreferredRowHeight = 24;
dataGrid1.TableStyles.Add(dgStyle);
//binding datagrid
dataGrid1.BackColor = Color.Transparent;
dataGrid1.CaptionText = "Check Item";
dataGrid1.DataSource = Item;
//code for combox on pageload event
cmbPurchaseOrder.SelectedIndex = 0;
cmbVender.SelectedIndex = 0;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region"private void btnReset_Click"
private void btnReset_Click(object sender, EventArgs e)
{
cmbPurchaseOrder.SelectedIndex = 0;
cmbVender.SelectedIndex = 0;
BillOfMaterial frm = new BillOfMaterial();
frm.Show();
}
#endregion
#region"private void btnCancel_Click"
private void btnCancel_Click(object sender, EventArgs e)
{
this.Dispose();
}
#endregion
private void CheckItem_MouseMove(object sender, MouseEventArgs e)
{
lbl.Text = "*";
lbl.Font = new Font("Verdana", 8, FontStyle.Bold);
lbl.Text = "*";
lbl.Left = 50;
lbl.ForeColor = Color.Red;
lbl5.Font = new Font("Verdana", 8, FontStyle.Bold);
lbl5.Text = "*";
lbl5.Left = 50;
lbl5.ForeColor = Color.Red;
}
}
}
|
|
|
|
|
I hate to tell you this, but you cannot do what you want to do with the standard controls in the ToolBox.
Transparent is not really transparent. When you set the BackColor of a control to Transparent, you're really telling the control to take on the background properties of the controls parent container. You will NOT be able to see any controls sitting behind the DGV.
You cannot achieve what you want without custom drawing the DGV. That's not something that I want to think about, let alone do.
I think your best shot at success with this would be to implement this in a WPF app, not Windows Forms.
|
|
|
|
|
I am hoping to switch tack from IT support (Lotus Admin & PC Analyst) to a C# development role and need a project to get my teeth into as most of the junior developer positions want at least personal project experience.
I have been studying the .Net framework for the last 2 years and have only really written code for examples in the self paced training course i am almost finished with (MS exam 70 532)
I am familiar with lots of the fundamental concepts but have no real idea of what i can do with them. I would like to work on a project that creates a useful windows form application that will give me good experience of the common elements of a c# application.
I know its a very vague question but any pointers on where to start or suggestions would be gratefully received. I would particularly welcome example of other peoples first projects.
|
|
|
|
|
This might not be the right forum but I will still answer it.
I was also in the same situation as you are. Started of as a system/network admin in my initial job and then moved on to c#.
The first program I created was a calculator, it seemed easy but I learnt a lot of things.
Since I had knowledge about system and network adminstration, my next project was a network status utility. The initial version just checked if a pc/server in the network was switched on or not. In the 2nd version I made it automatically detect pc's in a network instead of me manually adding it, it had a screen which showed a green icon with the pc name to indicate it was switched on and a red icon to indicate it was switched off. I also had different icons for the pc, server and the routers. In the 3rd version I used WMI to fetch details about the machine. It could get the event viewer details and a lot more.
A lot of network utilities existed in the market when I did this. My main intention was to learn c# and doing this particular project made me learn a lot about .net. I touched every major class in .net with this project.
I would suggest you do a project with a domain you are strong with. That way you concentrate more on the learning part rather than trying to understand how the sytem should work. As a pc anaylst think about something you used daily or wanted to have.
Tarakeshwar Reddy
There are two kinds of people, those who do the work and those who take the credit. Try to be in the first group; there is less competition there. - Indira Gandhi
|
|
|
|
|
Two great suggestions thanks. I think i will start with a calculator, Following that I could do with a basic file monitor . We have an issue with something putting strange entries into a lotus config file i would really like to find the culprit. Where do i start with something like that?
Thanks for you help.
|
|
|
|
|
PROPZ_76 wrote: We have an issue with something putting strange entries into a lotus config file i would really like to find the culprit.
I would guess, that the lotus application is the one writing out the enteries to the config file. If that is the case, try to find out if Lotus has an SDK for the application you are working on and if the API has a method which allows you to listen to the config file change events.
Also, in .net you have ways to monitor a file and find out when it gets modified and which user has modified it. I am not sure if that would be of any help for you.
modified on Thursday, April 15, 2010 12:43 PM
Thanks Luc for pointing it out. The FileSystemWatcher cannot say which user had modified a file. I remember using the current user logged on to find out who might have changed the file. This might not work if you have a single administrator/user log on to the machine.
As I said, FileSytemWatcher might not be a very useful feature but just wanted to let you know that .net has a FileSystemWatcher class
Tarakeshwar Reddy
There are two kinds of people, those who do the work and those who take the credit. Try to be in the first group; there is less competition there. - Indira Gandhi
modified on Thursday, April 15, 2010 12:43 PM
|
|
|
|
|
Tarakeshwar Reddy wrote: find out when it gets modified and which user has modified it
FileSystemWatcher would tell me what is going on, I am unaware of it telling me who is doing anything though.
|
|
|
|
|
Luc Pattyn wrote: I am unaware of it telling me who is doing anything though.
Yeah I remember that FileSystemWatcher did not provide me the user details and I ended up using the current user logged on to track who modified a file.
Tarakeshwar Reddy
There are two kinds of people, those who do the work and those who take the credit. Try to be in the first group; there is less competition there. - Indira Gandhi
|
|
|
|
|
My first .NET project was a kitchen conversion program. Converting weight and temperatures etc. I also built in time calculations based on weights. Useable (which helps) but gave me plenty of real world useage of data types, data validation and UI design, but simple and lightweight enough to not be too much to deal with.
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
Step 1: Create a Calculator. The one we see in Windows. It will be easier enough coz, you know the functionality requirements. Also you will learn string manipulations well.
This one is my favourite. I learnt c# with this program.
Step 2: Choose two varied technologies - Database & Graphics
Database => Create a simple Shop Sales Program. Something that can print Bills to be given out to customers.
Graphics => Practice with some Drawing Program.
These will give you enough experience and understanding of C# Programs.
Som
|
|
|
|
|
Why not do something that is related to your current work, for example, a problem tracking system, that log date/time/description of problem, who raised the problem, who and when solved the problem,
Slowly you can enhance it to let user raise the problems (multi-user environment), categorize the problems, let manager to assign it to your colleagues (workflow), and generate reports on the time taken to solve the problems base on categories, etc etc.
|
|
|
|
|
My suggestion would be to try and solve a problem you currently face by building an application that addresses the issue. This will force you to "eat your own dog food" and consequently be critical of your own work (a great learning experience).
Further, chances are that if you're having this problem, others may well be in the same boat and would welcome trying out the utility you're building. This is a hugely humbling and rewarding experience, because it puts your efforts out in the real world and allows you to build a better application.
I've followed this very approach in all my "hobby" (non-work efforts). The results have been very rewarding.
/ravi
|
|
|
|
|
I am following http://msdn.microsoft.com/en-us/library/ms998360.aspx link to authenticate users against "active directories" and i could successfully login using this method.
Can anyone help me out how exactly can i get details of all the users displayed in my web site application when i am logged in as Administrator.
I want to display user details when the user i.e.,Administrator clicks on link say "User Details"
|
|
|
|
|
I posted this on the quick answer section, but - well - I couldn't discuss there.
I have a textbox showing the moves of a chess game. I need to prevent that someting lik "5. Ke4-e6" breaks up at the end of the line. I can use non-breaking hyphens and non-breaking spaces, but then it will still break at the dot.
So basically I want to wrap before or after the specified block, but *not* within. General wrapping should not be affected.
In HTML I'd use <nobr>5. K44-e6</nobr> and this behaviour is what I'm looking for.
I figure there must be something in RTF that gets this done...
Thanks for your help. Eiko
|
|
|
|
|
The RTB has no such formatting equivilent as far as I can find. Personally, I would probably chose to replace the RTB with a ListBox, maybe with custom painting code if there are formatting or painting requirements.
|
|
|
|
|
I've never seen that either. While I'm a big fan of ListBox, I'd go for a WebBrowser here; just create your own HTML document and show it in a WebBrowser; you can disable all user interactions through a number of boolean properties.
|
|
|
|
|
Is there anything in VB 2008 like Label control of vb6.0?
|
|
|
|
|
There are tons of examples out on the web. All you have to do is Google for "vb.net transparent label".
|
|
|
|
|
1/0 tons of thaks.
|
|
|
|
|
Set the label's BackColor property to Transparent and you get a transparent label!
|
|
|
|
|
Hello,
In an interview asked to me that,
Tell me an real time use of an interface.
Apart from importing namespace is there any use for "Using" keyword in C#.net.
Could anybody can answer these question. I would be very thankful to you
Regards
Azeem
|
|
|
|